Question: Fastx Barcode Splitter
gravatar for freddy
6.3 years ago by
freddy40 wrote:

I am trying to use fastX barcode splitter perl script on my fastq file. However, every time I run the program I get this message Error: barcode file not specified (use '--bcfile [FILENAME]'). All I am doing is dragging the perl script into terminal, and dragging the fastq file into the terminal and hit enter and that what i get. I also read I had to make mybarcode text file which is BC1 and then tab space then the barcode where does that go. Any help would be appreciated

barcode fastq fastx • 5.3k views
ADD COMMENTlink modified 11 months ago by athira112athira0 • written 6.3 years ago by freddy40
gravatar for JacobS
6.3 years ago by
Cleveland, Ohio
JacobS900 wrote:

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 | --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:

ADD COMMENTlink modified 6.3 years ago • written 6.3 years ago by JacobS900

do I have to be in a particular directory

ADD REPLYlink written 6.3 years ago by freddy40
gravatar for rite2zobayer
4.9 years ago by
rite2zobayer0 wrote:

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 formate. 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. 



ADD COMMENTlink written 4.9 years ago by rite2zobayer0
cat adapters.txt |
while read ADAPTER; do
    cutadapt \
        -g $ADAPTER \
        --trimmed-only \
        -o reads.${ADAPTER}.fastq \
        AllAdapters.fastq |
        tee results.${ADAPTER}.log

If I got you right, you're trying to loop through go through many adapters and extract reads with specific adapter. If so, try the code above (should work). You have to have your adapter sequences in adapters.txt file and fastq reads in AllAdapters.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.

ADD REPLYlink modified 4.9 years ago • written 4.9 years ago by PoGibas4.8k
gravatar for athira112athira
11 months ago by
athira112athira0 wrote:

Thank you ,it is also helpful for me.

ADD COMMENTlink modified 11 months ago • written 11 months ago by athira112athira0
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1963 users visited in the last hour