情景
想当年,小白强行按照他人的命令格式循环,致使重命名后翻车乱套。
因此,CC师兄教我批量循环,意思是不管id如何,都能使用。
一直以来,都是利用循环批量跑转录组数据。
这两天,同时跑两批次测序数据,一共9个样本。
结果,fastqc后只有17个文件。检查发现文件内容有点问题,开始以为是拷贝错误,检查不是这个问题,想着应该不是大问题就懒得修改。
接着,直接比对看,hisat2读不出来,与fastqc一样的报错。
问题及搜索答案
翻车啦~
看样子是个新问题,百度发现没有相同的问题。
bing一下关键词(If this is a FASTQ file with integer (non-ASCII-encoded) qualities, try re-running with the --integer-quals option),biostars有解答:Question: Error encountered using bowtie2 on Illumina fastq file。
记录一下
fastqc报错:
有个reads没有+,就不是fastq格式(自行百度)
Approx 5% complete for L921-T23_good_2.fq.gz
Approx 10% complete for L921-T23_good_2.fq.gz
Approx 15% complete for L921-T23_good_2.fq.gz
Approx 20% complete for L921-T23_good_2.fq.gz
Approx 25% complete for L921-T23_good_2.fq.gz
Approx 30% complete for L921-T23_good_2.fq.gz
Approx 35% complete for L921-T23_good_2.fq.gz
Failed to process file L921-T23_good_2.fq.gz
uk.ac.babraham.FastQC.Sequence.SequenceFormatException: Midline 'FFFFFTCCTTCTGCTGTTCFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF,FFFFFFFF,FFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:FFFFFFFFFFFFFFFFFFFFFFFFFF:1555:7735:28948 2:N:0:CAACACAG' didn't start with '+'
at uk.ac.babraham.FastQC.Sequence.FastQFile.readNext(FastQFile.java:172)
at uk.ac.babraham.FastQC.Sequence.FastQFile.next(FastQFile.java:125)
at uk.ac.babraham.FastQC.Analysis.AnalysisRunner.run(AnalysisRunner.java:76)
at java.base/java.lang.Thread.run(Thread.java:844)
hisat2报错:
fastq文件中reads格式中有空格
Error: Encountered one or more spaces while parsing the quality string for read A00602:17:HC5JVDSXX:2:1555:32199:29011 2:N:0:CAACACAG. If this is a FASTQ file with integer (non-ASCII-encoded) qualities, try re-running with the --integer-quals option.
terminate called after throwing an instance of 'int'
Aborted (core dumped)
(ERR): hisat2-align exited with value 134
解决方法
方法1:直接删去出问题的那个reads
方法2:可能是压缩解压过程中出现问题,查看一下_1.fq.gz和_2.fq.gz对应的行是什么。
解决尝试:
1.zgrep -A 4 "HC5JVDSXX:2:1555:32199:29011" L921-T23_good_2.fq.gz
-A 数字N 找到所有的匹配行,并显示匹配行后N行
,代表ASCII44,好像也没什么问题
zgrep -A 4 "HC5JVDSXX:2:1555:32199:29011" L921-T23_good_2.fq.gz
@A00602:17:HC5JVDSXX:2:1555:32199:29011 2:N:0:CAACACAG
AAACAACAAAGTAAAATACAAAAATAATACATCAAGACAATTATTATGAAATAACTGATAAAATATATAAAAGCTATAACAAGGAAAGAAAAAATACATAATCAGACAGAAGACAACTAATATAAAATTGTTATATAGATACAAAAATTA
+
,FF,FF:FFF,FFFFFFF,,,,FFFFFFFFF,FFF,,,FFFF,FF:FF,F,FF,F,,,,FFFFFFF,FFF,F,FFFF:F,FFFFF:F,FF:FF,FFFFF,,F,,FF,F,,,F,F,,FFFFF,FFFF:,FFFF:FF:F:F,,,FFFFFFFFFFFFFFFFFFFFF::0:CAAC 2:N:0CAACAGGFFFFFFFFFFFFFFGGCCCTTG2:N:0:8FFFFFFFFF
2.计算1.fq.gz和2.fq.gz分别的reads数目,即是行数的问题
结果:很明显,样本大小的问题(找公司扯皮去)。
计算两个样本reads数目,出问题的样本1.fq.gz和2.fq.gz数目不匹配,所以问题解决。
pengzw@super-server:~/data/pzw$ echo "`zcat L921-T23_good_2.fq.gz| wc -l` / (4*1000000)" | bc -l
gzip: L921-T23_good_2.fq.gz: invalid compressed data--crc error
gzip: L921-T23_good_2.fq.gz: invalid compressed data--length error
11.63124425000000000000
pengzw@super-server:~/data/pzw$ echo "`zcat L921-T23_good_1.fq.gz| wc -l` / (4*1000000)" | bc -l
29.30547300000000000000
pengzw@super-server:~/data/pzw$ echo "`zcat L921-T24_good_1.fq.gz| wc -l` / (4*1000000)" | bc -l
27.08013500000000000000
pengzw@super-server:~/data/pzw$ echo "`zcat L921-T24_good_2.fq.gz| wc -l` / (4*1000000)" | bc -l
27.08013500000000000000
附录:fastq格式解读
参考来源
感谢万能的生信交流论坛biostars:
https://www.biostars.org/p/57590/
https://www.biostars.org/p/246887/