Avoid sed -i when you are not sure that your command will be the right one. If you do something incorrectly, it will corrupt your original file. When trying different sed commands, you may want to run
sed 's/from/to/g' <input> | head (to only look at the first lines)
or
sed 's/from/to/g' <input> | head | less -S ( in the case of long lines)
Check your fastq format. If you have Phred +64 (Illumina 1.3 or 1.5) you can run into a encoding problem:
in Phred +64, '_' is a valid encoding for a quality score, '/' is not. Thus, you'll need to check if you are in the header-line or not (e.g. using awk: awk '{if(NR%4==1){gsub(/_/,"/")}; print}'' )
I agree that you should verify the absence of _ in your quality sequence before to simply go for a sed 's/_/\//g'. because if there is you will change all your quality score coded _ by a new existing score \
What have you tried so far?
based of some forum, I tried
sed -i 's/_///g' myfile
but I'm not pro of linux I don't know how to do..Avoid
sed -i
when you are not sure that your command will be the right one. If you do something incorrectly, it will corrupt your original file. When trying different sed commands, you may want to runsed 's/from/to/g' <input> | head
(to only look at the first lines)or
sed 's/from/to/g' <input> | head | less -S
( in the case of long lines)