Module | Bio::NCBI::REST::EFetch::Methods
In: | lib/bio/io/ncbirest.rb

### Methods

journal omim pmc pubmed sequence taxonomy

### Public Instance methods

journal(ids, format = "full", hash = {})

Retrieve journal entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html

## Usage

     Bio::NCBI::REST::EFetch.journal(21854)

     list = [21854, 21855]
     Bio::NCBI::REST::EFetch.journal(list)
     Bio::NCBI::REST::EFetch.journal(list, "xml")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.journal(list)
     ncbi.journal(list, "xml")

Arguments:

- ids: list of journal entry IDs (required)
- format: "full", "xml"

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 543
    543:       def journal(ids, format = "full", hash = {})
    544:         case format
    545:         when "xml"
    546:           format = "full"
    547:           mode = "xml"
    548:         else
    549:           mode = "text"
    550:         end
    551:         opts = { "db" => "journals", "rettype" => format, "retmode" => mode }
    552:         opts.update(hash)
    553:         Bio::NCBI::REST.efetch(ids, opts)
    554:       end

omim(ids, format = "detailed", hash = {})

Retrieve OMIM entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html

## Usage

     Bio::NCBI::REST::EFetch.omim(143100)

     list = [143100, 602260]
     Bio::NCBI::REST::EFetch.omim(list)
     Bio::NCBI::REST::EFetch.omim(list, "xml")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.omim(list)
     ncbi.omim(list, "xml")

Arguments:

- ids: list of OMIM entry IDs (required)
- format: "docsum", "synopsis", "variants", "detailed", "linkout", "xml"

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 578
    578:       def omim(ids, format = "detailed", hash = {})
    579:         case format
    580:         when "xml"
    581:           format = "full"
    582:           mode = "xml"
    583:         when "linkout"
    584:           format = "ExternalLink"
    585:           mode = "text"
    586:         else
    587:           mode = "text"
    588:         end
    589:         opts = { "db" => "omim", "rettype" => format, "retmode" => mode }
    590:         opts.update(hash)
    591:         Bio::NCBI::REST.efetch(ids, opts)
    592:       end

pmc(ids, format = "docsum", hash = {})

Retrieve PubMed Central entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html

## Usage

     Bio::NCBI::REST::EFetch.pmc(1360101)
     Bio::NCBI::REST::EFetch.pmc("1360101,534663")

     list = [1360101, 534663]
     Bio::NCBI::REST::EFetch.pmc(list)
     Bio::NCBI::REST::EFetch.pmc(list, "xml")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.pmc(list)
     ncbi.pmc(list, "xml")

Arguments:

- ids: list of PubMed Central entry IDs (required)
- format: "docsum", "xml"

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 509
    509:       def pmc(ids, format = "docsum", hash = {})
    510:         case format
    511:         when "xml"
    512:           format = "medline"
    513:           mode = "xml"
    514:         else
    515:           mode = "text"
    516:         end
    517:         opts = { "db" => "pmc", "rettype" => format, "retmode" => mode }
    518:         Bio::NCBI::REST.efetch(ids, opts)
    519:       end

pubmed(ids, format = "medline", hash = {})

Retrieve PubMed entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchlit_help.html

## Usage

     Bio::NCBI::REST::EFetch.pubmed(15496913)
     Bio::NCBI::REST::EFetch.pubmed("15496913,11181995")

     list = [15496913, 11181995]
     Bio::NCBI::REST::EFetch.pubmed(list)
     Bio::NCBI::REST::EFetch.pubmed(list, "abstract")
     Bio::NCBI::REST::EFetch.pubmed(list, "citation")
     Bio::NCBI::REST::EFetch.pubmed(list, "medline")
     Bio::NCBI::REST::EFetch.pubmed(list, "xml")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.pubmed(list)
     ncbi.pubmed(list, "abstract")
     ncbi.pubmed(list, "citation")
     ncbi.pubmed(list, "medline")
     ncbi.pubmed(list, "xml")

Arguments:

