View Single Post
Old 01-22-2015, 09:35 PM   #7
Brian Bushnell
Super Moderator
 
Location: Walnut Creek, CA

Join Date: Jan 2014
Posts: 2,695
Default

Hi arkilis,

The standard way to split files with bbsplit is like this:

(index)
bbsplit.sh ref=x.fa,y.fa,z.fa,...

(map)
bbsplit.sh in=reads.fq basename=out_%.sam

If you change the name of the output files to ".fq", it will come out in fastq format, which is often more useful, though reformat.sh can convert sam to fastq. Anyway, when you run bbsplit like this, it will produce one output file per reference, containing all of the reads that match that reference better than the others. In this case, it would produce 3 output files - out_x.sam, out_y.sam, and out_z.sam. You could examine the contents of the specific sam files to see exactly which contig/scaffold the read hit, but if you just need the reads split by reference file, that's how you do it.
Brian Bushnell is offline   Reply With Quote