This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Is there any written script to extract Organism name,SRA information and Assembly from accession id?

Hi, I am working on 200 different organisms from NCBI. I have Accession id ( e.g. NZ_KQ956078.1) of those organisms but need the corresponding information too (such as SRA, Assembly number, Organism name). Getting that information from NCBI is easy but doing one by one is time killing. So, it would be helpful to have a script to obtain such information from NCBI at once. Is there any script available?

I have very little basic on shell scripting, so can't write my own script to do this job. Expert help is needed!

assembly ncbi extractinformation

Have you check if eutils does this? You can use web-based eutils querying, the eutils command line or even the R package reutils.

Hi, I was trying the following command to get information on Assembly and organism name, but it retrieved nothing. How can I map back the NZ id with the assembly? And any idea how can I download *assembly_report.txt" file?

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

This works fine for me. What are you seeing?

Just nothing. No error message but it produces no results. I expect it will retrieve the corresponding GCF id, but I didn't get that.

Can you run the elink alone and check if you get results? Maybe then incrementally add each command in the pipeline.

The output

-bash-4.2$ elink -db nuccore -id "NZ_KQ956078.1" -target Assembly

<ENTREZ_DIRECT>
    <Db>Assembly</Db>
    <WebEnv>NCID_1_111176213_130.14.18.34_9002_1540939702_1874716631_0MetA0_S_MegaStore</WebEnv>
    <QueryKey>2</QueryKey>
    <Count>1</Count>
    <Step>1</Step>
</ENTREZ_DIRECT>

incrementally add each command in the pipeline

like I said :-)

I think most, if not all of that information would be available in the assembly_summary files. I’m not aware of any preexisting tools, but parsing that file would be fairly trivial as it is just a tabular file.

You could probably even read it in to Excel if you’re really that averse to scripting anything.^


^Disclaimer: I do not endorse the use Excel for bioinformatics.

0 answers

No answers yet.

Log in to answer this question.