Command to trim (but keep) sequences?

I am merging two data sets. After aligning the data, data set one has a start position of 1968 and an end position of 11550. Data set two has a start position of 1968 and an end position of 9382. I would like to trim all of dataset one so it only contains the information from start position 1968 to end position of 9382, so that both datasets are the same length. Is there a way to do this? I’ve been looking at screen.seqs and trim.seqs but it doesn’t appear that they will do what I want.

I’m assuming you haven’t already run filter.seqs on these data and they used the same reference alignment…

You’d do screen.seqs with start=1968 and end=9382, then run filter.seqs with vertical=T, trump=.

Pat

Would that actually trim the sequences though? I was under the impression that instead that would physically remove any sequences that ended at a point after position 9282, rather than just trimming them.

What about using pcr.seqs command to trim my aligned fasta file that contained both data sets, setting the parameters to start=1968 and end=9382?

As always, thanks for the help!

The screen.seqs step would remove sequences that start after 1968 and end before 9382. Then filter.seqs would trim the remaining sequences to those positions so that the alignments are book ended. You could also do pcr.seqs with those coordinates and then align to the pcr’d data - but, you’d still need screen.seqs because you’ll get reads that start late or end early or get vaporized because they don’t align (i.e. non-specific amplicon data).

Pat