bioinfo:batch_download_of_ncbi_genomes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bioinfo:batch_download_of_ncbi_genomes [2023/06/22 15:10] – [다운로드한 파일 이름의 일괄 변경] hyjeong | bioinfo:batch_download_of_ncbi_genomes [2025/01/16 10:30] (current) – [다운로드 전용 유틸리티를 사용하는 방법] hyjeong | ||
---|---|---|---|
Line 6: | Line 6: | ||
===== 다운로드 전용 유틸리티를 사용하는 방법 ===== | ===== 다운로드 전용 유틸리티를 사용하는 방법 ===== | ||
- | 간단한 방법으로는 [[https:// | + | 간단한 방법으로는 [[https:// |
$ ncbi-genome-download bacteria # RefSeq의 모든 박테리아 유전체 다운로드 | $ ncbi-genome-download bacteria # RefSeq의 모든 박테리아 유전체 다운로드 | ||
- | $ ncbi-genome-download | + | $ ncbi-genome-download |
# 실제 다운로드는 하지 않고 accession number와 간단한 정보만 출력(' | # 실제 다운로드는 하지 않고 accession number와 간단한 정보만 출력(' | ||
$ ncbi-genome-download --dry-run --genus " | $ ncbi-genome-download --dry-run --genus " | ||
$ ncbi-genome-download --type-materials type, | $ ncbi-genome-download --type-materials type, | ||
- | $ ncbi-genome-download --format-fasta --taxid 511145 bacteria | + | $ ncbi-genome-download --format fasta --taxid 511145 bacteria |
$ ncbi-genome-download --assembly-accessions GCF_000146875.3, | $ ncbi-genome-download --assembly-accessions GCF_000146875.3, | ||
Line 31: | Line 31: | ||
$ curl -o assembly_summary_refseq_bacteria_`date +%Y-%m-%d`.txt \ | $ curl -o assembly_summary_refseq_bacteria_`date +%Y-%m-%d`.txt \ | ||
- | https:// | + | |
- | 특정 종(예: Klebsiella pneumoniae)에 대하여 assembly level = ‘Complete genome’혹은 | + | 특정 종(예: Klebsiella pneumoniae)에 대하여 assembly level = 'Complete genome' |
$ awk -F " | $ awk -F " | ||
Line 73: | Line 73: | ||
# GCF_000001405.38_GRCh38.p12_genomic.fna.gz -> GCF_000001405.38.fna.gz로 변경 | # GCF_000001405.38_GRCh38.p12_genomic.fna.gz -> GCF_000001405.38.fna.gz로 변경 | ||
+ | 또는 학명과 균주 이름으로 파일이름을 바꾸는 것도 좋다. 이를 위해서 [[: | ||
+ | |||
+ | $ my_rename1.pl ../list_all > id2name | ||
+ | |||
+ | my_rename1.pl 스크립트는 list_all 파일(assembly summary에서 선별된 row로 이루어진 부분집합)의 8번 컬럼(organism_name; | ||
+ | |||
+ | id2name 파일의 두 번째 컬럼이 변경된 파일의 이름 base로 쓰일 것이므로 공백이나 특수문자 등 적합하지 않은 문자가 없도록 적절히 편집하여 id2name.mod로 저장한다. 괄호 표시도 밑줄로 대체하는 것이 바람직하다. 간혹 동일한 균주를 서로 다른 곳에서 2회 이상 시퀀싱하여 등록한 것을 발견하게 된다. 이런 것은 바뀐 후의 파일 이름이 동일해져 버리므로, | ||
+ | |||
+ | $ ls *fna | while read f; do my_rename2.pl id2name.mod $f; done |
bioinfo/batch_download_of_ncbi_genomes.1687414258.txt.gz · Last modified: 2023/06/22 15:10 by hyjeong