Solved

DNA validation

Posted on 2009-05-15
1
192 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
1 Comment
 
LVL 39

Accepted Solution

by:
Adam314 earned 500 total points
Comment Utility

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

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Many time we need to work with multiple files all together. If its windows system then we can use some GUI based editor to accomplish our task. But what if you are on putty or have only CLI(Command Line Interface) as an option to  edit your files. I…
Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
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…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now