genome/dgi-db

View on GitHub

Showing 71 of 193 total issues

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        elsif val =~ /other/ || val =~ /unknown/ || val == 'protector' || val == 'oxidizer' || val == 'coating agent' || val == 'dilator' || val == 'deoxidizer' || val == 'diffusing substance'|| val == 'vesicant' || val == 'gene replacement'
          'other/unknown'
Severity: Minor
Found in lib/genome/normalizers/interaction_claim_type.rb and 2 other locations - About 25 mins to fix
lib/genome/normalizers/interaction_claim_type.rb on lines 80..81
lib/genome/normalizers/interaction_claim_type.rb on lines 90..91

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

        elsif val == 'inhibitory immune response' || val == 'car-t-cell-therapy(dual specific)' || val == 'immunomodulator' || val == 'immunomodulator (immunostimulant)' || val == 'immune response agent' || val == 'car-t-cell-therapy' || val == 'immune response agent' || val == 'immunostimulant'
          'immunotherapy'
Severity: Minor
Found in lib/genome/normalizers/interaction_claim_type.rb and 2 other locations - About 25 mins to fix
lib/genome/normalizers/interaction_claim_type.rb on lines 74..75
lib/genome/normalizers/interaction_claim_type.rb on lines 80..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  def gene_id_mapping
    validate_gene_id_mapping_request(params)
    gene_claim = DataModel::GeneClaim.for_gene_id_mapping
      .where(name: params[:gene_id]).first ||
      not_found("A gene with the ID #{params[:gene_id]} was not found!")
Severity: Minor
Found in app/controllers/services_v1_controller.rb and 1 other location - About 25 mins to fix
app/controllers/services_v2_controller.rb on lines 103..109

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  def gene_id_mapping
    validate_gene_id_mapping_request(params)
    gene_claim = DataModel::GeneClaim.for_gene_id_mapping
      .where(name: params[:gene_id]).first ||
      not_found("A gene with the ID #{params[:gene_id]} was not found!")
Severity: Minor
Found in app/controllers/services_v2_controller.rb and 1 other location - About 25 mins to fix
app/controllers/services_v1_controller.rb on lines 55..61

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  def render_format(obj)
    respond_to do |format|
      format.json { render json: obj.to_json }
      format.xml  { render xml: obj.to_xml }
      format.all  { render json: obj.to_json }
Severity: Minor
Found in app/controllers/services_v1_controller.rb and 1 other location - About 25 mins to fix
app/controllers/services_v2_controller.rb on lines 124..128

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Identical blocks of code found in 2 locations. Consider refactoring.
Open

  def render_format(obj)
    respond_to do |format|
      format.json { render json: obj.to_json }
      format.xml  { render xml: obj.to_xml }
      format.all  { render json: obj.to_json }
Severity: Minor
Found in app/controllers/services_v2_controller.rb and 1 other location - About 25 mins to fix
app/controllers/services_v1_controller.rb on lines 76..80

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 30.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def sorted_claims
    drug_claims.sort_by{ |d| [(d.drug_claim_attributes.empty? ? 1 : 0), (DrugClaimPresenter.new(d).publications.empty? ? 1 : 0), (d.drug_claim_aliases.empty? ? 1 : 0), d.sort_value] }
