You need to use the actual UNIX command structure instead of dragging and dropping, and you need to provide the barcode text file.
Make a barcode text file just as you specified, either in textedit (sounds like you are on a Mac) or within the terminal, using something like vi
or nano
. If you want to make a text file like this using vi
, follow these direction exactly:
vi my_barcode.txt
This opens the built-in text editor
To type, you need to switch to "insert mode" by pressing the i
key
Type the following, as you specified:
BC1 ATCGTT
(BC1 is the name you are giving the barcode followed by the barcode ID, separated by a tab)
To save and close the document, press esc
to exit "insert mode", and type :wq
to write the file and quit
Now you will have the barcode file you need! So then run your command like this:
cat my_raw_read_file.fastq | fastx_barcode_splitter.pl --bcfile my_barcode.txt
Please keep in mind there are many parameters that you may want to use, so please thoroughly check out the explanation and usage examples found in the documentation.
Do I have to be in a particular directory
Hi JacobS
I also have similar question. I have 56 sample and barcodes. How should I make a barcode file, should I make a file for individual barcode or I can make a single file for 56 sample using tab delimited text format. I made a single barcode file with 56 barcode and try to split the original FASTQ file into 56 small FASTQ file based on barcode but everytime I am getting only one file with first barcode and all the reads match with first barcode. Could you please suggest me is there any away to split it into 56 file.
Thanks
If I got you right, you're trying to
loop throughgo through many adapters and extract reads with specific adapter. If so, try the code above (should work). You have to have your adapter sequences inadapters.txt
file and fastq reads inAllAdapters.fastq
. Also you might need to use (-a
instead of-g
)adapters.txt
example:PS.: If you prefer GNU parallel to old fashioned loop, check out Pierre's tutorial.
Thank you, it is also helpful for me.