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

Assembly annotation #1736

Merged
merged 11 commits into from Nov 15, 2018
Merged

Assembly annotation #1736

merged 11 commits into from Nov 15, 2018

Conversation

yunfangjuan
Copy link
Contributor

Description

  1. add taxon annotation (full lineage) to each contig
  2. output a csv for that particular purpose
  3. remove contigs as a result monitor target. make it a part of the contig_counts

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • [X ] New feature (non-breaking change which adds functionality)
  • Breaking change (fix a feature that knowingly causes existing functionality to not work as expected)

Test and Reproduce

Outline the steps to test or reproduce the PR here.

Impacted Areas in Application

List general components of the application that this PR will affect:

Which pages?

  • Login Screen
  • Single Upload Page
  • Batch Upload Page
  • All Projects Page
  • Sample Details Page
  • Report Page

Specific components

Testing Script:

###Login Page

  • Successfully login to the application and get taken to the project page

###Single Upload

  • Using an AWS path that doesn't exist throws an error
  • Succesfully uploaded files from a folder (use test host)
  • Uploading a duplicate file throws an error
  • Pipeline gets initiated successfully

###Batch Upload

  • Using an AWS path that doesn't exist throws an error
  • Succesfully uploaded files from a folder (use test host)
  • Navigate to batch upload settings page after upload
  • Host selection from previous page still selected
  • Uploading a duplicate file throws a warning
  • Pipeline gets initiated successfully

###All Project Page

  • Switch between projects
  • Search for a sample
  • Navigate through different pages of samples
  • Select Upload new sample button
  • Select sample to see generated report

###Sample Details Page

  • Information is consistent from Project Page
  • Notes are editable and save successfully
  • Can navigate to report page

###Report Page

  • Data loads succesfully
  • Collapse and Uncollapse button works
  • Clicking on the taxonomy name gives you total reads for that taxon
  • Category filter works
  • Genus Search works
  • Filters work as expected
  • Disabling Filters works
  • Filtering by column works

Checklist:

  • I have run through the testing script to make sure current functionality is unchanged
  • I have done relevant tests that prove my fix is effective or that my feature works
  • I have spent time testing out edge cases for my feature
  • I have updated the test script or pull request template if necessary
  • New and existing unit tests pass locally with my changes

@yunfangjuan yunfangjuan requested review from jshoe, MarkAZhang and a team November 14, 2018 00:58
@codeclimate
Copy link

codeclimate bot commented Nov 14, 2018

Code Climate has analyzed commit 63a3ae0 and detected 1 issue on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 1

View more on Code Climate.

taxid_list = []
contig2taxid.values.each { |entry| taxid_list += entry.values }
taxon_lineage_map = {}
TaxonLineage.where(taxid: taxid_list.uniq).each { |t| taxon_lineage_map[t.taxid.to_i] = t.to_a }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to select only the most recent / the most appropriate?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great point. i can make it oder by id so the latest one will always be there.

@@ -159,6 +159,21 @@ def self.fill_lineage_details(tax_map, pipeline_run_id)
tax_map
end

def to_a
[species_taxid, genus_taxid, family_taxid, order_taxid, class_taxid, phylum_taxid,
Copy link
Contributor

@cdebourcy cdebourcy Nov 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could the following help with maintainability?

def to_a
  TaxonLineage.names_a.map { |col| self[col] }
end

and

def self.null_array
  TaxonLineage.column_defaults.values_at(*TaxonLineage.names_a)
end

That way, the list of columns is only hardcoded in names_a. I think it would be preferable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point.

Copy link
Contributor

@cdebourcy cdebourcy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Made some more nits

@@ -365,9 +419,15 @@ def db_load_contig_counts
tax_level: tax_entry['tax_level'],
contig_name: contig_name,
count: count }
if tax_entry['tax_level'].to_i == 1 # species
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TaxonCount:: TAX_LEVEL_SPECIES?

end

def contigs_fasta_s3_path
return "#{postprocess_output_s3_path}/#{ASSEMBLED_CONTIGS_NAME}" if pipeline_version && pipeline_version.to_f >= 3.1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we define ASSEMBLY_PIPELINE_VERSION = '3.1'.freeze?

@yunfangjuan yunfangjuan merged commit 68eb449 into master Nov 15, 2018
@jshoe jshoe deleted the assembly_annotation branch May 8, 2019 21:40
kislyuk pushed a commit that referenced this pull request Mar 15, 2022
Validate names after group lanes for BaseSpace data
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.

None yet

2 participants