NAL-i5K / tripal_eutils

ncbi loader via the eutils interface
GNU General Public License v3.0
4 stars 3 forks source link

functional testing: biosamples #99

Closed bradfordcondon closed 5 years ago

bradfordcondon commented 5 years ago

test accession: 744358 https://www.ncbi.nlm.nih.gov/biosample/744358

Test using the form input.

created objects

organism

select * from chado.organism;
2574    B. mutus    Bos mutus

biomaterial

select * from chado.biomaterial;
2349    2574    455     SAMN00744358

analysis

none created.

biomaterial properties

select * from chado.biomaterialprop bp INNER JOIN chado.cvterm cvt ON  cvt.cvterm_id = bp.type_id ;
biomaterialprop_id  biomaterial_id  type_id value   rank    cvterm_id   cv_id   name    definition  dbxref_id   is_obsolete is_relationshiptype
6187    2349    9724    yakQH1  0   9724    1748    breed       23510   0   0
6188    2349    11997   BGI-yakQH1  0   11997   1748    submitter_provided_accession        27861   00
6189    2349    10277   <BioSample submission_date="2011-10-26T05:31:04.493" last_update="2013-10-31T11:18:50.160" publication_date="2012-04-12T15:08:48.567" access="public" id="744358" accession="SAMN00744358">   <Ids>     <Id db="BioSample" is_primary="1">SAMN00744358</Id>     <Id db="BGI" db_label="Sample name">BGI-yakQH1</Id>     <Id db="SRA">SRS269061</Id>   </Ids>   <Description>     <Title>Bos mutus</Title>     <Organism taxonomy_id="72004" taxonomy_name="Bos mutus"/>     <Comment>       <Paragraph>Bos mutus yakQH1</Paragraph>     </Comment>   </Description>   <Owner>     <Name abbreviation="BGI">Beijing Genome Institute</Name>   </Owner>   <Models>     <Model>Generic</Model>   </Models>   <Package display_name="Generic">Generic.1.0</Package>   <Attributes>     <Attribute attribute_name="breed" harmonized_name="breed" display_name="breed">yakQH1</Attribute>   </Attributes>   <Status status="live" when="2012-05-14T08:37:47.960"/> </BioSample>  0   10277   2   full_ncbi_xml       24507   00
(3 rows)

dbxrefs

select * from chado.biomaterial_dbxref bdx INNER JOIN chado.dbxref dx ON dx.dbxref_id = bdx.dbxref_id;
biomaterial_dbxref_id   biomaterial_id  dbxref_id   dbxref_id   db_id   accession   version description
1838    2349    30446   30446   1733    SAMN00744358
1839    2349    34712   34712   4263    SRS269061

contacts

455     Beijing Genome Institute

projects

none created

warnings

Undefined variable: site_name in TaxonomyImporter->initTree() (line 275 of /Users/bc/tripal/sites/all/modules/tripal/tripal_chado/includes/TripalImporter/TaxonomyImporter.inc).
Notice: Undefined variable: num_handled in TaxonomyImporter->run() (line 239 of /Users/bc/tripal/sites/all/modules/tripal/tripal_chado/includes/TripalImporter/TaxonomyImporter.inc).
Notice: Use of undefined constant NCBITaxon - assumed 'NCBITaxon' in TaxonomyImporter->findOrganism() (line 517 of /Users/bc/tripal/sites/all/modules/tripal/tripal_chado/includes/TripalImporter/TaxonomyImporter.inc).
Notice: Trying to get property of non-object in TaxonomyImporter->findOrganism() (line 554 of /Users/bc/tripal/sites/all/modules/tripal/tripal_chado/includes/TripalImporter/TaxonomyImporter.inc).
Notice: Undefined index: contacts in EUtilsRepository->createContact() (line 294 of /Users/bc/tripal/sites/all/modules/custom/tripal_eutils/includes/repositories/EUtilsRepository.inc).
bradfordcondon commented 5 years ago

missing records

Just the projects.

Projects:

none are listed in the returned XML, despite them being listed on the website. we need to investigate and see if theres a way to get it via the API, or if we're never going to get it.

Note that other biosamples DO have the project info. they have it in the link area:

 <Links>
      <Link type="entrez" target="bioproject" label="PRJNA13179">13179</Link>
    </Links>

Assembly: none are listed on the biosample page so we're fine here.

bradfordcondon commented 5 years ago

warnings

Only one of these is in our module. the other are core unfortunately. I'll create issues for them there.

here is the core issue. i think itll be only me to fix it, since therea re no warnings when run inside a job. https://github.com/tripal/tripal/issues/791

bradfordcondon commented 5 years ago

PR submitted to core: https://github.com/tripal/tripal/pull/792