extract barcode from a fastq file
1
0
Entering edit mode
5 months ago
najibveto ▴ 70

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 • 453 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
1
Entering edit mode
5 months ago
h.mon 34k

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

Login before adding your answer.

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