chop.seqs keep=back working???

Hi,
Has anyone had any trouble with chop.seqs(keep=back), if you are trying to chop the front, and keep the back?

I havent had any luck chopping the front and keeping the back sequence.

Any help’d be great.

Thanks

Migee

For the chop.seqs command, if you run something like chop.seqs(fasta=yourFastaFile, keep=back, numbases=100), mothur will keep the last 100 bases of your sequences. For chop.seqs(fasta=yourFastaFile, keep=front, numbases=100), mothur will keep the first 100 bases of your sequences. Are you trying to remove the first XX number of bases?

Have you looked at the removelast and keepfirst parameters of the trim.seqs command?

Yes, I am trying to remove the first XX bases, including gaps from an aligned fasta file.I invoke,

(fasta=yourFastaFile, keep=back, numbases=100, countgaps=T), but as a result i get an empty fasta file. However, it works fine when i change the keep option to front.

Does the removelast and keepfirst parameters in trim.seqs work for aligned sequence?

Also, I have tested chop.seqs in mothur 1.15 and 1.20

If the fasta file is blank, it means all the sequences were shorter than the numbases you asked for.

Here’s a sample sequence:

AY457915
CCCTTAGAGTTTGATCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAAGACAGATTACTTCGGTTTGAAGTCTTTTATGACTGAGTGGCGGACGGGTGAGTAACGCGTGGGTAACCTGCCTCATACAGGGGGATAGCAGCTGGAAACGGCTGGTAATACCGCATAAGCGCACAGTACCACATGGTACAGTGTGAAAAACTCCGGTGGTATGAGATGGACCCGCGTCTGATTAGCTTGTTGGCGGGGTAACGGCCCACCAAGGCGACGATCAGTAGCCGACCTGAGAGGGTGACCGGCCACATTGGGACTGAGACACGGCCCAGACTCCTACGGGAGGCAGCAGTGGGGAATATTGCACAATGGAGGAAACTCTGATGCAGCGACGCCGCGTGAGTGAAGAAGTAGTTCGCTATGTAAAGCTCTATCAGCAGGGAAGATAGAGACGGTACCTGACTAAGAAGCTCCGGCAAATC

after running chop.seqs(fasta=abrecovery.fasta, keep=back, numbases=100, countgaps=T) it looks like:

AY457915
ATGCAGCGACGCCGCGTGAGTGAAGAAGTAGTTCGCTATGTAAAGCTCTATCAGCAGGGAAGATAGAGACGGTACCTGACTAAGAAGCTCCGGCAAATC

after running chop.seqs(fasta=abrecovery.fasta, keep=front, numbases=100, countgaps=T) it looks like:

AY457915
CCCTTAGAGTTTGATCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAAGACAGATTACTTCGGTTTGAAGT

I am not sure how keep front is doing what you want it to. The trim.seqs command does not work with aligned sequence, and works similarly to chops.seqs. You could use filter.seqs if you create a hard filter file, 0 means remove column 1 means keep column. Here’s an example:

test.filter file:
0000000000000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111

abrecovery.chop.fasta:

AY457915
CCCTTAGAGTTTGATCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAAGACAGATTACTTCGGTTTGAAGT
AY457914
CCCTTAGAGTTTGATCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAGAACAGATTACTTCGGTTTGAAGT

after running filter.seqs(fasta=abrecovery.chop.fasta, hard=test.filter)

abrecovery.chop.filter.fasta:

AY457915
TCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAAGACAGATTACTTCGGTTTGAAGT
AY457914
TCCTGGCTCAGGATGAACGCTGGCGGCGTGCTTAACACATGCAAGTCGAACGAAGCATTTAGAACAGATTACTTCGGTTTGAAGT

I hope this helps,
Sarah

Hi Sarah,
I figured out whats going on. I was counting the number of bases from the front, which kept on giving me the empty file. :oops:

Its solved now.

Thanks