Some tools require both reads to have the same name (or least they want the part of the read name before the first whitespace to be the same).
FASTQ header correction to remove .1 and .2 from paired end - SRA files
From this step as raw data:
@ERR797585640.1.1 1 length=151
ATATCGGGACGTGCGATCAGCACAAGCCGGCTATCGGTGTGGCGC
I have converted till this:
Read 1:
@ERR797585640.1.1
ATATCGGGACGTGCGATCAGCACAAGCCGGCTATCGGTGT
Read 2:
@ERR797585640.1.2
ATATCGGGACGTGCGATCAGCACAAGCCGGCTATCGGTGT
I have taken ERR and SRA samples for RnD.
But I want to keep only format as:
Read 1:
@ERR797585640.1
ATATCGGGACGTGCGATCAGCACAAGCCGGCTATCGGTGT
Read 2:
@ERR797585640.1
ATATCGGGACGTGCGATCAGCACAAGCCGGCTATCGGTGT
Kindly provide any commands or suggestion to remove and make changes for fastq headers
• 1,539 views
•
link
1 answer
Not sure it's a good idea to name both reads the same, but here's a perl oneliner to change your FASTQ headers:
perl -lne 'if(/^(@[^\.)]+\.\d+)\.\d/){ print "$1" } else { print }'
If you want to make sure only headers are affected, in case quality line starts with at:
perl -lne 'if($.%4==1 && /^(@[^\.)]+\.\d+)\.\d/){ print "$1" } else { print }'
• 0 views
•
link
• 0 views
•
link
IMPORTANT SIDE NOTE: This can break SRA download tools if you upload your files with identical read names. Surprisingly NCBI allows(ed?) this....I hope they changed it by now.
• 0 views
•
link
Log in to answer this question.
how ? what was the command ?
I have used:
But i need further guidance for next step
you cannot use '@' as the signal for the first line of a fastq file as @ can also be a symbol of quality
Please stop using "convert", you're using it wrong and your sentences don't make any sense.