Extract NCBI's refseq assembly accession number from nuccore IDs

2

Hey guys,

I have a list of nuccore IDs in a text file (let's call it file.txt), and want to append the NCBI's refseq assembly accession number next to the nuccore ID, such as this

GCF_000006765.1_NC_002516.2

I've tried with the following command, but only the NCBI's refseq assembly accession number shows up

for file in $(cat file.txt) ; do esearch -db nuccore -query "$file" | elink -db assembly -target assembly | esummary | xtract -pattern DocumentSummary -element Caption,AssemblyAccession,BioSample >> GCFs_nucl_accessions.txt; done

Can you help me out? Thanks!


sequence

• 68 views



Source link