Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ability to handle mutliple organisms + different germplasm types #18

Merged
merged 8 commits into from
May 24, 2018

Conversation

carolyncaron
Copy link
Member

@carolyncaron carolyncaron commented May 14, 2018

Addresses Issue #2

Implementation began last year was and was committed to the master branch, so this pull request is meant to finalize the functionality (and follow best practices 👍). Additions were:

  • Add an extra organism to the sample files for demonstration and testing
  • Update the README
  • Set defaults for both germplasm type and organism in case they aren't provided. When selecting pre-existing stocks and germplasm, the module now requires the organism and type in addition to the unique name. This is to ensure that a unique stock/germplasm is ALWAYS selected, in case a name is shared among different organisms.
  • Fixed a bug (or just forgot to implement?) where organism was always being pulled from the option set by the user rather than the samples file.

Commands for testing:

  • On a fresh Tripal site:
    • drush sql-query "INSERT INTO chado.organism (genus, species, common_name, comment) VALUES ('Felis', 'catus', 'Cat', 'The domestic cat is a small, typically furry, carnivorous mammal. They are often called house cats when kept as indoor pets or simply cats when there is no need to distinguish them from other felids and felines. They are often valued by humans for companionship and for their ability to hunt vermin.')"
    • drush sql-query "INSERT INTO chado.organism (genus, species, common_name, comment) VALUES ('Felis', 'silvestris', 'Wild Cat', 'Wild cats are found throughout continental Europe, southwestern Asia, and the savannah regions of Africa. Felis silvestris is currently regarded as being made up of three, distinct groups (or subspecies): F. silvestris lybica, African wild cats, F. silvestris silvestris, European wild cats, and F. silvestris ornata, Asiatic wild cats.')"
    • drush sql-query "INSERT INTO chado.project (name, description) VALUES ('My SNP Discovery Project', 'I discovered some SNPs in cats.')"
    • drush php-eval "tripal_insert_cvterm(array( 'id' => 'stock_type' . ':' . 'Individual', 'name' => 'Individual', 'cv_name' => 'stock_type', ));"
    • drush php-eval "chado_insert_record('feature', array( 'name' => '1A', 'uniquename' => '1A', 'organism_id' => array( 'genus' => 'Felis', 'species' => 'catus', ), 'type_id' => array( 'cv_id' => array( 'name' => 'sequence', ), 'name' => 'chromosome', 'is_obsolete' => 0 )));"
    • drush load-genotypes sample_files/cats.vcf sample_files/cats.list --marker-type="genetic_marker" --variant-type="SNP" --organism="Felis catus" --project-name="My SNP Discovery Project" --ndgeolocation="here"
  • On a KP clone:
    • drush load-genotypes sample_files/sample.vcf sample_files/samples.list --marker-type="genetic_marker" --variant-type="SNP" --organism="Lens culinaris" --project-name="Issue2 Genotypes Loader Test" --ndgeolocation="here"
    • The samples.list file would need a new organism added and genotypes for that organism added to sample.vcf (sample.flat.tsv or sample.matrix.small may also be used in place of sample.vcf)

@carolyncaron
Copy link
Member Author

I combed through master and found the following commits pertaining to this issue:
Main commit (with Github comments!): 0c07268
Bug fixes: 9e52c8d, 99b9ddc
Lines 297-8 of ca0c22b (the commit itself is pretty large 😞, though primarily due to adding error checking 😄)

@laceysanderson
Copy link
Member

Works as expected! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants