4.2 years ago by
I already battled with this problem too... until I found the answer. Of course I assume that your FASTQ files were already demultiplexed, ando also assume that you are attempting to use the
[split_libraries_fastq] command ( see http://qiime.org/scripts/split_libraries_fastq.html ) command. I also assume that you already merged your paired-end reads file into just one.
In the QIIME documentation for this particular command: see [http://qiime.org/scripts/split_libraries_fastq.html] you'll see that there is an option
--barcode_type "not-barcoded" , you can use this one.
Putting things together, the QIIME command I used was:
$FASTQ is the original FASTQ file and
$MAP_FILE is your map file.
I fought with the problems to have to analyze multiple FASTQ files and in order to not have the need to write manually a map file each time I needed to run with a new FASTQ file I wrote the following Python code to generate for me a new "dummy" map file each time I need to run QIIME:
import os, sys
from os import path
fastq_filename = sys.argv
if len(sys.argv) > 2:
new_mapping_file_name = sys.argv
new_mapping_file_name = ".".join(fastq_filename.split(".")[:-1]) + ".map.txt"
mapping_file_header = ['#SampleID','BarcodeSequence','LinkerPrimerSequence','Description','File']
mapping_file_line1 = ['sample.1','','','single_file',path.basename(fastq_filename)]
with open(new_mapping_file_name,"w") as f:
f.write("\t".join(mapping_file_header) + "\n")
f.write("\t".join(mapping_file_line1) + "\n")
print "New mapping file is ", new_mapping_file_name
if __name__ == '__main__':
This script accept two arguments: the first being your FASTQ filename and the second the name you wish to give the map file.
As you can see in the code the map file is a tab-separated values file with just two lines: one is for the headers and the second has empty contents for the 2nd and 3rd columns. 'sample.1' is a dummy name I chose to give to the sample you can modify it at will: QIIME won't bother with that I think but if you change it, just remember to change the sample name accordingly in the command line option