Removing primers from multiplexed fastq files

34 views
Skip to first unread message

Jacob Cram

unread,
Aug 9, 2017, 5:54:22 PM8/9/17
to Qiime 1 Forum
I have some multiplexed 454 data and in order to get this into dada2, it needs to be in fastq format. It also has to have the primers trimmed off. I have a pipeline that seems to do the former, but I can't tell if the later happens, or if not what I need to run to remove the primers.

First I convert the qual and fna files into a fastq file with

      convert_fastaqual_fastq.py -f test.fna -q test.qual -o test.fastq

Then I seperate the barcodes from everything else

      extract_barcodes.py -f test.fastq -o test_sep -l 6

Then I demultiplex the fastq file

      split_libraries_fastq.py -i test_sep/reads.fastq -b test_sep/barcodes.fastq -m test_map.csv --barcode_type 6 -o test_demult --phred_offset 33 --start_seq_id 100000 --store_demultiplexed_fastq

It seems like this pipeline should give me demultiplexed reads with quality scores, but with the primers still in place. If I was using split_libraries.py on regular fasta data I would have specified the -z truncate_remove option to get rid of the reverse primers (presumably that already gets rid of the forward primers). Am I missing something?

I can include test files and qiime version on request, but I think this question is philosophical enough not to require them.

Jose Antonio Navas Molina

unread,
Aug 10, 2017, 11:12:36 AM8/10/17
to Qiime 1 Forum
Hi Jacob,

To remove the primers you can use "extract_barcodes.py" with the length of your primer and simply discard the output "barcodes" file.

Hope this helps!

Jacob Cram

unread,
Aug 10, 2017, 6:34:55 PM8/10/17
to Qiime 1 Forum
Thanks! So given the pipeline I specified above, am I correct in my understanding that if my sequence goes

barcode--forwardlinker--sequence--reverse

and I ran the pipeline above, both the forwardlinker and reverse sequences would still be there? In that case I would run extract_barcodes a second time, and that would remove the forwardlinker primer. And then I'll figure out how to get rid of the reverse. Right?

Jose Antonio Navas Molina

unread,
Aug 11, 2017, 10:12:58 AM8/11/17
to Qiime 1 Forum
That's correct.
Reply all
Reply to author
Forward
0 new messages