This is a test version of Biostars. For the public version, visit https://www.biostars.org.
extract barcode from a fastq file

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
seqkit seq -n input.fastq.gz | awk -F ":" '{print $NF}' | awk '!a[$1]++'

1 answer

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.

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

How about ion torrent platform?

Log in to answer this question.