- ids: list of PubMed entry IDs (required)
- format: "abstract", "citation", "medline", "xml"

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 473
    473:       def pubmed(ids, format = "medline", hash = {})
    474:         case format
    475:         when "xml"
    476:           format = "medline"
    477:           mode = "xml"
    478:         else
    479:           mode = "text"
    480:         end
    481:         opts = { "db" => "pubmed", "rettype" => format, "retmode" => mode }
    482:         opts.update(hash)
    483:         Bio::NCBI::REST.efetch(ids, opts)
    484:       end

sequence(ids, format = "gb", hash = {})

Retrieve sequence entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchseq_help.html

     sequences = gene + genome + nucleotide + protein + popset + snp
     nucleotide = nuccore + nucest + nucgss

format (rettype):

- native all but Gene Default format for viewing sequences
- fasta all sequence FASTA view of a sequence
- gb NA sequence GenBank view for sequences
- gbc NA sequence INSDSeq structured flat file
- gbwithparts NA sequence GenBank CON division with sequences
- est dbEST sequence EST Report
- gss dbGSS sequence GSS Report
- gp AA sequence GenPept view
- gpc AA sequence INSDSeq structured flat file
- seqid all sequence Convert GIs into seqids
- acc all sequence Convert GIs into accessions
- chr dbSNP only SNP Chromosome Report
- flt dbSNP only SNP Flat File report
- rsr dbSNP only SNP RS Cluster report
- brief dbSNP only SNP ID list
- docset dbSNP only SNP RS summary

## Usage

     Bio::NCBI::REST::EFetch.sequence("123,U12345,U12345.1,gb|U12345|")

     list = [123, "U12345.1", "gb|U12345|"]
     Bio::NCBI::REST::EFetch.sequence(list)
     Bio::NCBI::REST::EFetch.sequence(list, "fasta")
     Bio::NCBI::REST::EFetch.sequence(list, "acc")
     Bio::NCBI::REST::EFetch.sequence(list, "xml")

     Bio::NCBI::REST::EFetch.sequence("AE009950")
     Bio::NCBI::REST::EFetch.sequence("AE009950", "gbwithparts")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.sequence("123,U12345,U12345.1,gb|U12345|")
     ncbi.sequence(list)
     ncbi.sequence(list, "fasta")
     ncbi.sequence(list, "acc")
     ncbi.sequence(list, "xml")
     ncbi.sequence("AE009950")
     ncbi.sequence("AE009950", "gbwithparts")

Arguments:

- ids: list of NCBI entry IDs (required)
- format: "gb", "gbc", "fasta", "acc", "xml" etc.

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 434
    434:       def sequence(ids, format = "gb", hash = {})
    435:         case format
    436:         when "xml"
    437:           format = "gbc"
    438:         end
    439:         opts = { "db" => "sequences", "rettype" => format }
    440:         opts.update(hash)
    441:         Bio::NCBI::REST.efetch(ids, opts)
    442:       end

taxonomy(ids, format = "docsum", hash = {})

Retrieve taxonomy entries by given IDs using E-Utils (efetch).

- eutils.ncbi.nlm.nih.gov/entrez/query/static/efetchtax_help.html

## Usage

     Bio::NCBI::REST::EFetch.taxonomy(42241)

     list = [232323, 290179, 286681]
     Bio::NCBI::REST::EFetch.taxonomy(list)
     Bio::NCBI::REST::EFetch.taxonomy(list, "xml")

     ncbi = Bio::NCBI::REST::EFetch.new
     ncbi.taxonomy(list)
     ncbi.taxonomy(list, "xml")

Arguments:

- ids: list of Taxonomy entry IDs (required)
- format: "brief", "docsum", "xml"

Returns: | String

[Source]

         # File lib/bio/io/ncbirest.rb, line 616
    616:       def taxonomy(ids, format = "docsum", hash = {})
    617:         case format
    618:         when "xml"
    619:           format = "full"
    620:           mode = "xml"
    621:         else
    622:           mode = "text"
    623:         end
    624:         opts = { "db" => "taxonomy", "rettype" => format, "retmode" => mode }
    625:         Bio::NCBI::REST.efetch(ids, opts)
    626:       end

[Validate]