sraデータダウンロード

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
sraデータダウンロード [2021/09/28 15:53] – [MiFishデータの検索] 118.240.79.152sraデータダウンロード [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1
行 1: 行 1:
-# MiFishデータの検索 
- 
-http://sra.dbcls.jp/result.html?target_db=sra&term=mifish&rows=100&sort=Updated&order=desc 
- 
-でヒットしたプロジェクトについて、https://www.ncbi.nlm.nih.gov/sraで、「SRP286684 or DRP006505 or DRP006495 or DRP006192 or SRP267202 or SRP259710 or DRP004174 or DRP003415 or DRP005037 or SRP187190 or DRP004525 or DRP004492 or DRP004089 or SRP113732 or DRP003662 or SRP072060 」などとやって検索。結果をSend to: →Accession ListでSRR, DRRなどの番号を保存。 
- 
-上記の番号を作るには、dbclsのページで開発者ツールのコンソールを開いて下記を入力。 
- 
-``` 
-let arr=[]; document.querySelectorAll(".tabulator-cell[tabulator-field='_id']").forEach(x=>arr.push(x.textContent)); console.log(arr.join(' or ')); 
-``` 
- 
-``` 
-id=DRR125636; curl https://www.ncbi.nlm.nih.gov/biosample/`curl "https://www.ncbi.nlm.nih.gov/sra/?term=$id"|grep SAM|sed 's/SAM/\nSAM/g;'|sed 's/".*//; s/<.*//; s/ .*//'|grep "^SAM"|head -n 1`|grep -i lat|grep -i long 
-``` 
- 
-とやると、経度緯度を抜き出せそう。 
- 
-``` 
-#@/home/yoshitake.kazutoshi/work2/eDNA-db/ 
-for id in `cat SraAccList.txt`; do a=$(curl https://www.ncbi.nlm.nih.gov/biosample/`curl "https://www.ncbi.nlm.nih.gov/sra/?term=$id"|grep SAM|sed 's/SAM/\nSAM/g;'|sed 's/".*//; s/<.*//; s/ .*//'|grep "^SAM"|head -n 1`); echo "$id"$'\t'`echo "$a"|grep -i lat|grep -i long|sed 's/<[^>]*>/\t/g'|sed 's/\t\+/\n/g'|grep -A 1 long|tail -n 1`$'\t'`echo "$a"|grep -i "collection date"|sed 's/<[^>]*>/\t/g'|sed 's/\t\+/\n/g'|grep -A 1 -i "collection date"|tail -n 1`; done > lat-long-date.txt 
- 
-#2回目以降 
-i=SraAccList.txt 
-j=SraAccList.2021-09-28.txt 
-for id in `awk 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2] && a[$1]!=1{print $0}' "$i" "$j"`; do a=$(curl https://www.ncbi.nlm.nih.gov/biosample/`curl "https://www.ncbi.nlm.nih.gov/sra/?term=$id"|grep SAM|sed 's/SAM/\nSAM/g;'|sed 's/".*//; s/<.*//; s/ .*//'|grep "^SAM"|head -n 1`); echo "$id"$'\t'`echo "$a"|grep -i lat|grep -i long|sed 's/<[^>]*>/\t/g'|sed 's/\t\+/\n/g'|grep -A 1 long|tail -n 1`$'\t'`echo "$a"|grep -i "collection date"|sed 's/<[^>]*>/\t/g'|sed 's/\t\+/\n/g'|grep -A 1 -i "collection date"|tail -n 1`; done > $j.lat-long-date.txt 
- 
-cat $i.lat-long-date.txt $j.lat-long-date.txt > $j.lat-long-date.txt.merge 
-``` 
- 
-## 抜き出した経度緯度の確認 
- 
-``` 
-more lat-long-date.txt |cut -f 2|awk '{if($2=="N"){b=""}else{b="-"}; if($4=="W"){a="-"}else{a=""}; print b$1","a$3}' 
-``` 
-で出てきた値をhttps://1-dot-tree-maps-152415.appspot.com/prot/に貼り付けてみる。 
- 
- 
-## FASTQダウンロード 
- 
-``` 
-#@/suikou/files/m512/backup/r311/eDNA/ 
-for i in `cat SraAccList.txt`; do /data/eDNA/bin/prefetch $i --output-file $i.sra; (/data/eDNA/bin/fastq-dump --gzip --split-files $i.sra; rm $i.sra) & done 
- 
-#2回目以降 @/suikou/files/m512/backup/r311/eDNA.2021-09-28 
-i=SraAccList.txt 
-j=SraAccList.2021-09-28.txt 
-for k in `awk 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2] && a[$1]!=1{print $0}' "$i" "$j"`; do /suikou/tool/sratoolkit.2.11.1-centos_linux64/bin/prefetch $k --output-file $k.sra; (/suikou/tool/sratoolkit.2.11.1-centos_linux64/bin/fastq-dump --gzip --split-files $k.sra; rm $k.sra) & done 
-``` 
- 
-150個くらいダウンロードすると止まるようになってしまうので対策 
- 
-``` 
-for k in `awk 'FILENAME==ARGV[1]{a[$1]=1} FILENAME==ARGV[2] && a[$1]!=1{print $0}' "$i" "$j"`; do if [ ! -e ${k}_1.fastq.gz ]; then echo "/suikou/tool/sratoolkit.2.11.1-centos_linux64/bin/prefetch $k --output-file $k.sra; /suikou/tool/sratoolkit.2.11.1-centos_linux64/bin/fastq-dump --gzip --split-files $k.sra; rm $k.sra"; fi;  done > run.sh 
- 
-split -d -l 100 run.sh 
- 
-for i in x*; do bash $i & done; wait 
-``` 
  
  • sraデータダウンロード.1632844419.txt.gz
  • 最終更新: 2021/09/28 15:53
  • by 118.240.79.152