2
$\begingroup$

I want to search GenBank entries by gene product and taxon id.

Taking the 16s rRNA as an example for a gene and Piscirickettsia salmonis (taxon:1238) for a taxon:

https://www.ncbi.nlm.nih.gov/nuccore/219846389

How do I retrieve all GenBank entries that have the following properties /product="16S ribosomal RNA" and /db_xref="taxon:1238"?

Update: It would be appreciated if you also showed me how to retrieve GenBank entries like this, which don't have an exact match to the "16S ribosomal RNA" product.

$\endgroup$
2
  • $\begingroup$ The research study that submitted this sequence was in chile, but I think I've seen other sequences for the same organism, also obtained from chile. $\endgroup$ Apr 21, 2023 at 6:46
  • $\begingroup$ "The salmon, which displayed typical disease signs, was collected from a seawater netpen in southern Chile where an epizootic was in progress. " microbiologyresearch.org/content/journal/ijsem/10.1099/… $\endgroup$ Apr 21, 2023 at 6:50

2 Answers 2

1
$\begingroup$

This can be done using the NCBI eutils command-line tools. For taxa, the correct incantation for the search string is txid<taxID>[Organism] (assuming you want that taxon and all its children), but I haven't found the right one for the product field. However, it can be approximated by searching for a string in the tile line via <search>[TITL]. This seems to work fairly well, assuming you want the fasta files (the -format argument can be changed to genbank if you want the genbank record instead):

$ esearch -db nuccore -query "txid1238[Organism] AND 16s[TITL]" | efetch -format fasta | grep -A 1 '^>' | head
>MW433822.1 Piscirickettsia salmonis strain HRV16 16S ribosomal RNA gene, partial sequence
TCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAACATGACTAGCTTGCTAGTTGA
--
>MW433821.1 Piscirickettsia salmonis strain HRV13 16S ribosomal RNA gene, partial sequence
AATTTCAGGTGTAGCGGTGAAATGCGTAGATATCTGAAGGAACACCGGTGGCGAAGGCGACTTTCTGGAT
--
>MN023100.1 Piscirickettsia salmonis clone Ps18621-6 16S ribosomal RNA gene, partial sequence
GCTTGCTAGATGCTGACGAGTGGCGGACGGGTGAGTAACGCGTGGGAATTTACCTTTTAGTGGGGGATAA
--
>MN023099.1 Piscirickettsia salmonis clone Ps18429-3 16S ribosomal RNA gene, partial sequence

Unfortunately I can't find anything for searching specifically in the features of an NCBI record. There'll be some way to do it; I just don't know how.

Based on the updated request, it's possible to do a full-text search through the entire metadata (e.g. for 16S ribosomal RNA) by adding the search term without specifying a field. Depending on what you want to do with the results, and how many were produced, it could be easy enough to manually unwanted sequences (e.g. whole genome shotgun assemblies, or chimeric products):

$ esearch -db nuccore -query "txid1238[Organism:exp] AND (16S ribosomal RNA)" | efetch -format fasta | grep -A 1 '^>' --no-group-separator | tail -n 12
>EU170254.1 Piscirickettsia salmonis strain NVI 5692 16S ribosomal RNA gene, partial sequence
CACATGCAAGTCGAACGGTAGCAGATCTAGCTTGCTAGATGCTGACGAGTGGCGGACGGGTGAGTAACGC
>U36941.1 Piscirickettsia salmonis 16S ribosomal RNA gene, complete sequence
AGAGTTTGATCCTGGCTCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAGCAGAT
>U55015.1 Piscirickettsia salmonis 16S ribosomal RNA gene, complete sequence
AGAGTTTGATCCTGGCTCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAGCAGAT
>U36942.1 Piscirickettsia salmonis strain NOR-92 16S ribosomal RNA gene, complete sequence
AGAGTTTGATCCTGGCTCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAGCAGAT
>U36940.1 Piscirickettsia salmonis strain EM-90 16S ribosomal RNA gene, complete sequence
AGAGTTTGATCATGGCTCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAGCAGAT
>U36915.1 Piscirickettsia salmonis 16S ribosomal RNA gene, complete sequence
AGAGTTTGATCATGGCTCAGATTGAACGCTGGTGGCATGCTTAACACATGCAAGTCGAACGGTAGCAGAT

FWIW, here's the list of all the searchable fields in the nuccore database:

$ einfo -db nuccore -fields
ACCN    Accession
ALL     All Fields
ASSM    Assembly
AUTH    Author
BIOS    BioSample
BRD     Breed
COMP    Component Accession
CULT    Cultivar
DIV     Division
ECNO    EC/RN Number
FILT    Filter
FKEY    Feature key
GENE    Gene Name
GPRJ    BioProject
ISOL    Isolate
ISS     Issue
JOUR    Journal
KYWD    Keyword
MDAT    Modification Date
ORGN    Organism
PACC    Primary Accession
PAGE    Page Number
PDAT    Publication Date
PORG    Primary Organism
PROP    Properties
PROT    Protein Name
SLEN    Sequence Length
SQID    SeqID String
STRN    Strain
SUBS    Substance Name
TITL    Title
UID     UID
VOL     Volume
WORD    Text Word
$\endgroup$
0
-1
$\begingroup$

To specifically answer the question the search that is used is

((1000:1500[Sequence Length]) AND Piscirickettsia salmonis[Organism]) AND 16S

That is place here and select 'nucleotide'.

Genbank uses taxon id internally, it's a database reference not a biological code, and can't be used as input - its completely unique to Genbank. Anyway the search results in 276 records, and are shown here, this is near full length 16S thats cool.

Clarification [taxon id] is not a field in Genbank, it's a database code, the tag is [organism]. Genbank knows what 16S is - its the most famous genetic marker in microbiology - so there is no need for a [tag]

At the base of the page there is a "Send to:" option (right hand corner). Click and then select "File". The 276 sequences will then download.

If [Sequence length] is removed this result 3820 sequences here. There are some 16S-23S sequences on the database result in a 2,198 bp length, so extending the sequence length will trap these by 1000:2200[Sequence Length]. There are 431 bp sequences - which are not cool at all, probably a lot.

The approach used below identifies nearly 1000 is complicated it traps everything of relevance which is close to full length and cuts out the 16S from 2,198 bp length and beyond. The 431 bp partial 16S sequences have been removed. Thus the numbers below are the idealised data set, so its about 1000 sequences and the tree will guide you into major groups - which is probably what is wanted, i.e. to place a 16S from a local salmon farm into the broader clade diversity of the species.


The answer is for this species is there are around a thousand sequences on Genbank for the species of interest which are split into 6 identical genotypic groups. The demonstration of the species is represented by the scale bar, i.e. it is very little genetic diversity.

enter image description here

Cycloclausticus sp is the outgroup and each member of the in-group is Piscirickettsia salmonis


Just to address the comments

  • "Cycloclasticus"? The question is not specific to /db_xref="taxon:1238"

It is specific there's a fundamental principle of trees. A tree needs a root, all the ingroups are all Piscirickettsia salmonis. Without a root, i.e. something that is not Piscirickettsia salmonis there is no direction in the tree. Cycloclasticus is a good or reasonable root.

  • how do i access this interface?

Its complicated to explain and its a different question.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.