extract barcode from a fastq file
1
1
Entering edit mode
2.7 years ago
najibveto ▴ 120

hello, sorry for disturbing. i would like to know how to extract barcode from a fastq file. my fastq file is as follow; enter image description here

thank you for your help.

fastq barcode • 2.1k views
ADD COMMENT
1
Entering edit mode
seqkit seq -n input.fastq.gz | awk -F ":" '{print $NF}' | awk '!a[$1]++'
ADD REPLY
0
Entering edit mode

thank you for your help.

ADD REPLY
3
Entering edit mode
2.7 years ago
h.mon 35k

Assuming you are talking about Illumina barcodes, you can extract them from the header lines:

zcat file.fastq.gz \
  | awk 'NR%4==1' \
  | awk -F":" '{print $(NF)}' \
  | sort \
  | uniq -c

As others pointed out, you didn't provide information enough, and using pictures to illustrate text isn't a good practice.

ADD COMMENT
0
Entering edit mode

thank you for your reply. sorry next time I will provide a text file and more information.

ADD REPLY
0
Entering edit mode

How about ion torrent platform?

ADD REPLY

Login before adding your answer.

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