NCBI SRA数据如何进行md5校验?

下了一些sra数据库中的公共数据,因为pretech和aspera不稳定,稍微大点的文件经常传断,部分文件我只能通过本地下载再上传。

那么问题来了,sra没有md5校验,我怎么知道我数据的完整性,尤其是通过本地下载的那些数据?

网上查了下是说,sra是自带md5校验的(The SRA archive format ("vdb") contains an md5 checksum as well as a few other consistency checks (I think). The sra-toolkit has a utility, vdb-validate which will report any errors in the data, and perform an md5 checksum comparison ),但我还是不放心。

同样是网上的方法。如果你保留了SRA文件,可以用以下命令来检查:

 for i in `ls *.gz`; 
 do 
 SRR=${i%%_*}; 
 echo $SRR >> list.txt; 
 done

 for j in `sort -u list.txt`
 do
 vdb-validate $j
 done

如果你已经删掉了SRA文件,但生成了fastq文件,通过fastq-dump --split-files --gzip SRR949210方法得到的。那么,你可以尝试以下命令:

 for i in `ls *fastq.gz`; 
 do 
 gunzip -t $i 2 > $i.err
 done
 find . -name "*err" -type f -size +0c -exec -larth {} \;
 #注意结尾反斜杠和分号不能少
#exec是个有用的命令。

你会得到一系列fastq.gz.err文件,若为空则无错。

https://www.biostars.org/p/147148/

posted @ 2021-03-05 11:15  生物信息与育种  阅读(1784)  评论(0编辑  收藏  举报