genome/dgi-db

View on GitHub

Showing 71 of 193 total issues

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

      def self.source_info
        {
          site_url: 'https://www.ebi.ac.uk/chembl',
          base_url: 'https://www.ebi.ac.uk/chembldb/index.php/target/inspect/',
          citation: "Mendez,D., Gaulton,A., Bento,A.P., Chambers,J., De Veij,M., Félix,E., Magariños,M.P., Mosquera,J.F., Mutowo,P., Nowotka,M., et al. (2019) ChEMBL: towards direct deposition of bioassay data. Nucleic Acids Res., 47, D930–D940. PMID: 30398643",
Severity: Minor
Found in lib/genome/importers/chembl/chembl_tsv_importer.rb and 2 other locations - About 20 mins to fix
lib/genome/importers/msk_impact/msk_impact_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 3 locations. Consider refactoring.
Open

      def self.source_info
        {
          base_url: 'https://www.mycancergenome.org/content/molecular-medicine/overview-of-targeted-therapies-for-cancer/',
          site_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',
lib/genome/importers/chembl/chembl_tsv_importer.rb on lines 5..16
lib/genome/importers/msk_impact/msk_impact_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 :gene_symbol, nomenclature: 'MyCancerGenome Gene Symbol' do
              name :entrez_gene_id, nomenclature: 'Entrez Gene Id', unless: blank_filter
              name :gene_symbol, nomenclature: 'MyCancerGenome Gene Symbol', unless: blank_filter
              name :reported_gene_name, nomenclature: 'MyCancerGenome Reported Gene Name', unless: blank_filter
            end
lib/genome/importers/chembl/chembl_tsv_importer.rb on lines 35..39
lib/genome/importers/russ_lampel/russ_lampel_tsv_importer.rb on lines 21..26
lib/genome/importers/tdg_clinical_trial/tdg_clinical_trial_tsv_importer.rb on lines 25..29

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 :gene_stable_id, nomenclature: 'RussLampel Gene Stable Id' do
            #name :HumanReadableName, nomenclature :HumanReadableName #TODO: this needs an update to the dsl to allow the nomenclature to work
            name :gene_stable_id, nomenclature: 'Ensembl Gene Id', unless: na_filter
            name :display_id, nomenclature: 'Display Id', unless: na_filter
            name :description, nomenclature: 'Description', unless: na_filter
Severity: Minor
Found in lib/genome/importers/russ_lampel/russ_lampel_tsv_importer.rb and 3 other locations - About 20 mins to fix
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/tdg_clinical_trial/tdg_clinical_trial_tsv_importer.rb on lines 25..29

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.ncbi.nlm.nih.gov/pubmed/24377743',
            site_url: 'https://www.ncbi.nlm.nih.gov/pubmed/24377743',
            citation: "Morgensztern,D., Campo,M.J., Dahlberg,S.E., Doebele,R.C., Garon,E., Gerber,D.E., Goldberg,S.B., Hammerman,P.S., Heist,R.S., Hensing,T., et al. (2015) Molecularly targeted therapies in non-small-cell lung cancer annual update 2014. J. Thorac. Oncol., 10, S1–63. PMID: 25535693",
Severity: Major
Found in lib/genome/importers/talc/talc_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/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.clearityfoundation.org/healthcare-pros/drugs-and-biomarkers.aspx',
          citation: 'http://www.clearityfoundation.org/healthcare-pros/drugs-and-biomarkers.aspx',
          site_url: 'https://www.clearityfoundation.org/healthcare-pros/drugs-and-biomarkers.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_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.cancercommons.org/researchers-clinicians/',
          site_url: 'http://www.cancercommons.org/',
          citation: 'Cancer Commons: Biomedicine in the Internet Age. Shrager J, Tenenbaum JM, and Travers M. Collaborative Computational Technologies for Biomedical Research, (Sean Elkins, Maggie Hupcey, and Antony Williams Eds). Wiley, 2010.',
lib/genome/importers/bader_lab/bader_lab_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 4 locations. Consider refactoring.
Open

            gene :gene_chembl_id, nomenclature: 'ChEMBL Gene Identifier' do
              names :gene_symbol, nomenclature: 'ChEMBL Gene Symbol', unless: blank_filter
              names :uniprot_id, nomenclature: 'UniProt Accession', unless: blank_filter
              names :uniprot_name, nomenclature: 'UniProt Name', unless: blank_filter
              # target_ligand fields are ignored for now.
Severity: Minor
Found in lib/genome/importers/chembl/chembl_tsv_importer.rb and 3 other locations - About 20 mins to fix
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
lib/genome/importers/tdg_clinical_trial/tdg_clinical_trial_tsv_importer.rb on lines 25..29

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.foundationone.com/help/current-gene-list.php',
          citation: 'High-throughput detection of actionable genomic alterations in clinical tumor samples by targeted, massively parallel sequencing. Wagle N, Berger MF, ..., Meyerson M, Gabriel SB, Garraway LA. Cancer Discov. 2012 Jan;2(1):82-93',
          site_url: 'http://www.foundationone.com/',
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/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

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

      eager_load(drug_claim: [drug: [drug_claims: {interaction_claims: { source: [], gene_claim: [:source, :gene_claim_categories], interaction_claim_types: [], drug_claim: [drug: [drug_claims: [:drug_claim_types]]]}}]])
Severity: Minor
Found in app/models/data_model/drug_claim_alias.rb and 1 other location - About 15 mins to fix
app/models/data_model/drug_claim.rb on lines 15..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 25.

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

      eager_load(drug: [drug_claims: {interaction_claims: { source: [], gene_claim: [:source, :gene_claim_categories], interaction_claim_types: [], drug_claim: [drug: [drug_claims: [:drug_claim_types]]]}}])
Severity: Minor
Found in app/models/data_model/drug_claim.rb and 1 other location - About 15 mins to fix
app/models/data_model/drug_claim_alias.rb on lines 7..7

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 25.

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