NAL-i5K / tripal_eutils

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

Project: what to do for creating linked organism? #137

Closed bradfordcondon closed 5 years ago

bradfordcondon commented 5 years ago

i dont know if this will be the case for all content or just bioproject. perhaps its just a problem with the form.

Adding project167477 creates the project, but not hte organism, assembly, or biosample.

bradfordcondon commented 5 years ago

duh, see #117

bradfordcondon commented 5 years ago

assembly: goes in project_analysis organism: no way to link. I commented in https://github.com/GMOD/Chado/issues/41

bradfordcondon commented 5 years ago

I just ran the project importer on 350852. It has an assembly, biosample, organism, and two publications.

 Calling: tripal_eutils_create_records(bioproject, 350852, )
INFO (TRIPAL_EUTILS): Inserting record into Chado: bioproject: 350852
INFO (TRIPAL_EUTILS): Inserting record into Chado: biosample: 3704235
INFO (TRIPAL_EUTILS): Inserting record into Chado: pubmed: 9023104

so, it creates the project, the sample, and the pub. I think it should not create any of those things if linked records = FALSE. So, those things arent honored.

Additionally, it doesnt find the assembly. This is probably because we previously couldnt get assemblies from the text-based accessions, we needed UID. However, #62 is resolved so we can reivist this.

(I think it doesnt make sense to import a project with linked = FALSE. maybe we should have the checkbox default to TRUE to make this less of an issue).

bradfordcondon commented 5 years ago

easy fix for why it isnt honored: the base EUtils class doesnt pass the create_linked_records variable into the repository.

So we change this$repository = (new EUtilsRepositoryFactory())->get($db); to this $repository = (new EUtilsRepositoryFactory($this->create_linked_records))->get($db);

So all thats left is organism isnt linked. I dont see this as a big problem. And the Chado way might indeed be to say "link it via the analysis or biosample". I'll keep this issue open and retitle.

bradfordcondon commented 5 years ago

And the Chado way might indeed be to say "link it via the analysis or biosample".

ruling this. It's anti-chado to link more directly than how its currently being linked. closing.