Putting sequences together
Written by schmart on February 17, 2007 – 1:39 pmSometimes it is a problem to open many seqeunces in one worksheet to analyse them. For examlple you have sequence data and try to open them in one worksheet in Bioedit. You can copy every sequence by copy&paste in one file or one worksheet or you can use a little helper who will do it for you. Here is one very simple helper written in Perl.
Basicaly you invoke it with an argument defining a file pattern, *.seq defines all files ending on .seq. The files should be text files. The script now reads the file contents and put the contents together in a file called sequences.fasta.
Let say you have the files 1.seq and 2.seq in one directory:
1.seq:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
cccccccccccccccccccccccccccccccccccccc
2.seq:
ttttttttttttttttttttttttttttttttttttt
ggggggggggggggggggggggggggggggggggggg
Invoking appendseq.pl with *.seq as argument will produce the file sequences.fasta containing:
>1.seq
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
cccccccccccccccccccccccccccccccccccccc>2.seq
ttttttttttttttttttttttttttttttttttttt
ggggggggggggggggggggggggggggggggggggg
The original filenames are at the beginning of the sequence behind > and define the name of the sequnce. The resulting file should be FASTA compatible.
You can download appendseq.pl here.
Posted in Studium/Promotion, working tipps | No Comments »