convert my electronic 3' to 5' sequence to 5' to 3' - (Feb/02/2006 )
Is there a website or (free) program that will convert my electronic 3' to 5' sequence to 5' to 3'?
For example, I want to type in attcgatg and it to turn that into catcgaat.
At the moment I type it myself and it's boring!
for sequence manipulations, bioinformatics.net is useful.
Reverse complement automatized tool : http://www.ualberta.ca/~stothard/javascript/rev_comp.html
Reverse complement automatized tool : http://www.ualberta.ca/~stothard/javascript/rev_comp.html
This perl code will work assuming you file consists of just the ATCG...
#!/usr/bin/perl
use strict;
my $file = $ARGV[0] || die "Please give me a file containing only DNA";
open(F, $file_) || die "Sorry I failed to open your file :: $!\n";
chomp( my @array = <F>);
my @reverseArray = reverse@array;
print "@reverseArray\n";
This will print the DNA to the terminal you run the script in.
Cool. Thanks for your prompt answer!
Actually, that script will only reverse the sequence. If you want to complement it too, you need an additional step.
The following subfunction takes a DNA sequence and an operation code -- for example, if you pass it a sequence and the string 'rev', it'll just reverse the sequence and return it; if the string passed with the sequence is 'comp', it'll just return the complementary sequence, and if it's passed 'revcomp', it'll return the sequence's reverse complement.
I have it in a module of standard lab geek code that I use for all my lab scripts...
my ($seq, $ops) = @_;
if ($ops eq "rev") {
$seq = reverse $seq;
} elsif ($ops eq "comp") {
$seq =~ tr/ACGTacgt/TGCAtgca/;
} elsif ($ops eq "revcomp") {
$seq = reverse $seq;
$seq =~ tr/ACGTacgt/TGCAtgca/;
}
return $seq;
}
I must have missed the reverse complement part. oops.
For example, I want to type in attcgatg and it to turn that into catcgaat.
At the moment I type it myself and it's boring!
The programme that I use frequently for the same is called "Nucleic Acid Sequence Massager"
You may use it to remove FASTA comments, html tracks, line breaks, numbers, white spaces from a sequence.
You may use it to convert your sequence into triplets, convert DNA sequence into RNA sequence and vice-versa, convert it into upper/lower case... and of course reverse (3'-5' to 5'-3' and vice -versa) as well as get the complementary strand too.
You may find the programme at the following link (it's free and online):
http://www.attotron.com/cybertory/analysis/seqMassager.htm
Good wishes,
Bhaskar
This is my favourite, the sequence manipulation suite as recommended by fred.
http://www.ualberta.ca/~stothard/javascript/
i like this site too because not familiar with pearl or javascript programming
But wait... I thought this was a bioinformatics forum... bioinformatics requires the ability to write scripts and programs.
As demonstrated twice in this thread perl can be used quickly to complete all of the above tasks in under 20 lines of code.
There is one major problem with relying upon web servers:
you are working on something and urgently require reversing your sequence and converting it to mRNA, you start your browser and click on your link to be greeted with "sorry, we are currently very busy" or "site down for server maintenance". What do you do? Do it by hand?
From a biologists perspective I always prefer having my own tools to do things than rely on other peoples code especially for trivial tasks like the one here.
DPK.
An individual with below average intelligence would be able to code the above solutions in perl in under two hours including the time taken to go to a library and read the few pages required.