Severity: Minor
Found in app/presenters/drug_presenter.rb and 1 other location - About 25 mins to fix
app/presenters/gene_presenter.rb on lines 30..31

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def create_new_source
      @source ||= DataModel::Source.create(
          {
              base_url:          'http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0067980',
              site_url:          'http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0067980',
Severity: Minor
Found in lib/genome/importers/d_gene/dgene.rb and 1 other location - About 25 mins to fix
lib/genome/importers/human_protein_atlas/human_protein_atlas.rb on lines 22..36

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

  def sorted_claims
    gene_claims.sort_by{ |g| [(g.gene_claim_attributes.empty? ? 1 : 0), (GeneClaimPresenter.new(g).publications.empty? ? 1 : 0), (g.gene_claim_aliases.empty? ? 1 : 0), g.sort_value] }
Severity: Minor
Found in app/presenters/gene_presenter.rb and 1 other location - About 25 mins to fix
app/presenters/drug_presenter.rb on lines 34..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def create_new_source
      @source ||= DataModel::Source.create(
        {
            base_url: 'https://www.proteinatlas.org/search/protein_class%3APotential+drug+targets',
            site_url: 'https://www.proteinatlas.org/',
Severity: Minor
Found in lib/genome/importers/human_protein_atlas/human_protein_atlas.rb and 1 other location - About 25 mins to fix
lib/genome/importers/d_gene/dgene.rb on lines 21..35

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def create_new_source
      @source ||= DataModel::Source.create(
          {
              base_url: 'https://www.fda.gov/drugs/science-and-research-drugs/table-pharmacogenomic-biomarkers-drug-labeling',
              site_url: 'https://www.fda.gov/drugs/science-and-research-drugs/table-pharmacogenomic-biomarkers-drug-labeling',
Severity: Minor
Found in lib/genome/importers/fda/fda.rb and 1 other location - About 25 mins to fix
lib/genome/importers/nci/nci.rb on lines 26..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    def create_new_source
      @source ||= DataModel::Source.create(
          {
              base_url: 'https://wiki.nci.nih.gov/display/cageneindex/The+Cancer+Gene+Index+Gene-Disease+and+Gene-Compound+XML+Documents',
              site_url: 'https://wiki.nci.nih.gov/display/cageneindex',
Severity: Minor
Found in lib/genome/importers/nci/nci.rb and 1 other location - About 25 mins to fix
lib/genome/importers/fda/fda.rb on lines 26..40

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 29.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

      def self.source_info
        {
          base_url:           'https://druggablegenome.net/IDGProteinList/',
          site_url:           'https://druggablegenome.net/',
          citation:           'Rodgers,G., Austin,C., Anderson,J., Pawlyk,A., Colvis,C., Margolis,R. and Baker,J. (2018) Glimmers in illuminating the druggable genome. Nat. Rev. Drug Discov., 17, 301–302. PMID: 29348682',
Severity: Major
Found in lib/genome/importers/idg/idg_tsv_importer.rb and 9 other locations - About 20 mins to fix
lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb on lines 5..16
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_clinical_trial/clearity_foundation_clinical_trial_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/hingorani_casas/hingorani_casas_tsv_importer.rb on lines 4..15
lib/genome/importers/my_cancer_genome_clinical_trial/my_cancer_genome_clinical_trial_tsv_importer.rb on lines 4..15
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15
lib/genome/importers/tempus/tempus_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

      def self.source_info
        {
          base_url: 'http://baderlab.org/Data/RoadsNotTaken',
          citation: 'Too many roads not taken: Aled M. Edwards, Ruth Isserlin, Gary D. Bader, Stephen V. Frye, Timothy M. Willson & Frank H. Yu Nature 470, 163-165 (10 February 2011) doi:10.1038/470163a',
          site_url: 'http://baderlab.org/Data/RoadsNotTaken',
Severity: Major
Found in lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb and 9 other locations - About 20 mins to fix
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_clinical_trial/clearity_foundation_clinical_trial_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/hingorani_casas/hingorani_casas_tsv_importer.rb on lines 4..15
lib/genome/importers/idg/idg_tsv_importer.rb on lines 5..16
lib/genome/importers/my_cancer_genome_clinical_trial/my_cancer_genome_clinical_trial_tsv_importer.rb on lines 4..15
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15
lib/genome/importers/tempus/tempus_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

        def self.source_info
          {
              base_url: 'http://www.mycancergenome.org/',
              citation: 'Jain,N., Mittendorf,K.F., Holt,M., Lenoue-Newton,M., Maurer,I., Miller,C., Stachowiak,M., Botyrius,M., Cole,J., Micheel,C., et al. (2020) The My Cancer Genome clinical trial data model and trial curation workflow. J. Am. Med. Inform. Assoc., 27, 1057–1066. PMID: 32483629',
              site_url: 'http://www.mycancergenome.org/',
lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb on lines 5..16
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_clinical_trial/clearity_foundation_clinical_trial_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/hingorani_casas/hingorani_casas_tsv_importer.rb on lines 4..15
lib/genome/importers/idg/idg_tsv_importer.rb on lines 5..16
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15
lib/genome/importers/tempus/tempus_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

      def self.source_info
        {
          base_url:           'https://www.tempus.com/clinical-validation-of-the-tempus-xt-next-generation-targeted-oncology-sequencing-assay/',
          site_url:           'https://www.tempus.com/',
          citation:           'Beaubier, N, Tell, R, Lau, D, Parsons, JR, Bush, S, Perera, J, Sorrells, S, Baker, T, Chang, A, Michuda, J, Iguartua, C, MacNeil, S, Shah, K, Ellis, P, Yeatts, K, Mahon, B, Taxter, T, Bontrager, M, Khan, A, Huether, R, Lefkofsky, E, & White, KP. Clinical validation of the tempus xT next-generation targeted oncology sequencing assay. Oncotarget 2019 Mar 22;10(24):2384-2396. PMID: 31040929.',
Severity: Major
Found in lib/genome/importers/tempus/tempus_tsv_importer.rb and 9 other locations - About 20 mins to fix
lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb on lines 5..16
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_clinical_trial/clearity_foundation_clinical_trial_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/hingorani_casas/hingorani_casas_tsv_importer.rb on lines 4..15
lib/genome/importers/idg/idg_tsv_importer.rb on lines 5..16
lib/genome/importers/my_cancer_genome_clinical_trial/my_cancer_genome_clinical_trial_tsv_importer.rb on lines 4..15
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

      def self.source_info
        {
          base_url:           'http://stm.sciencemag.org/content/9/383/eaag1166',
          site_url:           'http://stm.sciencemag.org/content/9/383/eaag1166',
          citation:           'The druggable genome and support for target identification and validation in drug development. Finan C, Gaulton A, Kurger F, Lumbers T, Shah T, Engmann J, Galver L, Kelly R, Karlsson A, Santos R, Overington J, Hingorani A, Casas JP.   Sci. Transl. Med. 2017 Mar 29;9(383):eaag1166 PMID: 28356508.',
lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb on lines 5..16
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_clinical_trial/clearity_foundation_clinical_trial_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/idg/idg_tsv_importer.rb on lines 5..16
lib/genome/importers/my_cancer_genome_clinical_trial/my_cancer_genome_clinical_trial_tsv_importer.rb on lines 4..15
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15
lib/genome/importers/tempus/tempus_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 10 locations. Consider refactoring.
Open

        def self.source_info
          {
              base_url: 'https://www.clearityfoundation.org/form/findtrials.aspx',
              citation: 'https://www.clearityfoundation.org/form/findtrials.aspx',
              site_url: 'https://www.clearityfoundation.org/form/findtrials.aspx',
lib/genome/importers/bader_lab/bader_lab_tsv_importer.rb on lines 5..16
lib/genome/importers/cancer_commons/cancer_commons_tsv_importer.rb on lines 5..16
lib/genome/importers/clearity_foundation_biomarker/clearity_foundation_biomarker_tsv_importer.rb on lines 5..16
lib/genome/importers/foundation_one_interactions/foundation_one_interactions_tsv_importer.rb on lines 5..16
lib/genome/importers/hingorani_casas/hingorani_casas_tsv_importer.rb on lines 4..15
lib/genome/importers/idg/idg_tsv_importer.rb on lines 5..16
lib/genome/importers/my_cancer_genome_clinical_trial/my_cancer_genome_clinical_trial_tsv_importer.rb on lines 4..15
lib/genome/importers/talc/talc_tsv_importer.rb on lines 4..15
lib/genome/importers/tempus/tempus_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 3 locations. Consider refactoring.
Open

      def self.source_info
        {
            base_url: 'http://www.ncbi.nlm.nih.gov/pubmed/25801821',
            site_url: 'https://www.mskcc.org/msk-impact',
            citation: 'Memorial Sloan Kettering-Integrated Mutation Profiling of Actionable Cancer Targets (MSK-IMPACT): A Hybridization Capture-Based Next-Generation Sequencing Clinical Assay for Solid Tumor Molecular Oncology. Cheng, Donavan T., et al. The Journal of Molecular Diagnostics 17.3 (2015): 251-264. PMID: 25801821',
Severity: Minor
Found in lib/genome/importers/msk_impact/msk_impact_tsv_importer.rb and 2 other locations - About 20 mins to fix
lib/genome/importers/chembl/chembl_tsv_importer.rb on lines 5..16
lib/genome/importers/my_cancer_genome/my_cancer_genome_tsv_importer.rb on lines 5..16

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 4 locations. Consider refactoring.
Open

            gene :uniprot_id, nomenclature: 'Uniprot Accession' do
              name :gene_symbol, nomenclature: 'Gene Symbol', unless: blank_filter
              attribute :target_main_class, name: 'Target Class', unless: blank_filter
              attributes :target_subclass, name: 'Target Subclass', unless: blank_filter
            end
lib/genome/importers/chembl/chembl_tsv_importer.rb on lines 35..39
lib/genome/importers/my_cancer_genome/my_cancer_genome_tsv_importer.rb on lines 32..36
lib/genome/importers/russ_lampel/russ_lampel_tsv_importer.rb on lines 21..26

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 28.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language