From 623f454f00488e025b8a02da06a8f9b5a7a74a28 Mon Sep 17 00:00:00 2001 From: Sander Tan Date: Fri, 25 May 2018 17:15:02 +0200 Subject: [PATCH] Update tests and test data --- .../cbio/portal/servlet/QueryBuilder.java | 4 - .../src/main/scripts/importer/validateData.py | 9 +- .../TestImportStructralVariantData.java | 75 --------- .../TestImportStructuralVariantData.java | 150 ++++++++++++++++++ .../portal/scripts/TestIntegrationTest.java | 23 ++- core/src/test/resources/seed_mini.sql | 6 + .../api_json_system_tests/genes.json | 25 ++- .../test_data/data_cna_duplicate_gene.txt | 3 +- .../study_es_0/data_structural_variants.txt | 38 +++++ .../study_es_0/meta_structural_variants.txt | 2 +- .../test_data/study_es_0/result_report.html | 20 +-- .../test/scripts/unit_tests_validate_data.py | 37 +++-- db-scripts/src/main/resources/migration.sql | 2 +- .../StructuralVariantMyBatisRepository.java | 4 + ...tructuralVariantMyBatisRepositoryTest.java | 1 - portal/src/main/webapp/WEB-INF/jsp/fusion.jsp | 50 ------ .../WEB-INF/jsp/global/global_variables.jsp | 1 - .../src/main/webapp/WEB-INF/jsp/visualize.jsp | 19 --- .../web/StructuralVariantController.java | 2 +- 19 files changed, 285 insertions(+), 186 deletions(-) delete mode 100644 core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructralVariantData.java create mode 100644 core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructuralVariantData.java delete mode 100644 portal/src/main/webapp/WEB-INF/jsp/fusion.jsp diff --git a/core/src/main/java/org/mskcc/cbio/portal/servlet/QueryBuilder.java b/core/src/main/java/org/mskcc/cbio/portal/servlet/QueryBuilder.java index 0b388ccd047..6f92512d40f 100644 --- a/core/src/main/java/org/mskcc/cbio/portal/servlet/QueryBuilder.java +++ b/core/src/main/java/org/mskcc/cbio/portal/servlet/QueryBuilder.java @@ -478,8 +478,6 @@ private void processData(Map> inputStudySampleMap, Boolean hasMethylation = false; Boolean hasCopyNo = false; Boolean hasSurvival = false; - Boolean hasFusionData = false; - String decodedGeneList = URLDecoder.decode(geneList, "UTF-8"); String singleStudyId = (String) request.getAttribute(CANCER_STUDY_ID); if (inputStudySampleMap.keySet().size() == 1 && inputStudySampleMap.containsKey(singleStudyId)) { // single study @@ -561,7 +559,6 @@ private void processData(Map> inputStudySampleMap, hasMethylation = hasMethylation || countProfiles(geneticProfileList, GeneticAlterationType.METHYLATION) > 0; hasCopyNo = hasCopyNo || countProfiles(geneticProfileList, GeneticAlterationType.COPY_NUMBER_ALTERATION) > 0; hasSurvival = hasSurvival || selectedCancerStudy.hasSurvivalData(); - hasFusionData = hasFusionData || selectedCancerStudy.hasFusionData(); for(String profileId : geneticProfileIdSet){ if (profileId != null && profileId.length() != 0) geneticProfileMap.put(profileId, GeneticProfileUtil.getProfile(profileId, geneticProfileList)); @@ -603,7 +600,6 @@ private void processData(Map> inputStudySampleMap, request.setAttribute("hasMethylation", hasMethylation); request.setAttribute("hasCopyNo", hasCopyNo); request.setAttribute("hasSurvival", hasSurvival); - request.setAttribute("hasFusionData", hasFusionData); ObjectMapper mapper = new ObjectMapper(); String studySampleMapString = mapper.writeValueAsString(studySampleMap); diff --git a/core/src/main/scripts/importer/validateData.py b/core/src/main/scripts/importer/validateData.py index feda2d19b8e..5a4ba69c8ec 100755 --- a/core/src/main/scripts/importer/validateData.py +++ b/core/src/main/scripts/importer/validateData.py @@ -860,7 +860,7 @@ def checkGeneIdentification(self, gene_symbol=None, entrez_id=None): extra={'line_number': self.line_number, 'cause': gene_symbol}) - return gene_symbol, identified_entrez_id + return identified_entrez_id def checkDriverAnnotationColumn(self, driver_value=None, driver_annotation=None): """Ensures that cbp_driver_annotation is filled when the cbp_driver column @@ -997,7 +997,7 @@ def checkLine(self, data): # parse and check the feature identifiers (implemented by subclasses) feature_id = self.parseFeatureColumns(data[:self.num_nonsample_cols]) # skip line if no feature was identified - if feature_id == (None, None): + if feature_id is None: return # skip line with an error if the feature was encountered before if feature_id in self._feature_id_lines: @@ -2937,8 +2937,9 @@ def checkExonPresence(self, exon, column_name): if data[self.cols.index('Event_Info')] == 'Fusion': checkFusionValues(self, data) else: - self.logger.warning('Validation for other structural variant events is not implemented yet', - extra={'cause': self.cols.index('Event_Info')}) + self.logger.error('Validation and functionality for other structural variant events are not implemented ' + 'yet. Event_Info must be "Fusion"', + extra={'cause': self.cols.index('Event_Info')}) def onComplete(self): """Perform final validations based on the data parsed.""" diff --git a/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructralVariantData.java b/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructralVariantData.java deleted file mode 100644 index 96567926323..00000000000 --- a/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructralVariantData.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2018 The Hyve B.V. - * This code is licensed under the GNU Affero General Public License (AGPL), - * version 3, or (at your option) any later version. - */ - -/* - * This file is part of cBioPortal. - * - * cBioPortal is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as - * published by the Free Software Foundation, either version 3 of the - * License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . -*/ - -/* - * @author Sander Tan -*/ - -package org.mskcc.cbio.portal.scripts; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mskcc.cbio.portal.dao.*; -import org.mskcc.cbio.portal.model.*; -import org.mskcc.cbio.portal.util.*; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.test.context.transaction.TransactionConfiguration; -import org.springframework.transaction.annotation.Transactional; - -import static org.junit.Assert.*; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; - -/** - * Test class to test functionality of ImportStructralVariantData -*/ -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) -@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) -@Transactional -public class TestImportStructralVariantData -{ - int studyId; - int geneticProfileId; - - @Before - public void setUp() throws DaoException - { - studyId = DaoCancerStudy.getCancerStudyByStableId("study_tcga_pub").getInternalId(); - geneticProfileId = DaoGeneticProfile.getGeneticProfileByStableId("study_tcga_pub_structural_variants").getGeneticProfileId(); - } - - @Test - public void testImportStructuralVariantData() throws DaoException, IOException { - ProgressMonitor.setConsoleMode(false); - File file = new File("src/test/resources/data_structural_variants.txt"); - ImportStructuralVariantData importer = new ImportStructuralVariantData(file, geneticProfileId, null); - importer.importData(); - -// To do: Use the service layer to retrieve structural variants, and test if they are imported correctly. - } -} diff --git a/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructuralVariantData.java b/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructuralVariantData.java new file mode 100644 index 00000000000..d18d0fc4ab4 --- /dev/null +++ b/core/src/test/java/org/mskcc/cbio/portal/scripts/TestImportStructuralVariantData.java @@ -0,0 +1,150 @@ +/* + * Copyright (c) 2018 The Hyve B.V. + * This code is licensed under the GNU Affero General Public License (AGPL), + * version 3, or (at your option) any later version. + */ + +/* + * This file is part of cBioPortal. + * + * cBioPortal is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see . +*/ + +/* + * @author Sander Tan +*/ + +package org.mskcc.cbio.portal.scripts; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mskcc.cbio.portal.dao.*; +import org.mskcc.cbio.portal.model.*; +import org.mskcc.cbio.portal.util.*; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.transaction.TransactionConfiguration; +import org.springframework.transaction.annotation.Transactional; +import static org.junit.Assert.*; +import java.io.*; +import java.sql.*; + +/** + * Test class to test functionality of ImportStructralVariantData +*/ +@SuppressWarnings("deprecation") +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = { "classpath:/applicationContext-dao.xml" }) +@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true) +@Transactional +public class TestImportStructuralVariantData{ + int studyId; + int geneticProfileId; + + /** + * Extracts StructuralVariant record from ResultSet. + * @param rs + * @return StructuralVariant record + * @throws SQLException + * @throws DaoException + */ + private StructuralVariant extractStructuralVariant(ResultSet rs) throws SQLException, DaoException { + StructuralVariant structuralVariant = new StructuralVariant(); + structuralVariant.setGeneticProfileId(rs.getInt("GENETIC_PROFILE_ID")); + structuralVariant.setSampleIdInternal(rs.getInt("SAMPLE_ID")); + structuralVariant.setSite1EntrezGeneId(rs.getLong("SITE1_ENTREZ_GENE_ID")); + structuralVariant.setSite1EnsemblTranscriptId(rs.getString("SITE1_ENSEMBL_TRANSCRIPT_ID")); + structuralVariant.setSite1Exon(rs.getInt("SITE1_EXON")); + structuralVariant.setSite1Chromosome(rs.getString("SITE1_CHROMOSOME")); + structuralVariant.setSite1Position(rs.getInt("SITE1_POSITION")); + structuralVariant.setSite1Description(rs.getString("SITE1_DESCRIPTION")); + structuralVariant.setSite2EntrezGeneId(rs.getLong("SITE2_ENTREZ_GENE_ID")); + structuralVariant.setSite2EnsemblTranscriptId(rs.getString("SITE2_ENSEMBL_TRANSCRIPT_ID")); + structuralVariant.setSite2Exon(rs.getInt("SITE2_EXON")); + structuralVariant.setSite2Chromosome(rs.getString("SITE2_CHROMOSOME")); + structuralVariant.setSite2Position(rs.getInt("SITE2_POSITION")); + structuralVariant.setSite2Description(rs.getString("SITE2_DESCRIPTION")); + structuralVariant.setSite2EffectOnFrame(rs.getString("SITE2_EFFECT_ON_FRAME")); + structuralVariant.setNcbiBuild(rs.getString("NCBI_BUILD")); + structuralVariant.setDnaSupport(rs.getString("DNA_SUPPORT")); + structuralVariant.setRnaSupport(rs.getString("RNA_SUPPORT")); + structuralVariant.setNormalReadCount(rs.getInt("NORMAL_READ_COUNT")); + structuralVariant.setTumorReadCount(rs.getInt("TUMOR_READ_COUNT")); + structuralVariant.setNormalVariantCount(rs.getInt("NORMAL_VARIANT_COUNT")); + structuralVariant.setTumorVariantCount(rs.getInt("TUMOR_VARIANT_COUNT")); + structuralVariant.setNormalPairedEndReadCount(rs.getInt("NORMAL_PAIRED_END_READ_COUNT")); + structuralVariant.setTumorPairedEndReadCount(rs.getInt("TUMOR_PAIRED_END_READ_COUNT")); + structuralVariant.setNormalSplitReadCount(rs.getInt("NORMAL_SPLIT_READ_COUNT")); + structuralVariant.setTumorSplitReadCount(rs.getInt("TUMOR_SPLIT_READ_COUNT")); + structuralVariant.setAnnotation(rs.getString("ANNOTATION")); + structuralVariant.setBreakpointType(rs.getString("BREAKPOINT_TYPE")); + structuralVariant.setCenter(rs.getString("CENTER")); + structuralVariant.setConnectionType(rs.getString("CONNECTION_TYPE")); + structuralVariant.setEventInfo(rs.getString("EVENT_INFO")); + structuralVariant.setVariantClass(rs.getString("CLASS")); + structuralVariant.setLength(rs.getInt("LENGTH")); + structuralVariant.setComments(rs.getString("COMMENTS")); + structuralVariant.setExternalAnnotation(rs.getString("EXTERNAL_ANNOTATION")); + structuralVariant.setDriverFilter(rs.getString("DRIVER_FILTER")); + structuralVariant.setDriverFilterAnn(rs.getString("DRIVER_FILTER_ANNOTATION")); + structuralVariant.setDriverTiersFilter(rs.getString("DRIVER_TIERS_FILTER")); + structuralVariant.setDriverTiersFilterAnn(rs.getString("DRIVER_TIERS_FILTER_ANNOTATION")); + return structuralVariant; + } + + @Before + public void setUp() throws DaoException + { + studyId = DaoCancerStudy.getCancerStudyByStableId("study_tcga_pub").getInternalId(); + geneticProfileId = DaoGeneticProfile.getGeneticProfileByStableId("study_tcga_pub_structural_variants").getGeneticProfileId(); + } + + @Test + public void testImportStructuralVariantData() throws DaoException, IOException { + ProgressMonitor.setConsoleMode(false); + + // Load test structural variants + File file = new File("src/test/resources/data_structural_variants.txt"); + ImportStructuralVariantData importer = new ImportStructuralVariantData(file, geneticProfileId, null); + importer.importData(); + MySQLbulkLoader.flushAll(); + + // Retrieve all imported structural variants + Connection con = null; + PreparedStatement pstmt = null; + ResultSet rs = null; + try { + con = JdbcUtil.getDbConnection(DaoGeneset.class); + pstmt = con.prepareStatement("SELECT * FROM structural_variant"); + rs = pstmt.executeQuery(); + + // Test first structural variant entry + rs.next(); + StructuralVariant structuralVariant = extractStructuralVariant(rs); + assertEquals("KIAA1549-BRAF.K16B10.COSF509_2", structuralVariant.getSite2Description()); + + // Test second structural variant entry + rs.next(); + structuralVariant = extractStructuralVariant(rs); + assertEquals("ENST00000318522", structuralVariant.getSite1EnsemblTranscriptId()); + } + catch (SQLException e) { + throw new DaoException(e); + } + finally { + JdbcUtil.closeAll(DaoGeneset.class, con, pstmt, rs); + } + } +} diff --git a/core/src/test/java/org/mskcc/cbio/portal/scripts/TestIntegrationTest.java b/core/src/test/java/org/mskcc/cbio/portal/scripts/TestIntegrationTest.java index b6cf71b896a..fe47ae932a1 100644 --- a/core/src/test/java/org/mskcc/cbio/portal/scripts/TestIntegrationTest.java +++ b/core/src/test/java/org/mskcc/cbio/portal/scripts/TestIntegrationTest.java @@ -34,6 +34,7 @@ import java.io.Serializable; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; @@ -83,6 +84,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.transaction.TransactionConfiguration; import org.springframework.transaction.annotation.Transactional; +import org.cbioportal.model.StructuralVariant; +import org.cbioportal.service.StructuralVariantService; /** * Integration test using the same data that is used by validation system test @@ -182,10 +185,26 @@ public void testLoadStudyEs0() throws Throwable { .getGeneticProfiles(geneticProfileStableIds); assertEquals(geneticProfiles.size(), 0); - // ===== Check CNA data ======== + //===== Check STRUCTURAL VARIANT data ======== + // 45 structural variant events are imported, using 31 unique genes, using 39 samples + // Not all 31 genes have to be queried. BRAF is fused to many of the test genes. + List entrezGeneIds = new ArrayList(Arrays.asList(57670, 673, 8031, 5979, 27436, 238, 7113, 2078, 1956, 238, 5774, 2115, 7273)); + + // Add samples and molecular profile IDs + List sampleIds = new ArrayList(Arrays.asList("TCGA-A2-A04P-01", "TCGA-A1-A0SB-01", "TCGA-A1-A0SB-01", "TCGA-A2-A04P-01", "TCGA-A2-A04P-01", "TCGA-A1-A0SK-01", "TCGA-A2-A0CM-01", "TCGA-AR-A1AR-01", "TCGA-B6-A0WX-01", "TCGA-BH-A1F0-01", "TCGA-B6-A0I6-01", "TCGA-BH-A18V-01", "TCGA-BH-A18Q-01", "TCGA-BH-A18K-01", "TCGA-BH-A0HL-01", "TCGA-BH-A0E0-01", "TCGA-BH-A0RX-01", "TCGA-A7-A13D-01", "TCGA-BH-A0E6-01", "TCGA-AO-A0J4-01", "TCGA-A7-A0CE-01", "TCGA-A7-A13E-01", "TCGA-A7-A0DA-01", "TCGA-D8-A142-01", "TCGA-D8-A143-01", "TCGA-AQ-A04J-01", "TCGA-BH-A0HN-01", "TCGA-A2-A0T0-01", "TCGA-A2-A0YE-01", "TCGA-A2-A0YJ-01", "TCGA-A2-A0D0-01", "TCGA-A2-A04U-01", "TCGA-AO-A0J6-01", "TCGA-A2-A0YM-01", "TCGA-A2-A0D2-01", "TCGA-BH-A0B3-01", "TCGA-A2-A04Q-01", "TCGA-A2-A0SX-01", "TCGA-AO-A0JL-01")); +// geneticProfileStableIds = new ArrayList(Arrays.asList("study_es_0_structural_variants", "study_es_0_structural_variants")); + geneticProfileStableIds = Collections.nCopies(sampleIds.size(), "study_es_0_structural_variants"); + + StructuralVariantService structuralVariantService = applicationContext.getBean(StructuralVariantService.class); + List structuralVariants = structuralVariantService.fetchStructuralVariants(geneticProfileStableIds, entrezGeneIds, sampleIds); + + // Check if all 45 structural variants are imported + assertEquals(45, structuralVariants.size()); + + //===== Check CNA data ======== geneticProfileStableIds = new ArrayList(); geneticProfileStableIds.add("study_es_0_gistic"); - List hugoGeneSymbols = new ArrayList(Arrays.asList("ACAP3","AGRN","ATAD3A","ATAD3B","ATAD3C","AURKAIP1","ERCC5")); + ArrayList hugoGeneSymbols = new ArrayList(Arrays.asList("ACAP3","AGRN","ATAD3A","ATAD3B","ATAD3C","AURKAIP1","ERCC5")); List cnaProfileData = apiService.getGeneticProfileData(geneticProfileStableIds, hugoGeneSymbols, null, null); //there is data for 7 genes x 788 samples: assertEquals(7*788, cnaProfileData.size()); diff --git a/core/src/test/resources/seed_mini.sql b/core/src/test/resources/seed_mini.sql index 4a0c55dc9c1..6a46cd41822 100644 --- a/core/src/test/resources/seed_mini.sql +++ b/core/src/test/resources/seed_mini.sql @@ -155,6 +155,12 @@ INSERT INTO "gene" ("GENETIC_ENTITY_ID","ENTREZ_GENE_ID","HUGO_GENE_SYMBOL","TYP INSERT INTO "genetic_entity" ("ENTITY_TYPE") VALUES ('GENE'); SET @max_entity_id = (Select MAX(ID) from genetic_entity); INSERT INTO "gene" ("GENETIC_ENTITY_ID","ENTREZ_GENE_ID","HUGO_GENE_SYMBOL","TYPE","CYTOBAND","LENGTH") VALUES (@max_entity_id,238,'ALK','protein-coding','2p23.2-p23.1',6990); +INSERT INTO "genetic_entity" ("ENTITY_TYPE") VALUES ('GENE'); +SET @max_entity_id = (Select MAX(ID) from genetic_entity); +INSERT INTO "gene" ("GENETIC_ENTITY_ID","ENTREZ_GENE_ID","HUGO_GENE_SYMBOL","TYPE","CYTOBAND","LENGTH") VALUES (@max_entity_id,2115,'ETV1','protein-coding','7p21.2',9616); +INSERT INTO "genetic_entity" ("ENTITY_TYPE") VALUES ('GENE'); +SET @max_entity_id = (Select MAX(ID) from genetic_entity); +INSERT INTO "gene" ("GENETIC_ENTITY_ID","ENTREZ_GENE_ID","HUGO_GENE_SYMBOL","TYPE","CYTOBAND","LENGTH") VALUES (@max_entity_id,7273,'TTN','protein-coding','2q31.2',118976); -- cna_event INSERT INTO "cna_event" ("CNA_EVENT_ID","ENTREZ_GENE_ID","ALTERATION") VALUES (20093,207,-2); diff --git a/core/src/test/scripts/test_data/api_json_system_tests/genes.json b/core/src/test/scripts/test_data/api_json_system_tests/genes.json index c8f7b5e23c0..9ef6d8e24a8 100644 --- a/core/src/test/scripts/test_data/api_json_system_tests/genes.json +++ b/core/src/test/scripts/test_data/api_json_system_tests/genes.json @@ -1,5 +1,5 @@ [ -{"_comment": "genes for data_mutations_extended.txt", +{"_comment": "genes for data_mutations_extended.txt", "entrez_gene_id":"3983", "hugo_gene_symbol":"ABLIM1"}, {"entrez_gene_id":"80070", "hugo_gene_symbol":"ADAMTS20"}, {"entrez_gene_id":"253559", "hugo_gene_symbol":"CADM2"}, @@ -83,6 +83,27 @@ {"entrez_gene_id":"2078", "hugo_gene_symbol":"ERG"}, {"entrez_gene_id":"1956", "hugo_gene_symbol":"EGFR"}, {"entrez_gene_id":"5774", "hugo_gene_symbol":"PTPN3"}, +{"entrez_gene_id":"2115", "hugo_gene_symbol":"ETV1"}, +{"entrez_gene_id":"7273", "hugo_gene_symbol":"TTN"}, +{"entrez_gene_id":"9867", "hugo_gene_symbol":"PJA2"}, +{"entrez_gene_id":"54810", "hugo_gene_symbol":"GIPC2"}, +{"entrez_gene_id":"114883", "hugo_gene_symbol":"OSBPL9"}, +{"entrez_gene_id":"155435", "hugo_gene_symbol":"RBM33"}, +{"entrez_gene_id":"55755", "hugo_gene_symbol":"CDK5RAP2"}, +{"entrez_gene_id":"23513", "hugo_gene_symbol":"SCRIB"}, +{"entrez_gene_id":"5577", "hugo_gene_symbol":"PRKAR2B"}, +{"entrez_gene_id":"5575", "hugo_gene_symbol":"PRKAR1B"}, +{"entrez_gene_id":"57157", "hugo_gene_symbol":"PHTF2"}, +{"entrez_gene_id":"7756", "hugo_gene_symbol":"ZNF207"}, +{"entrez_gene_id":"11011", "hugo_gene_symbol":"TLK2"}, +{"entrez_gene_id":"64759", "hugo_gene_symbol":"TNS3"}, +{"entrez_gene_id":"9709", "hugo_gene_symbol":"HERPUD1"}, +{"entrez_gene_id":"55750", "hugo_gene_symbol":"AGK"}, +{"entrez_gene_id":"9715", "hugo_gene_symbol":"FAM131B"}, +{"entrez_gene_id":"116988", "hugo_gene_symbol":"AGAP3"}, +{"entrez_gene_id":"8454", "hugo_gene_symbol":"CUL1"}, +{"entrez_gene_id":"27044", "hugo_gene_symbol":"SND1"}, +{"entrez_gene_id":"23608", "hugo_gene_symbol":"MKRN1"}, {"_comment": "genes for mrna data data_expression_median", "entrez_gene_id":"90993", "hugo_gene_symbol":"CREB3L1"}, @@ -101,4 +122,4 @@ {"entrez_gene_id":"24145", "hugo_gene_symbol":"PANX1"}, {"entrez_gene_id":"283234", "hugo_gene_symbol":"CCDC88B"} -] +] \ No newline at end of file diff --git a/core/src/test/scripts/test_data/data_cna_duplicate_gene.txt b/core/src/test/scripts/test_data/data_cna_duplicate_gene.txt index aacd2ad848e..8b9e865a8ee 100644 --- a/core/src/test/scripts/test_data/data_cna_duplicate_gene.txt +++ b/core/src/test/scripts/test_data/data_cna_duplicate_gene.txt @@ -3,7 +3,6 @@ ACAP3 116983 0 -1 0 -1 2 AGRN 375790 0 -1 0 -1 2 ATAD3A 55210 0 -1 NA -1 2 ATAD3B 83858 0 -1 0 -1 2 -CENTB5 0 -1 0 -1 2 +CENTB5 0 -1 spam -1 3 AURKAIP1 54998 0 -1 0 -1 2 B3GALT6 126792 0 -1 0 -1 2 -B3GALT6 126792 0 -1 0 -1 2 diff --git a/core/src/test/scripts/test_data/study_es_0/data_structural_variants.txt b/core/src/test/scripts/test_data/study_es_0/data_structural_variants.txt index bd57ac1ba04..80ccd08639f 100644 --- a/core/src/test/scripts/test_data/study_es_0/data_structural_variants.txt +++ b/core/src/test/scripts/test_data/study_es_0/data_structural_variants.txt @@ -6,3 +6,41 @@ TCGA-A2-A04P-01 NA TMPRSS2 ENST00000332149 1 21 42880007 TMPRSS2-ERG.T1E2.COSF23 TCGA-A2-A04P-01 NA EGFR ENST00000275493 1 7 55087058 EGFR-EGFR.E1E8.DelPositive.1_1 NA EGFR ENST00000275493 8 7 55223522 EGFR-EGFR.E1E8.DelPositive.1_2 NA GRCh37 no yes NA 1004 NA 500 NA NA NA NA EGFR-EGFR.E1E8.DelPositive NA NA NA Fusion NA NA NA NA NA NA NA NA TCGA-A2-A04P-01 NA ALK ENST00000389048 11 2 29497964 ALK-PTPN3.A11P3_1 NA PTPN3 ENST00000374541 3 9 112219679 ALK-PTPN3.A11P3_2 NA GRCh37 no yes NA 1005 NA 400 NA NA NA NA ALK-PTPN3.A11P3 NA NA NA Fusion NA NA NA NA NA NA NA NA TCGA-A1-A0SB-01 NA EML4 ENST00000318522 13 2 42522656 EML4-ALK.E13A20.AB462411_1 NA ALK ENST00000389048 20 2 29446335 EML4-ALK.E13A20.AB462411_2 NA GRCh37 no yes NA 1006 NA 300 NA NA NA NA EML4-ALK.E13A20 NA NA NA Fusion NA NA Gain-of-Function GENBANK:AB462411 NA NA NA NA +TCGA-A1-A0SB-01 NA TMPRSS2 ENST00000455813 1 21 42870045 TMPRSS2-ETV1.T1bE4_1 NA ETV1 ENST00000405358 4 7 14017105 TMPRSS2-ETV1.T1bE4_2 NA GRCh37 no yes NA 1007 NA 200 NA NA NA NA TMPRSS2-ETV1.T1bE4 NA NA NA Fusion NA NA NA NA NA NA NA NA +TCGA-A2-A04P-01 NA NCOA4 ENST00000344348 7 10 51582939 NCOA4-TTN.CUSTOMHYVE_1 NA TTN ENST00000589042 2 1 111111111 NCOA4-TTN.CUSTOMHYVE_2 NA GRCh37 no yes NA 1008 NA 100 NA NA NA NA NCOA4-TTN.CUSTOMHYVE NA NA NA Fusion NA NA NA NA NA NA NA NA +TCGA-A2-A04P-01 NA TTN ENST00000589042 28 1 222222222 TTN_ALK.CUSTOMHYVE_1 NA ALK ENST00000389048 20 2 29446394 TTN_ALK.CUSTOMHYVE_2 NA GRCh37 no yes NA 1008 NA 100 NA NA NA NA TTN-ALK.CUSTOMHYVE NA NA NA Fusion NA NA NA NA NA NA NA NA +TCGA-A1-A0SK-01 NA PJA2 ENST00000361189 7 1 10000000 PJA2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 PJA2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA PJA2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0CM-01 NA GIPC2 ENST00000370759 3 1 10000000 GIPC2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 GIPC2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA GIPC2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AR-A1AR-01 NA OSBPL9 ENST00000428468 11 1 10000000 OSBPL9_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 OSBPL9_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA OSBPL9_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-B6-A0WX-01 NA RBM33 ENST00000401878 3 1 10000000 RBM33_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 RBM33_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA RBM33_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A1F0-01 NA CDK5RAP2 ENST00000349780 13 1 10000000 CDK5RAP2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 CDK5RAP2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA CDK5RAP2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-B6-A0I6-01 NA CDK5RAP2 ENST00000349780 12 1 10000000 CDK5RAP2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 CDK5RAP2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA CDK5RAP2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A18V-01 NA SCRIB ENST00000320476 20 1 10000000 SCRIB_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SCRIB_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SCRIB_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A18Q-01 NA PRKAR2B ENST00000265717 1 1 10000000 PRKAR2B_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 PRKAR2B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA PRKAR2B_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A18K-01 NA PRKAR1B ENST00000265717 10 1 10000000 PRKAR1B_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 PRKAR1B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA PRKAR1B_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0HL-01 NA PHTF2 ENST00000248550 19 1 10000000 PHTF2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 PHTF2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA PHTF2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0E0-01 NA ZNF207 ENST00000321233 3 1 10000000 ZNF207_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 ZNF207_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA ZNF207_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0RX-01 NA TLK2 ENST00000326270 2 1 10000000 TLK2_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 TLK2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA TLK2_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A7-A13D-01 NA TNS3 ENST00000311160 18 1 10000000 TNS3_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 TNS3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA TNS3_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0E6-01 NA HERPUD1 ENST00000439977 6 1 10000000 HERPUD1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 HERPUD1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA HERPUD1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AO-A0J4-01 NA AGK ENST00000355413 2 1 10000000 AGK_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGK_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A7-A0CE-01 NA AGK ENST00000355413 2 1 10000000 AGK_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGK_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A7-A13E-01 NA AGK ENST00000355413 2 1 10000000 AGK_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGK_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A7-A0DA-01 NA AGK ENST00000355413 2 1 10000000 AGK_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGK_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-D8-A142-01 NA FAM131B ENST00000409222 3 1 10000000 FAM131B_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 FAM131B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA FAM131B_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-D8-A143-01 NA AGAP3 ENST00000397238 10 1 10000000 AGAP3_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGAP3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGAP3_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AQ-A04J-01 NA AGAP3 ENST00000397238 9 1 10000000 AGAP3_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 AGAP3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA AGAP3_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0HN-01 NA CUL1 ENST00000325222 7 1 10000000 CUL1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 CUL1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA CUL1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0T0-01 NA SND1 ENST00000354725 20 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0YE-01 NA SND1 ENST00000354725 18 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0YJ-01 NA SND1 ENST00000354725 15 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0D0-01 NA SND1 ENST00000354725 15 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A04U-01 NA SND1 ENST00000354725 12 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AO-A0J6-01 NA SND1 ENST00000354725 12 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0YM-01 NA SND1 ENST00000354725 12 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0D2-01 NA SND1 ENST00000354725 12 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-BH-A0B3-01 NA SND1 ENST00000354725 10 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A04Q-01 NA SND1 ENST00000354725 10 1 10000000 SND1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA SND1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-A2-A0SX-01 NA MKRN1 ENST00000255977 4 1 10000000 MKRN1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 MKRN1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA MKRN1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AO-A0JL-01 NA MKRN1 ENST00000255977 4 1 10000000 MKRN1_BRAF_CUSTOMHYVE_1 NA BRAF ENST00000288602 11 1 10000000 MKRN1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA MKRN1_BRAF_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA +TCGA-AO-A0JL-01 NA BRAF ENST00000288602 6 1 10000000 BRAF_TTN_CUSTOMHYVE_1 NA TTN ENST00000589042 2 1 111111111 BRAF_TTN_CUSTOMHYVE_2 NA GRCh37 no yes NA 1000 NA 900 NA NA NA NA BRAF_TTN_CUSTOMHYVE NA NA NA Fusion NA NA Gain-of-Function NA NA NA NA NA diff --git a/core/src/test/scripts/test_data/study_es_0/meta_structural_variants.txt b/core/src/test/scripts/test_data/study_es_0/meta_structural_variants.txt index 1e7f6a4c03e..417ad28d6b9 100644 --- a/core/src/test/scripts/test_data/study_es_0/meta_structural_variants.txt +++ b/core/src/test/scripts/test_data/study_es_0/meta_structural_variants.txt @@ -6,4 +6,4 @@ stable_id: structural_variants profile_name: Targeted Fusion Assay data (Fake data) profile_description: Targeted Fusion Assay data created by The Hyve show_profile_in_analysis_tab: true -gene_panel: example_gene_panel_stable_id +gene_panel: TESTPANEL1 diff --git a/core/src/test/scripts/test_data/study_es_0/result_report.html b/core/src/test/scripts/test_data/study_es_0/result_report.html index 92b8e34d636..43528b9d7f9 100644 --- a/core/src/test/scripts/test_data/study_es_0/result_report.html +++ b/core/src/test/scripts/test_data/study_es_0/result_report.html @@ -36,7 +36,7 @@ - cBioPortal validation report: study in '../../../test/scripts/test_data/study_es_0/' + cBioPortal validation report: study in 'test_data/study_es_0/' @@ -46,9 +46,9 @@

cBioPortal validation report

-

Study directory:
../../../test/scripts/test_data/study_es_0/

+

Study directory:
test_data/study_es_0/

For details, please see the documentation on file formats supported by cBioPortal

-

cBioPortal version 0-unknown-version-SNAPSHOT

+

cBioPortal version 1.5.1-SYSTEM-TEST

@@ -93,42 +93,42 @@

General

Debug – – - Requesting cancertypes from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/cancertypes.json – Debug – – - Requesting genes from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/genes.json – Debug – – - Requesting genesaliases from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/genesaliases.json – Debug – – - Requesting treatments from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/treatments.json – Debug – – - Requesting genesets from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/genesets.json – Debug – – - Requesting gene-panels from portal at 'http://localhost:8080/cbioportal' + Reading portal information from test_data/api_json_system_tests/gene-panels.json – @@ -1263,7 +1263,7 @@

data_structural_variants.txt

Info – – - Read 8 lines. Lines with warning: 0. Lines with error: 0 + Read 46 lines. Lines with warning: 0. Lines with error: 0 – diff --git a/core/src/test/scripts/unit_tests_validate_data.py b/core/src/test/scripts/unit_tests_validate_data.py index a05ab1910e8..afde3808748 100755 --- a/core/src/test/scripts/unit_tests_validate_data.py +++ b/core/src/test/scripts/unit_tests_validate_data.py @@ -787,7 +787,13 @@ def test_valid_discrete_cna(self): self.assertLessEqual(record.levelno, logging.INFO) def test_repeated_gene(self): - """Test if a warning is issued and the line is skipped if duplicate.""" + """Test if a warning is issued and the line is skipped if duplicate. + + In the test data, the Entrez ID in line 6 is removed. Therefore the gene symbol and gene alias table will be + used to look up this gene in the database. ENTB5 is an alias for Entrez 116983 (ACAP3). This gene was defined + earlier in the file, so the CENTB5 entry will be skipped. There are invalid values in this row, but because the + entry is skipped, the values should not be validated.""" + self.logger.setLevel(logging.WARNING) record_list = self.validate('data_cna_duplicate_gene.txt', validateData.CNADiscreteValidator) @@ -796,8 +802,8 @@ def test_repeated_gene(self): self.assertEqual(len(record_list), 1) record = record_list.pop() self.assertEqual(record.levelno, logging.WARNING) - self.assertEqual(record.line_number, 9) - self.assertIn('Duplicate', record.getMessage()) + self.assertEqual(record.line_number, 6) + self.assertTrue(record.cause.startswith('116983')) def test_invalid_discrete_cna(self): """Check a discrete CNA file with values that should yield errors.""" @@ -1883,22 +1889,27 @@ def test_missing_columns(self): self.logger.setLevel(logging.ERROR) record_list = self.validate('data_structural_variants_missing_columns.txt', validateData.StructuralVariantValidator) - self.assertEqual(2, len(record_list)) + self.assertEqual(3, len(record_list)) record_iterator = iter(record_list) # Expected ERROR message due to missing Ensembl transcript column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(1, record.line_number) self.assertEqual('Fusion event requires "Site1_Exon" and "Site2_Exon" columns', record.message) # Expected ERROR message due to missing Exon column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(1, record.line_number) self.assertEqual('Fusion event requires "Site1_Ensembl_Transcript_Id" and "Site2_Ensembl_Transcript_Id" ' 'columns', record.message) + # Expected generic ERROR message due to invalid column header + record = next(record_iterator) + self.assertEqual(logging.ERROR, record.levelno) + self.assertEqual('Invalid column header, file cannot be parsed', record.message) + def test_missing_values(self): """Test whether the exons are found in the transcript""" self.logger.setLevel(logging.ERROR) @@ -1908,28 +1919,28 @@ def test_missing_values(self): record_iterator = iter(record_list) # Expected ERROR message due to missing Ensembl transcript column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(record.levelno, logging.ERROR) self.assertEqual(2, record.line_number) self.assertEqual(11, record.column_number) self.assertIn("No Ensembl transcript ID found.", record.message) # Expected ERROR message due to missing Exon column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(3, record.line_number) self.assertEqual(4, record.column_number) self.assertIn("No Ensembl transcript ID found.", record.message) # Expected ERROR message due to missing Ensembl transcript column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(6, record.line_number) self.assertEqual(5, record.column_number) self.assertIn("No exon found.", record.message) # Expected ERROR message due to missing Exon column - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(8, record.line_number) self.assertEqual(12, record.column_number) @@ -1945,7 +1956,7 @@ def test_transcript_not_in_genome_nexus(self): record_iterator = iter(record_list) # Expected ERROR message due to value "1500" in Site1_Exon in line 2 - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual("TEST_TRANSCRIPT", record.cause) self.assertIn("Ensembl transcript not found in Genome Nexus.", record.getMessage()) @@ -1960,14 +1971,14 @@ def test_exon_not_in_transcript(self): record_iterator = iter(record_list) # Expected ERROR message due to value "1500" in Site1_Exon in line 2 - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(2, record.line_number) self.assertEqual("1500 not in ENST00000242365", record.cause) self.assertIn("Exon is not found in rank of transcript", record.getMessage()) # Expected ERROR message due to value "2000" in Site2_Exon in line 4 - record = record_iterator.next() + record = next(record_iterator) self.assertEqual(logging.ERROR, record.levelno) self.assertEqual(4, record.line_number) self.assertEqual("2000 not in ENST00000389048", record.cause) diff --git a/db-scripts/src/main/resources/migration.sql b/db-scripts/src/main/resources/migration.sql index a7d7081d304..f78c69fc209 100644 --- a/db-scripts/src/main/resources/migration.sql +++ b/db-scripts/src/main/resources/migration.sql @@ -681,4 +681,4 @@ CREATE TABLE `structural_variant` ( FOREIGN KEY (`GENETIC_PROFILE_ID`) REFERENCES `genetic_profile` (`GENETIC_PROFILE_ID`) ON DELETE CASCADE ); -UPDATE info SET DB_SCHEMA_VERSION="2.9.2"; +UPDATE `info` SET `DB_SCHEMA_VERSION`="2.9.2"; \ No newline at end of file diff --git a/persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.java b/persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.java index 3a95760ed0b..453343cc963 100644 --- a/persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.java +++ b/persistence/persistence-mybatis/src/main/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepository.java @@ -40,6 +40,10 @@ public class StructuralVariantMyBatisRepository implements StructuralVariantRepo public List fetchStructuralVariants(List molecularProfileIds, List entrezGeneIds, List sampleIds) { + if ((sampleIds.size() > 0) && (molecularProfileIds.size() != sampleIds.size())) { + throw new RuntimeException("molecularProfileIds list and sampleIds list should be the same length."); + } + return structuralVariantMapper.fetchStructuralVariants(molecularProfileIds, entrezGeneIds, sampleIds); } diff --git a/persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.java b/persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.java index 9fbec88668f..fb8b5e44789 100644 --- a/persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.java +++ b/persistence/persistence-mybatis/src/test/java/org/cbioportal/persistence/mybatis/StructuralVariantMyBatisRepositoryTest.java @@ -211,6 +211,5 @@ public void fetchStructuralVariantsMultiStudyWithSampleIdentifiers() throws Exce Assert.assertEquals((String) "TCGA-A1-A0SB-01", structuralVariantSecondResult.getSampleId()); Assert.assertEquals((String) "TCGA-A1-A0SB", structuralVariantSecondResult.getPatientId()); Assert.assertEquals((String) "study_tcga_pub", structuralVariantSecondResult.getStudyId()); - } } diff --git a/portal/src/main/webapp/WEB-INF/jsp/fusion.jsp b/portal/src/main/webapp/WEB-INF/jsp/fusion.jsp deleted file mode 100644 index 8163d5d583f..00000000000 --- a/portal/src/main/webapp/WEB-INF/jsp/fusion.jsp +++ /dev/null @@ -1,50 +0,0 @@ -<%-- - - This file is part of cBioPortal. - - - - cBioPortal is free software: you can redistribute it and/or modify - - it under the terms of the GNU Affero General Public License as - - published by the Free Software Foundation, either version 3 of the - - License. - - - - This program is distributed in the hope that it will be useful, - - but WITHOUT ANY WARRANTY; without even the implied warranty of - - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - - GNU Affero General Public License for more details. - - - - You should have received a copy of the GNU Affero General Public License - - along with this program. If not, see . ---%> - -
- loading -
- - diff --git a/portal/src/main/webapp/WEB-INF/jsp/global/global_variables.jsp b/portal/src/main/webapp/WEB-INF/jsp/global/global_variables.jsp index 93d005b69e1..906a5e9d753 100644 --- a/portal/src/main/webapp/WEB-INF/jsp/global/global_variables.jsp +++ b/portal/src/main/webapp/WEB-INF/jsp/global/global_variables.jsp @@ -70,7 +70,6 @@ Boolean has_methylation = (Boolean) request.getAttribute("hasMethylation"); Boolean has_copy_no = (Boolean) request.getAttribute("hasCopyNo"); Boolean has_survival = (Boolean) request.getAttribute("hasSurvival"); - Boolean has_fusion_data = (Boolean) request.getAttribute("hasFusionData"); boolean includeNetworks = GlobalProperties.includeNetworks(); boolean computeLogOddsRatio = true; Boolean mutationDetailLimitReached = (Boolean)request.getAttribute(QueryBuilder.MUTATION_DETAIL_LIMIT_REACHED); diff --git a/portal/src/main/webapp/WEB-INF/jsp/visualize.jsp b/portal/src/main/webapp/WEB-INF/jsp/visualize.jsp index 6d052087e73..50680a0750b 100755 --- a/portal/src/main/webapp/WEB-INF/jsp/visualize.jsp +++ b/portal/src/main/webapp/WEB-INF/jsp/visualize.jsp @@ -202,10 +202,6 @@ window.loadReactApp({ defaultRoute: 'results' }); if (showMutTab){ out.println ("
  • Mutations
  • "); } - if (has_fusion_data) { - out.println - ("
  • Fusion
  • "); - } if (showCoexpTab) { out.println ("
  • Co-Expression
  • "); } @@ -277,10 +273,6 @@ window.loadReactApp({ defaultRoute: 'results' }); <%@ include file="mutation_details.jsp" %> <% } %> - <% if (has_fusion_data) { %> - <%@ include file="fusion.jsp" %> - <% } %> - <% if (includeNetworks) { %> <%@ include file="networks.jsp" %> <% } %> @@ -418,17 +410,6 @@ window.loadReactApp({ defaultRoute: 'results' }); position: {my:'left top',at:'right bottom', viewport: $(window)} } ); - $("#fusion-data-result-tab").qtip( - { - content: {text: - "Fusion genes, hybrid gene formed from two previously separate genes. It can occur as a result of: " + - "translocation, interstitial deletion, or chromosomal inversion *CHANGE THIS PLEASE*"}, - style: { classes: 'qtip-light qtip-rounded qtip-shadow qtip-lightyellow result-tab-qtip-content' }, - show: {event: "mouseover", delay: 0}, - hide: {fixed:true, delay: 100, event: "mouseout"}, - position: {my:'left top',at:'right bottom', viewport: $(window)} - } - ); $("#coexp-result-tab").qtip( { content: {text: "List of top co-expressed genes"}, diff --git a/web/src/main/java/org/cbioportal/web/StructuralVariantController.java b/web/src/main/java/org/cbioportal/web/StructuralVariantController.java index 5c5be4a5075..785174193eb 100644 --- a/web/src/main/java/org/cbioportal/web/StructuralVariantController.java +++ b/web/src/main/java/org/cbioportal/web/StructuralVariantController.java @@ -49,7 +49,7 @@ @PublicApi @RestController @Validated -@Api(tags = "Structural Variants", description = " ") +@Api(tags = "Q. Structural Variants", description = " ") public class StructuralVariantController { @Autowired private StructuralVariantService structuralVariantService;