Automating Qiime Split Libraries
0
0
Entering edit mode
8.0 years ago
espop23 ▴ 60

I have 100s of joined.fastq.extendedFrags.fastqfiles that I want to run split libraries on. It works when I do this for each file:

split_libraries_fastq.py -i 03142103_joined.fastq.extendedFrags.fastq --sample_id 03142103 -o split_lib_03142103/ -m solo\ mapping\ files//03142103_mapping.txt --barcode_type 'not-barcoded'

However, I would like to automate it in the terminal so that I can simply apply this to all the files. Any suggestions on what I can add to my script to do this? All files are numbered like the example above.

I have tried this, but it comes up with an error saying it cant find the solo mapping files folder or the mapping files. Not sure how to identify these files in the syntax..

for i in $(ls *_joined.fastq.extendedFrags.fastq); do split_libraries_fastq.py ${i}_joined.fastq.extendedFrags.fastq —sample_id ${i} -o $split_lib_{i} -m solo\mapping\files//{i}_mapping.txt —barcode_type ’not-barcoded’ ; done

Thank you!

qiime split libraries terminal • 2.2k views
ADD COMMENT
1
Entering edit mode

Not a good idea to have spaces in file/directory names while working with *nix. It looks like you are escaping the space but it is not actually present in your for loop code. -m solo\ mapping\ files

ADD REPLY

Login before adding your answer.

Traffic: 1866 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6