Solved

DNA validation

Posted on 2009-05-15
1
209 Views
Last Modified: 2012-05-07
I'm trying to write a perl script in the form of a loop which basically scans through a sequence:

$dna =
acgcatgcatcagtcagatcgtacgatagXagtagtgatgatatg
cagtcagtacgPcagactgcatagctQcagtacgactcgatata

you'll notice in a dna sequence of a's c's g's and t's there are anomolies in $dna. I'm trying to write a loop which recognises all characters that arn't a c g or t and change them to "a" by default. Basically add some validation to sequence scanning.

Thanks.
0
Comment
Question by:StephenMcGowan
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
ID: 24397686

$dna =~ s/[^acgt]/a/g;

Open in new window

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've just discovered very important differences between Windows an Unix formats in Perl,at least 5.xx.. MOST IMPORTANT: Use Unix file format while saving Your script. otherwise it will have ^M s or smth likely weird in the EOL, Then DO NOT use m…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question