下了一些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文件,若為空則無錯。