This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Mapping RefSeq accession to assembly ID

Hi,

Is there a way to map RefSeq accession to assembly ID (I need to do it for all the bacteria in RefSeq FTP site) ?

For example: NZ_KN150745.1 -> GCF_001640985.1

Thanks

refseq assembly

2 answers

Unix eutils solution would be:

elink -db nuccore -id "NZ_KN150745.1" -target assembly|esummary|xtract -pattern DocumentSummary -element AssemblyAccession

The fastest solution besides parsing from the sequence files that you might have already downloaded would be to download the *assembly_report.txt files and parse from there,

e.g.

awk 'BEGIN{FS="\t"}{if(!/^#/){print $7}}' GCF_000754995.1_PVA_assembly_report.txt
NZ_KN150745.1
NZ_KN150746.1

Log in to answer this question.