From d3958d5767a1ff20b10afaeb2f59e31ddfaee01a Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 28 Mar 2025 17:22:53 +0100 Subject: [PATCH 01/69] Enable HTTP streaming by eliminating unnecessary response copying. To enable streaming for Study Data Export (RFC95). Unlike caching http requests `ContentCachingRequestWrapper` for enabling multiple request body reads, wrapping responses in `ContentCachingResponseWrapper` is not necessary and not used anywhere. The application caching behaviour (with `@Cachable` annotation) does not depend on any of these. --- .../ContentCachingRequestWrapperFilter.java | 38 +++++++++++++++++ .../ResettableHttpServletRequestFilter.java | 41 ------------------- 2 files changed, 38 insertions(+), 41 deletions(-) create mode 100644 src/main/java/org/cbioportal/legacy/web/util/ContentCachingRequestWrapperFilter.java delete mode 100644 src/main/java/org/cbioportal/legacy/web/util/ResettableHttpServletRequestFilter.java diff --git a/src/main/java/org/cbioportal/legacy/web/util/ContentCachingRequestWrapperFilter.java b/src/main/java/org/cbioportal/legacy/web/util/ContentCachingRequestWrapperFilter.java new file mode 100644 index 00000000000..db1ae0c19ad --- /dev/null +++ b/src/main/java/org/cbioportal/legacy/web/util/ContentCachingRequestWrapperFilter.java @@ -0,0 +1,38 @@ +package org.cbioportal.legacy.web.util; + +import jakarta.servlet.*; +import jakarta.servlet.http.HttpServletRequest; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.util.ContentCachingRequestWrapper; + +import java.io.IOException; + + +/** + * Filter that wraps the request in a {@link ContentCachingRequestWrapper} to allow multiple reads of the request body. + * For controllers that receive study view data filters, the first read is done by {@link InvolvedCancerStudyExtractorInterceptor} + * security interceptor to extract involved study ids to apply autorization, and the second read will be done by the actual controller. + * + * Example of use: For controllers that receive study view data filters, + * the first read is performed by the {@link InvolvedCancerStudyExtractorInterceptor} security interceptor. + * This interceptor extracts the involved study IDs and set them as request attribute that is necessary for the following authorization annotation on the controller level. + * {@code @PreAuthorize("hasPermission(#involvedCancerStudies, 'Collection', T(org.cbioportal.legacy.utils.security.AccessLevel).READ)")} + * The second read is then executed by the actual controller to process the data. + * + * @author ochoaa + * @author Ruslan Forostianov + */ +@Component +public class ContentCachingRequestWrapperFilter implements Filter { + private final Logger LOG = LoggerFactory.getLogger(ContentCachingRequestWrapperFilter.class); + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { + ContentCachingRequestWrapper wrappedRequest = new ContentCachingRequestWrapper((HttpServletRequest) request); + LOG.trace("Wrapping request for multiple reads of request body"); + filterChain.doFilter(wrappedRequest, response); + } + +} diff --git a/src/main/java/org/cbioportal/legacy/web/util/ResettableHttpServletRequestFilter.java b/src/main/java/org/cbioportal/legacy/web/util/ResettableHttpServletRequestFilter.java deleted file mode 100644 index 0b65f6e148b..00000000000 --- a/src/main/java/org/cbioportal/legacy/web/util/ResettableHttpServletRequestFilter.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.cbioportal.legacy.web.util; - -import java.io.IOException; - -import jakarta.servlet.*; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; -import org.slf4j.LoggerFactory; -import org.slf4j.Logger; -import org.springframework.stereotype.Component; -import org.springframework.web.util.ContentCachingRequestWrapper; -import org.springframework.web.util.ContentCachingResponseWrapper; - - -/** - * - * @author ochoaa - * - */ -@Component -public class ResettableHttpServletRequestFilter implements Filter { - private Logger LOG = LoggerFactory.getLogger(ResettableHttpServletRequestFilter.class); - - @Override - public void init(FilterConfig aChain) throws ServletException { - // do nothing - } - - @Override - public void doFilter(ServletRequest request, ServletResponse response, FilterChain filterChain) throws IOException, ServletException { - ContentCachingRequestWrapper wrappedRequest = new ContentCachingRequestWrapper((HttpServletRequest) request); - ContentCachingResponseWrapper wrappedResponse = new ContentCachingResponseWrapper((HttpServletResponse) response); - filterChain.doFilter(wrappedRequest, wrappedResponse); - wrappedResponse.copyBodyToResponse(); - } - - @Override - public void destroy() { - // do nothing - } -} From e36e34ff4438ff6a644d7f32b6686a9070fc3000 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 19 Mar 2025 17:33:53 +0100 Subject: [PATCH 02/69] Port clinical export - Introduce long table - Convert records back to pojos. Record fields are mapped by position with mybatis - Write tests for clinical data table - Make conditional Java Config --- pom.xml | 4 + .../export/CancerStudyMetadataService.java | 17 + .../export/ClinicalAttributeDataService.java | 99 ++++ .../export/ClinicalAttributeDataWriter.java | 60 ++ .../export/ClinicalPatientAttributeValue.java | 41 ++ .../export/ClinicalSampleAttributeValue.java | 51 ++ .../application/file/export/ExportConfig.java | 70 +++ .../file/export/ExportController.java | 37 ++ .../file/export/ExportService.java | 91 +++ .../file/export/FileWriterFactory.java | 8 + .../file/export/KeyValueMetadataWriter.java | 93 +++ .../file/export/MafRecordService.java | 77 +++ .../file/export/MafRecordWriter.java | 79 +++ .../application/file/export/TSVUtil.java | 20 + .../export/ZipOutputStreamWriterFactory.java | 44 ++ .../mappers/CancerStudyMetadataMapper.java | 7 + .../mappers/ClinicalAttributeDataMapper.java | 16 + .../file/model/CancerStudyMetadata.java | 124 ++++ .../file/model/CaseListMetadata.java | 66 +++ .../file/model/ClinicalAttribute.java | 74 +++ .../ClinicalSampleAttributesMetadata.java | 42 ++ .../file/model/GenericDatatypeMetadata.java | 7 + .../model/GenericProfileDatatypeMetadata.java | 105 ++++ .../application/file/model/LongTable.java | 47 ++ .../application/file/model/MafRecord.java | 531 ++++++++++++++++++ .../file/model/StudyRelatedMetadata.java | 5 + .../export/CancerStudyMetadataMapper.xml | 19 + .../export/ClinicalAttributeDataMapper.xml | 55 ++ .../ClinicalAttributeDataServiceTests.java | 99 ++++ .../file/export/TestFakeCursor.java | 45 ++ 30 files changed, 2033 insertions(+) create mode 100644 src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ExportConfig.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ExportController.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ExportService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java create mode 100644 src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/MafRecordService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/TSVUtil.java create mode 100644 src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java create mode 100644 src/main/java/org/cbioportal/application/file/model/CaseListMetadata.java create mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java create mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java create mode 100644 src/main/java/org/cbioportal/application/file/model/LongTable.java create mode 100644 src/main/java/org/cbioportal/application/file/model/MafRecord.java create mode 100644 src/main/java/org/cbioportal/application/file/model/StudyRelatedMetadata.java create mode 100644 src/main/resources/mappers/export/CancerStudyMetadataMapper.xml create mode 100644 src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml create mode 100644 src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java create mode 100644 src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java diff --git a/pom.xml b/pom.xml index 7153bcb1b07..7a574928e6a 100644 --- a/pom.xml +++ b/pom.xml @@ -182,6 +182,10 @@ mybatis-spring-boot-starter ${mybatis.starter.version} + + com.zaxxer + HikariCP + org.redisson redisson diff --git a/src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java b/src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java new file mode 100644 index 00000000000..a25c16482ce --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java @@ -0,0 +1,17 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; +import org.cbioportal.application.file.model.CancerStudyMetadata; + +public class CancerStudyMetadataService { + + private final CancerStudyMetadataMapper cancerStudyMetadataMapper; + + public CancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataMapper) { + this.cancerStudyMetadataMapper = cancerStudyMetadataMapper; + } + + public CancerStudyMetadata getCancerStudyMetadata(String studyId) { + return cancerStudyMetadataMapper.getCancerStudyMetadata(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java new file mode 100644 index 00000000000..848af2d8256 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java @@ -0,0 +1,99 @@ +package org.cbioportal.application.file.export; + +import com.google.common.collect.Iterables; +import com.google.common.collect.Iterators; +import com.google.common.collect.PeekingIterator; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.LongTable; + +import java.util.*; +import java.util.function.Function; + +/** + * Service to retrieve clinical data attributes and values for a study as a long table + */ +public class ClinicalAttributeDataService { + + public static final Set NOT_EXPORTABLE_SAMPLE_ATTRIBUTES = Set.of("MUTATION_COUNT", "FRACTION_GENOME_ALTERED"); + + private final ClinicalAttributeDataMapper clinicalAttributeDataMapper; + + public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttributeDataMapper) { + this.clinicalAttributeDataMapper = clinicalAttributeDataMapper; + } + + public LongTable getClinicalSampleAttributeData(String studyId) { + List clinicalSampleAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId); + Iterable clinicalSampleAttributeValues = clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId); + + Iterable completeSampleAttributes = Iterables.concat( + List.of(ClinicalAttribute.PATIENT_ID, ClinicalAttribute.SAMPLE_ID), + clinicalSampleAttributes); + return new LongTable<>(completeSampleAttributes, new Iterator<>() { + private final PeekingIterator clinicalSampleAttributeValueIterator = Iterators.peekingIterator(clinicalSampleAttributeValues.iterator()); + + @Override + public boolean hasNext() { + return clinicalSampleAttributeValueIterator.hasNext(); + } + + @Override + public Function> next() { + while (clinicalSampleAttributeValueIterator.hasNext()) { + ClinicalSampleAttributeValue clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); + HashMap attributeValueMap = new HashMap<>(); + attributeValueMap.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), clinicalSampleAttributeValue.getPatientId()); + attributeValueMap.put(ClinicalAttribute.SAMPLE_ID.getAttributeId(), clinicalSampleAttributeValue.getSampleId()); + if (!NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalSampleAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalSampleAttributeValue.getAttributeId(), clinicalSampleAttributeValue.getAttributeValue()); + } + while (clinicalSampleAttributeValueIterator.hasNext() + && clinicalSampleAttributeValueIterator.peek().getPatientId().equals(clinicalSampleAttributeValue.getPatientId()) + && clinicalSampleAttributeValueIterator.peek().getSampleId().equals(clinicalSampleAttributeValue.getSampleId())) { + clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); + if (!NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalSampleAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalSampleAttributeValue.getAttributeId(), clinicalSampleAttributeValue.getAttributeValue()); + } + } + return (clinicalAttribute -> Optional.ofNullable(attributeValueMap.get(clinicalAttribute.getAttributeId()))); + } + throw new IllegalStateException("No more elements"); + } + }); + } + + public LongTable getClinicalPatientAttributeData(String studyId) { + List clinicalPatientAttributes = clinicalAttributeDataMapper.getClinicalPatientAttributes(studyId); + Iterable clinicalPatientAttributeValues = clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId); + + Iterable completePatientAttributes = Iterables.concat( + List.of(ClinicalAttribute.PATIENT_ID), + clinicalPatientAttributes); + return new LongTable<>(completePatientAttributes, new Iterator<>() { + private final PeekingIterator clinicalPatientAttributeValueIterator = Iterators.peekingIterator(clinicalPatientAttributeValues.iterator()); + + @Override + public boolean hasNext() { + return clinicalPatientAttributeValueIterator.hasNext(); + } + + @Override + public Function> next() { + while (clinicalPatientAttributeValueIterator.hasNext()) { + ClinicalPatientAttributeValue clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); + HashMap attributeValueMap = new HashMap<>(); + attributeValueMap.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), clinicalPatientAttributeValue.getPatientId()); + attributeValueMap.put(clinicalPatientAttributeValue.getAttributeId(), clinicalPatientAttributeValue.getAttributeValue()); + while (clinicalPatientAttributeValueIterator.hasNext() + && clinicalPatientAttributeValueIterator.peek().getPatientId().equals(clinicalPatientAttributeValue.getPatientId())) { + clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); + attributeValueMap.put(clinicalPatientAttributeValue.getAttributeId(), clinicalPatientAttributeValue.getAttributeValue()); + } + return (clinicalAttribute -> Optional.ofNullable(attributeValueMap.get(clinicalAttribute.getAttributeId()))); + } + throw new IllegalStateException("No more elements"); + } + }); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java new file mode 100644 index 00000000000..83ecc4a1781 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java @@ -0,0 +1,60 @@ +package org.cbioportal.application.file.export; + +import com.google.common.collect.Iterables; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.LongTable; + +import java.io.IOException; +import java.io.Writer; +import java.util.*; +import java.util.function.Function; + +import static org.cbioportal.application.file.export.TSVUtil.composeRow; +import static org.cbioportal.application.file.export.TSVUtil.composeRowOfOptionals; + +public class ClinicalAttributeDataWriter { + + private final Writer writer; + + /** + * @param writer - the writer to write the key-value metadata to + * e.g. StringWriter, FileWriter + */ + public ClinicalAttributeDataWriter(Writer writer) { + this.writer = writer; + } + + /** + * Writes model pojo to the cBioPortal clinical attribute format + */ + public void write(LongTable clinicalAttributeData) { + Iterable attributes = clinicalAttributeData.getColumns(); + writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDisplayName)); + writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDescription)); + writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDatatype)); + writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getPriority)); + writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getAttributeId)); + while (clinicalAttributeData.hasNext()) { + Function> row = clinicalAttributeData.next(); + writeRow(Iterables.transform(attributes, row::apply)); + } + } + + private void writeRow(Iterable> row) { + try { + writer.write(composeRowOfOptionals(row)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private void writeCommentsRow(Iterable row) { + try { + writer.write("#" + composeRow(row)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + +} diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java b/src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java new file mode 100644 index 00000000000..3f630ed98f5 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java @@ -0,0 +1,41 @@ +package org.cbioportal.application.file.export; + +public class ClinicalPatientAttributeValue { + private String patientId; + private String attributeId; + private String attributeValue; + + public ClinicalPatientAttributeValue() { + super(); + } + + public ClinicalPatientAttributeValue(String patientId, String attributeId, String attributeValue) { + this.patientId = patientId; + this.attributeId = attributeId; + this.attributeValue = attributeValue; + } + + public String getPatientId() { + return patientId; + } + + public void setPatientId(String patientId) { + this.patientId = patientId; + } + + public String getAttributeId() { + return attributeId; + } + + public void setAttributeId(String attributeId) { + this.attributeId = attributeId; + } + + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java b/src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java new file mode 100644 index 00000000000..7fab9e0efb0 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java @@ -0,0 +1,51 @@ +package org.cbioportal.application.file.export; + +public class ClinicalSampleAttributeValue { + private String patientId; + private String sampleId; + private String attributeId; + private String attributeValue; + + public ClinicalSampleAttributeValue() { + super(); + } + + public ClinicalSampleAttributeValue(String patientId, String sampleId, String attributeId, String attributeValue) { + this.patientId = patientId; + this.sampleId = sampleId; + this.attributeId = attributeId; + this.attributeValue = attributeValue; + } + + public String getPatientId() { + return patientId; + } + + public void setPatientId(String patientId) { + this.patientId = patientId; + } + + public String getSampleId() { + return sampleId; + } + + public void setSampleId(String sampleId) { + this.sampleId = sampleId; + } + + public String getAttributeId() { + return attributeId; + } + + public void setAttributeId(String attributeId) { + this.attributeId = attributeId; + } + + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java new file mode 100644 index 00000000000..4aee4a9c42f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -0,0 +1,70 @@ +package org.cbioportal.application.file.export; + +import com.zaxxer.hikari.HikariConfig; +import com.zaxxer.hikari.HikariDataSource; +import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; +import org.mybatis.spring.SqlSessionFactoryBean; +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.sql.DataSource; +import java.io.IOException; +import java.util.Properties; + +@Configuration +@ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") +@MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") +public class ExportConfig { + + @Bean + public CancerStudyMetadataService cancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataMapper) { + return new CancerStudyMetadataService(cancerStudyMetadataMapper); + } + + @Bean + public ClinicalAttributeDataService clinicalDataAttributeDataService(ClinicalAttributeDataMapper clinicalAttributeDataMapper) { + return new ClinicalAttributeDataService(clinicalAttributeDataMapper); + } + + @Bean + public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, + ClinicalAttributeDataService clinicalDataAttributeDataService) { + return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService); + } + + @Bean("exportSqlSessionFactory") + public SqlSessionFactoryBean exportSqlSessionFactory(@Qualifier("exportDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { + SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); + sessionFactory.setDataSource(dataSource); + sessionFactory.setMapperLocations( + applicationContext.getResources("classpath:mappers/export/*.xml")); + return sessionFactory; + } + + @Bean + public DataSource exportDataSource(DataSourceProperties mysqlDataSourceProperties) { + HikariConfig hikariConfig = new HikariConfig(); + hikariConfig.setJdbcUrl(mysqlDataSourceProperties.getUrl()); + hikariConfig.setUsername(mysqlDataSourceProperties.getUsername()); + hikariConfig.setPassword(mysqlDataSourceProperties.getPassword()); + + // Pool settings + //hikariConfig.setMaximumPoolSize(2); + //hikariConfig.setMinimumIdle(1); + + // Set MySQL streaming properties + Properties dsProperties = new Properties(); + dsProperties.setProperty("useCursorFetch", "true"); + dsProperties.setProperty("defaultFetchSize", "1000"); + hikariConfig.setDataSourceProperties(dsProperties); + + return new HikariDataSource(hikariConfig); + } + +} diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java new file mode 100644 index 00000000000..4efcdaedf5e --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -0,0 +1,37 @@ +package org.cbioportal.application.file.export; + +import jakarta.servlet.http.HttpServletResponse; +import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.OutputStream; + +@RestController +//How to have only one conditional on property in the config only +// https://stackoverflow.com/questions/62355615/define-a-spring-restcontroller-via-java-configuration +@ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") +public class ExportController { + + private final ExportService exportService; + + public ExportController(ExportService exportService) { + this.exportService = exportService; + } + + @PreAuthorize("hasPermission(#studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") + @GetMapping("/export/study/{studyId}.zip") + public void downloadStudyData(HttpServletResponse response, @PathVariable String studyId) throws IOException { + + response.setContentType(("application/zip")); + response.setHeader("Content-Disposition", "attachment; filename=\"" + studyId + ".zip\""); + + try (OutputStream out = response.getOutputStream(); BufferedOutputStream bof = new BufferedOutputStream(out); ZipOutputStreamWriterFactory zipOutputStreamWriterFactory = new ZipOutputStreamWriterFactory(bof)) { + exportService.exportStudyData(zipOutputStreamWriterFactory, studyId); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ExportService.java b/src/main/java/org/cbioportal/application/file/export/ExportService.java new file mode 100644 index 00000000000..24accff0522 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ExportService.java @@ -0,0 +1,91 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalSampleAttributesMetadata; +import org.cbioportal.application.file.model.LongTable; +import org.springframework.transaction.annotation.Transactional; + +import java.io.IOException; +import java.io.Writer; + +public class ExportService { + + private final CancerStudyMetadataService cancerStudyMetadataService; + private final ClinicalAttributeDataService clinicalDataAttributeDataService; + + public ExportService( + CancerStudyMetadataService cancerStudyMetadataService, + ClinicalAttributeDataService clinicalDataAttributeDataService) { + this.cancerStudyMetadataService = cancerStudyMetadataService; + this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; + } + + @Transactional + public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) throws IOException { + CancerStudyMetadata cancerStudyInfo = cancerStudyMetadataService.getCancerStudyMetadata(studyId); + try (Writer studyMetadataWriter = fileWriterFactory.newWriter("meta_study.txt")) { + new KeyValueMetadataWriter(studyMetadataWriter).write(cancerStudyInfo); + } + + // TODO detect what data types are available for a study and export them + // by iterating over the available data types and calling the appropriate fetchers and writers + // the boiler plate code below should be replaced by the above logic + + try (LongTable clinicalAttributeData = clinicalDataAttributeDataService.getClinicalSampleAttributeData(studyId)) { + if (clinicalAttributeData.hasNext()) { + ClinicalSampleAttributesMetadata clinicalSampleAttributesMetadata = new ClinicalSampleAttributesMetadata(studyId, "data_clinical_samples.txt"); + try (Writer clinicalSampleMetadataWriter = fileWriterFactory.newWriter("meta_clinical_samples.txt")) { + new KeyValueMetadataWriter(clinicalSampleMetadataWriter).write(clinicalSampleAttributesMetadata); + } + + try (Writer clinicalSampleDataWriter = fileWriterFactory.newWriter("data_clinical_samples.txt")) { + ClinicalAttributeDataWriter clinicalAttributeDataWriter = new ClinicalAttributeDataWriter(clinicalSampleDataWriter); + clinicalAttributeDataWriter.write(clinicalAttributeData); + } + } + } + + /* Iterator mafRecordIterator = Iterators.concat(molecularProfileList.stream().map(molecularProfile -> mafRecordFetcher.fetch(cancerStudyInfo.studyToSampleMap, molecularProfile.getStableId())).iterator()); + if (mafRecordIterator.hasNext()) { + GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata(stableId, + //TODO Use mol. alteration type and datatype from the map above instead + MolecularProfile.MolecularAlterationType.MUTATION_EXTENDED.toString(), "MAF", studyId, "data_mutations.txt", molecularProfileList.getFirst().getName(), molecularProfileList.getFirst().getDescription(), + //TODO where to get gene panel from? + Optional.empty(), + //Is it true for all data types? + true); + try (Writer mafMetaWriter = fileWriterFactory.newWriter("meta_mutations.txt")) { + new KeyValueMetadataWriter(mafMetaWriter).write(genericProfileDatatypeMetadata); + } + + try (Writer mafDataWriter = fileWriterFactory.newWriter("data_mutations.txt")) { + MafRecordWriter mafRecordWriter = new MafRecordWriter(mafDataWriter); + mafRecordWriter.write(mafRecordIterator); + } + } + + //TODO Move logic to newly created case list fetcher + List sampleLists = getStudiesSampleListsUseCase.execute(studyIds); + Map> sampleListsBySuffix = sampleLists.stream().map(sl -> { + sl.getSampleStableIds().retainAll(cancerStudyInfo.studyToSampleMap.get(sl.getCancerStudyStableId())); + return sl; + }).filter(sl -> !sl.getSampleStableIds().isEmpty()).collect(Collectors.groupingBy(sampleList -> sampleList.getStableId().replace(sampleList.getCancerStudyStableId(), ""))); + for (Map.Entry> entry : sampleListsBySuffix.entrySet()) { + String suffix = entry.getKey(); + //we skip this one as we have addGlobalCaseList=true for study + if ("_all".equals(suffix)) { + continue; + } + List suffixedSampleLists = entry.getValue(); + String newStableId = cancerStudyInfo.metadata.cancerStudyIdentifier() + suffix; + SortedSet mergedSapleIds = suffixedSampleLists.stream().flatMap(sl -> sl.getSampleStableIds().stream()).collect(Collectors.toCollection(TreeSet::new)); + try (Writer caseListWriter = fileWriterFactory.newWriter("case_lists/cases" + suffix + ".txt")) { + new KeyValueMetadataWriter(caseListWriter).write(new CaseListMetadata(studyId, newStableId, + //TODO Sometime name/description could contain number of samples from the original study + //maybe composing its own name and description would work better + suffixedSampleLists.getFirst().getName(), suffixedSampleLists.getFirst().getDescription(), mergedSapleIds)); + } + }*/ + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java b/src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java new file mode 100644 index 00000000000..d2b16e3de58 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java @@ -0,0 +1,8 @@ +package org.cbioportal.application.file.export; + +import java.io.IOException; +import java.io.Writer; + +public interface FileWriterFactory { + Writer newWriter(String name) throws IOException; +} diff --git a/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java b/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java new file mode 100644 index 00000000000..5df64c60db6 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java @@ -0,0 +1,93 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.CaseListMetadata; +import org.cbioportal.application.file.model.GenericDatatypeMetadata; +import org.cbioportal.application.file.model.GenericProfileDatatypeMetadata; + +import java.io.IOException; +import java.io.Writer; +import java.util.LinkedHashMap; + +/** + * A serializer for file model records that serializes them the cBioPortal key-value metadata format. + * e.g. meta_study.txt + */ +public class KeyValueMetadataWriter { + private final Writer writer; + + /** + * @param writer - the writer to write the key-value metadata to + * e.g. StringWriter, FileWriter + */ + public KeyValueMetadataWriter(Writer writer) { + this.writer = writer; + } + + /** + * Write a cancer study metadata to the writer + */ + public void write(CancerStudyMetadata cancerStudyMetadata) { + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("type_of_cancer", cancerStudyMetadata.getTypeOfCancer()); + metadata.put("cancer_study_identifier", cancerStudyMetadata.getCancerStudyIdentifier()); + metadata.put("name", cancerStudyMetadata.getName()); + metadata.put("description", cancerStudyMetadata.getDescription()); + metadata.put("citation", cancerStudyMetadata.getCitation()); + metadata.put("pmid", cancerStudyMetadata.getPmid()); + metadata.put("groups", cancerStudyMetadata.getGroups()); + //metadata.put("add_global_case_list", cancerStudyMetadata.addGlobalCaseList() ? cancerStudyMetadata.addGlobalCaseList().toString() : null); + //metadata.put("tags_file", cancerStudyMetadata.tagsFile()); + metadata.put("reference_genome", cancerStudyMetadata.getReferenceGenome()); + write(metadata); + } + + /** + * Write a generic datatype metadata to the writer + */ + public void write(GenericDatatypeMetadata genericDatatypeMetadata) { + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("cancer_study_identifier", genericDatatypeMetadata.getCancerStudyIdentifier()); + metadata.put("genetic_alteration_type", genericDatatypeMetadata.getGeneticAlterationType()); + metadata.put("datatype", genericDatatypeMetadata.getDatatype()); + metadata.put("data_filename", genericDatatypeMetadata.getDataFilename()); + write(metadata); + } + + /** + * Write a generic profile datatype metadata to the writer + */ + public void write(GenericProfileDatatypeMetadata genericProfileDatatypeMetadata) { + write((GenericDatatypeMetadata) genericProfileDatatypeMetadata); + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("stable_id", genericProfileDatatypeMetadata.getStableId()); + metadata.put("show_profile_in_analysis_tab", genericProfileDatatypeMetadata.getShowProfileInAnalysisTab().toString().toLowerCase()); + metadata.put("profile_name", genericProfileDatatypeMetadata.getProfileName()); + metadata.put("profile_description", genericProfileDatatypeMetadata.getProfileDescription()); + metadata.put("gene_panel", genericProfileDatatypeMetadata.getGenePanel()); + write(metadata); + } + + public void write(CaseListMetadata caseListMetadata) { + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("cancer_study_identifier", caseListMetadata.getCancerStudyIdentifier()); + metadata.put("stable_id", caseListMetadata.getStableId()); + metadata.put("case_list_name", caseListMetadata.getName()); + metadata.put("case_list_description", caseListMetadata.getDescription()); + metadata.put("case_list_ids", String.join("\t", caseListMetadata.getSampleIds())); + write(metadata); + } + private void write(LinkedHashMap metadata) { + metadata.forEach((key, value) -> { + try { + writer.write(composeKeyValueLine(key, value)); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); + } + + private static String composeKeyValueLine(String key, String value) { + return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/MafRecordService.java b/src/main/java/org/cbioportal/application/file/export/MafRecordService.java new file mode 100644 index 00000000000..f035ba3e954 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/MafRecordService.java @@ -0,0 +1,77 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.MafRecord; +import org.cbioportal.domain.studyview.StudyViewFilterContext; +import org.cbioportal.legacy.model.Mutation; +import org.cbioportal.legacy.web.parameter.SampleIdentifier; +import org.springframework.stereotype.Component; + +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +public class MafRecordService { + +/* + public Iterator fetch(Map> studyToSampleMap, String molecularProfileStableId) { + List sampleIds = List.copyOf(studyToSampleMap.values().stream().flatMap(Set::stream).toList()); + StudyViewFilterContext studyViewFilterContext = StudyViewFilterContext.builder() + .sampleIdentifiers(studyToSampleMap.entrySet().stream() + .flatMap(entry -> entry.getValue().stream().map(sampleId -> { + SampleIdentifier sampleIdentifier = new SampleIdentifier(); + sampleIdentifier.setStudyId(entry.getKey()); + sampleIdentifier.setSampleId(sampleId); + return sampleIdentifier; + })) + .collect(Collectors.toList())) + .build(); + List mutationList = getMutationsUseCase.execute(studyViewFilterContext); + return mutationList.stream() + //TODO let sql do it! + .filter(mutation -> studyToSampleMap.get(mutation.getStudyId()).contains(mutation.getSampleId())) + .map(mutation -> new MafRecord( + mutation.getGene().getHugoGeneSymbol(), + mutation.getGene().getEntrezGeneId().toString(), + mutation.getCenter(), + mutation.getNcbiBuild(), + mutation.getChr(), + mutation.getStartPosition(), + mutation.getEndPosition(), + "+", + mutation.getMutationType(), + mutation.getVariantType(), + mutation.getReferenceAllele(), + mutation.getTumorSeqAllele(), + //TODO check if this is correct + mutation.getTumorSeqAllele(), + mutation.getDbSnpRs(), + mutation.getDbSnpValStatus(), + mutation.getSampleId(), + mutation.getMatchedNormSampleBarcode(), + mutation.getMatchNormSeqAllele1(), + mutation.getMatchNormSeqAllele2(), + mutation.getTumorValidationAllele1(), + mutation.getTumorValidationAllele2(), + mutation.getMatchNormValidationAllele1(), + mutation.getMatchNormValidationAllele2(), + mutation.getVerificationStatus(), + mutation.getValidationStatus(), + mutation.getMutationStatus(), + mutation.getSequencingPhase(), + mutation.getSequenceSource(), + mutation.getValidationMethod(), + mutation.getScore() == null ? null : mutation.getScore(), + mutation.getBamFile(), + mutation.getSequencer(), + //TODO how to calculate HgvpShort? + "", + mutation.getTumorAltCount(), + mutation.getTumorRefCount(), + mutation.getNormalAltCount(), + mutation.getNormalRefCount() + //TODO export mutation.annotationJSON ? + )).iterator(); + }*/ +} diff --git a/src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java b/src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java new file mode 100644 index 00000000000..97ed0275b78 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java @@ -0,0 +1,79 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.MafRecord; + +import java.io.IOException; +import java.io.Writer; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.function.Function; + +import static org.cbioportal.application.file.export.TSVUtil.composeRow; + +/** + * Writes MAF records to a writer + */ +public class MafRecordWriter { + private final Writer writer; + + private static final LinkedHashMap> MAF_ROW = new LinkedHashMap<>(); + static { + MAF_ROW.put("Hugo_Symbol", MafRecord::getHugoSymbol); + MAF_ROW.put("Entrez_Gene_Id", MafRecord::getEntrezGeneId); + MAF_ROW.put("Center", MafRecord::getCenter); + MAF_ROW.put("NCBI_Build", MafRecord::getNcbiBuild); + MAF_ROW.put("Chromosome", MafRecord::getChromosome); + MAF_ROW.put("Start_Position", (mafRecord -> mafRecord.getStartPosition() == null ? null : mafRecord.getStartPosition().toString())); + MAF_ROW.put("End_Position", mafRecord -> mafRecord.getEndPosition() == null ? null : mafRecord.getEndPosition().toString()); + MAF_ROW.put("Strand", MafRecord::getStrand); + MAF_ROW.put("Variant_Classification", MafRecord::getVariantClassification); + MAF_ROW.put("Variant_Type", MafRecord::getVariantType); + MAF_ROW.put("Reference_Allele", MafRecord::getReferenceAllele); + MAF_ROW.put("Tumor_Seq_Allele1", MafRecord::getTumorSeqAllele1); + MAF_ROW.put("Tumor_Seq_Allele2", MafRecord::getTumorSeqAllele2); + MAF_ROW.put("dbSNP_RS", MafRecord::getDbSnpRs); + MAF_ROW.put("dbSNP_Val_Status", MafRecord::getDbSnpValStatus); + MAF_ROW.put("Tumor_Sample_Barcode", MafRecord::getTumorSampleBarcode); + MAF_ROW.put("Matched_Norm_Sample_Barcode", MafRecord::getMatchedNormSampleBarcode); + MAF_ROW.put("Match_Norm_Seq_Allele1", MafRecord::getMatchNormSeqAllele1); + MAF_ROW.put("Match_Norm_Seq_Allele2", MafRecord::getMatchNormSeqAllele2); + MAF_ROW.put("Tumor_Validation_Allele1", MafRecord::getTumorValidationAllele1); + MAF_ROW.put("Tumor_Validation_Allele2", MafRecord::getTumorValidationAllele2); + MAF_ROW.put("Match_Norm_Validation_Allele1", MafRecord::getMatchNormValidationAllele1); + MAF_ROW.put("Match_Norm_Validation_Allele2", MafRecord::getMatchNormValidationAllele2); + MAF_ROW.put("Verification_Status", MafRecord::getVerificationStatus); + MAF_ROW.put("Validation_Status", MafRecord::getValidationStatus); + MAF_ROW.put("Mutation_Status", MafRecord::getMutationStatus); + MAF_ROW.put("Sequencing_Phase", MafRecord::getSequencingPhase); + MAF_ROW.put("Sequence_Source", MafRecord::getSequenceSource); + MAF_ROW.put("Validation_Method", MafRecord::getValidationMethod); + MAF_ROW.put("Score", MafRecord::getScore); + MAF_ROW.put("BAM_File", MafRecord::getBamFile); + MAF_ROW.put("Sequencer", MafRecord::getSequencer); + MAF_ROW.put("HGVSp_Short", MafRecord::getHgvspShort); + MAF_ROW.put("t_alt_count", (mafRecord -> mafRecord.gettAltCount() == null ? null : mafRecord.gettAltCount().toString())); + MAF_ROW.put("t_ref_count", (mafRecord -> mafRecord.gettRefCount() == null ? null : mafRecord.gettRefCount().toString())); + MAF_ROW.put("n_alt_count", (mafRecord -> mafRecord.getnAltCount() == null ? null : mafRecord.getnAltCount().toString())); + MAF_ROW.put("n_ref_count", (mafRecord -> mafRecord.getnRefCount() == null ? null : mafRecord.getnRefCount().toString())); + } + + public MafRecordWriter(Writer writer) { + this.writer = writer; + } + + public void write(Iterator maf) { + writeRow(MAF_ROW.sequencedKeySet()); + while (maf.hasNext()) { + MafRecord mafRecord = maf.next(); + writeRow(MAF_ROW.sequencedValues().stream().map(factory -> factory.apply(mafRecord)).toList()); + } + } + + private void writeRow(Iterable row) { + try { + writer.write(composeRow(row)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/TSVUtil.java b/src/main/java/org/cbioportal/application/file/export/TSVUtil.java new file mode 100644 index 00000000000..20dff1e1ff9 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/TSVUtil.java @@ -0,0 +1,20 @@ +package org.cbioportal.application.file.export; + +import com.google.common.collect.Iterables; + +import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +public class TSVUtil { + public static final String TAB = "\t"; + + public static String composeRow(Iterable row) { + return composeRowOfOptionals(Iterables.transform(row, Optional::ofNullable)); + } + + public static String composeRowOfOptionals(Iterable> row) { + return StreamSupport.stream(row.spliterator(), false) + .map(s -> s.map(string -> string.replace(TAB, "\\t")).orElse("")).collect(Collectors.joining(TAB)) + "\n"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java b/src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java new file mode 100644 index 00000000000..76d21074aaa --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java @@ -0,0 +1,44 @@ +package org.cbioportal.application.file.export; + +import java.io.Closeable; +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +public class ZipOutputStreamWriterFactory implements FileWriterFactory, Closeable { + + private final ZipOutputStream zipOutputStream; + + public ZipOutputStreamWriterFactory(OutputStream outputStream) { + this.zipOutputStream = new ZipOutputStream(outputStream); + } + + @Override + public Writer newWriter(String name) throws IOException { + return new ZipEntryOutputStreamWriter(name, zipOutputStream); + } + + @Override + public void close() throws IOException { + zipOutputStream.close(); + } + + static class ZipEntryOutputStreamWriter extends OutputStreamWriter { + private final ZipOutputStream zipOutputStream; + + public ZipEntryOutputStreamWriter(String name, ZipOutputStream zipOutputStream) throws IOException { + super(zipOutputStream); + zipOutputStream.putNextEntry(new ZipEntry(name)); + this.zipOutputStream = zipOutputStream; + } + + @Override + public void close() throws IOException { + flush(); + zipOutputStream.closeEntry(); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java new file mode 100644 index 00000000000..63aaf467d69 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java @@ -0,0 +1,7 @@ +package org.cbioportal.application.file.export.mappers; + +import org.cbioportal.application.file.model.CancerStudyMetadata; + +public interface CancerStudyMetadataMapper { + CancerStudyMetadata getCancerStudyMetadata(String studyId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java new file mode 100644 index 00000000000..c5e6d5646a7 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java @@ -0,0 +1,16 @@ +package org.cbioportal.application.file.export.mappers; + +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.export.ClinicalPatientAttributeValue; +import org.cbioportal.application.file.export.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.model.ClinicalAttribute; + +import java.util.List; + +public interface ClinicalAttributeDataMapper { + + List getClinicalSampleAttributes(String studyId); + Cursor getClinicalSampleAttributeValues(String studyId); + List getClinicalPatientAttributes(String studyId); + Cursor getClinicalPatientAttributeValues(String studyId); +} diff --git a/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java new file mode 100644 index 00000000000..40900e3c7c1 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java @@ -0,0 +1,124 @@ +package org.cbioportal.application.file.model; + +/** + * Represents metadata for a cancer study. + */ +public class CancerStudyMetadata { + /** + * The cancer type abbreviation, e.g., "brca". This should be the same cancer type as specified in the meta_cancer_type.txt file, if available. The type can be "mixed" for studies with multiple cancer types. + */ + private String typeOfCancer; + + /** + * A string used to uniquely identify this cancer study within the database, e.g., "brca_joneslab_2013". + */ + private String cancerStudyIdentifier; + + /** + * The name of the cancer study, e.g., "Breast Cancer (Jones Lab 2013)". + */ + private String name; + + /** + * A description of the cancer study, e.g., "Comprehensive profiling of 103 breast cancer samples. Generated by the Jones Lab 2013". This description may contain one or more URLs to relevant information. + */ + private String description; + + /** + * A relevant citation, e.g., "TCGA, Nature 2012". + */ + private String citation; + + /** + * One or more relevant pubmed ids (comma separated without whitespace). If used, the field citation has to be filled, too. + */ + private String pmid; + + /** + * When using an authenticating cBioPortal, lists the user-groups that are allowed access to this study. Multiple groups are separated with a semicolon ";". The study will be invisible to users not in at least one of the listed groups, as if it wasn't loaded at all. e.g., "PUBLIC;GDAC;SU2C-PI3K". see User-Authorization for more information on groups. + */ + private String groups; + + /** + * The study reference genome (e.g. hg19, hg38). Without specifying this property, the study will be assigned to the reference genome specified in application.properties (property ucsc.build). + */ + private String referenceGenome; + + public CancerStudyMetadata() { + } + + public CancerStudyMetadata(String typeOfCancer, String cancerStudyIdentifier, String name, String description, String citation, String pmid, String groups, String referenceGenome) { + this.typeOfCancer = typeOfCancer; + this.cancerStudyIdentifier = cancerStudyIdentifier; + this.name = name; + this.description = description; + this.citation = citation; + this.pmid = pmid; + this.groups = groups; + this.referenceGenome = referenceGenome; + } + + public String getTypeOfCancer() { + return typeOfCancer; + } + + public void setTypeOfCancer(String typeOfCancer) { + this.typeOfCancer = typeOfCancer; + } + + public String getCancerStudyIdentifier() { + return cancerStudyIdentifier; + } + + public void setCancerStudyIdentifier(String cancerStudyIdentifier) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getCitation() { + return citation; + } + + public void setCitation(String citation) { + this.citation = citation; + } + + public String getPmid() { + return pmid; + } + + public void setPmid(String pmid) { + this.pmid = pmid; + } + + public String getGroups() { + return groups; + } + + public void setGroups(String groups) { + this.groups = groups; + } + + public String getReferenceGenome() { + return referenceGenome; + } + + public void setReferenceGenome(String referenceGenome) { + this.referenceGenome = referenceGenome; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/CaseListMetadata.java b/src/main/java/org/cbioportal/application/file/model/CaseListMetadata.java new file mode 100644 index 00000000000..0926850ffba --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/CaseListMetadata.java @@ -0,0 +1,66 @@ +package org.cbioportal.application.file.model; + +import java.util.SequencedSet; + +/** + * Represents metadata for a case list. + */ +public class CaseListMetadata implements StudyRelatedMetadata { + private String cancerStudyIdentifier; + private String stableId; + private String name; + private String description; + private SequencedSet sampleIds; + + public CaseListMetadata() { + } + + public CaseListMetadata(String cancerStudyIdentifier, String stableId, String name, String description, SequencedSet sampleIds) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + this.stableId = stableId; + this.name = name; + this.description = description; + this.sampleIds = sampleIds; + } + + @Override + public String getCancerStudyIdentifier() { + return cancerStudyIdentifier; + } + + public void setCancerStudyIdentifier(String cancerStudyIdentifier) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + } + + public String getStableId() { + return stableId; + } + + public void setStableId(String stableId) { + this.stableId = stableId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public SequencedSet getSampleIds() { + return sampleIds; + } + + public void setSampleIds(SequencedSet sampleIds) { + this.sampleIds = sampleIds; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java new file mode 100644 index 00000000000..426ec596ee4 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java @@ -0,0 +1,74 @@ +package org.cbioportal.application.file.model; + +public class ClinicalAttribute { + private String displayName; + private String description; + private String datatype; + private String priority; + private String attributeId; + + public static final ClinicalAttribute PATIENT_ID = new ClinicalAttribute( + "Patient Identifier", + "Patient Identifier", + "STRING", + "1", + "PATIENT_ID"); + + public static final ClinicalAttribute SAMPLE_ID = new ClinicalAttribute( + "Sample Identifier", + "Sample Identifier", + "STRING", + "1", + "SAMPLE_ID"); + + public ClinicalAttribute() { + } + + public ClinicalAttribute(String displayName, String description, String datatype, String priority, String attributeId) { + this.displayName = displayName; + this.description = description; + this.datatype = datatype; + this.priority = priority; + this.attributeId = attributeId; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getDatatype() { + return datatype; + } + + public void setDatatype(String datatype) { + this.datatype = datatype; + } + + public String getPriority() { + return priority; + } + + public void setPriority(String priority) { + this.priority = priority; + } + + public String getAttributeId() { + return attributeId; + } + + public void setAttributeId(String attributeId) { + this.attributeId = attributeId; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java b/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java new file mode 100644 index 00000000000..8af4fbdd078 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java @@ -0,0 +1,42 @@ +package org.cbioportal.application.file.model; + +public class ClinicalSampleAttributesMetadata implements GenericDatatypeMetadata { + private String cancerStudyIdentifier; + private String dataFilename; + + public ClinicalSampleAttributesMetadata() { + } + + public ClinicalSampleAttributesMetadata(String cancerStudyIdentifier, String dataFilename) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + this.dataFilename = dataFilename; + } + + public String getCancerStudyIdentifier() { + return cancerStudyIdentifier; + } + + public void setCancerStudyIdentifier(String cancerStudyIdentifier) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + } + + @Override + public String getDataFilename() { + return dataFilename; + } + + public void setDataFilename(String dataFilename) { + this.dataFilename = dataFilename; + } + + @Override + public String getGeneticAlterationType() { + return "CLINICAL"; + } + + @Override + public String getDatatype() { + return "SAMPLE_ATTRIBUTES"; + } + +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java new file mode 100644 index 00000000000..17b0b7255ef --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java @@ -0,0 +1,7 @@ +package org.cbioportal.application.file.model; + +public interface GenericDatatypeMetadata extends StudyRelatedMetadata { + String getGeneticAlterationType(); + String getDatatype(); + String getDataFilename(); +} diff --git a/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java new file mode 100644 index 00000000000..3927bf78e09 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java @@ -0,0 +1,105 @@ +package org.cbioportal.application.file.model; + +import java.util.Optional; + +public class GenericProfileDatatypeMetadata implements GenericDatatypeMetadata { + private String stableId; + private String geneticAlterationType; + private String datatype; + private String cancerStudyIdentifier; + private String dataFilename; + private String profileName; + private String profileDescription; + private String genePanel; + private Boolean showProfileInAnalysisTab; + + public GenericProfileDatatypeMetadata() { + } + + public GenericProfileDatatypeMetadata(String stableId, String geneticAlterationType, String datatype, String cancerStudyIdentifier, String dataFilename, String profileName, String profileDescription, String genePanel, Boolean showProfileInAnalysisTab) { + this.stableId = stableId; + this.geneticAlterationType = geneticAlterationType; + this.datatype = datatype; + this.cancerStudyIdentifier = cancerStudyIdentifier; + this.dataFilename = dataFilename; + this.profileName = profileName; + this.profileDescription = profileDescription; + this.genePanel = genePanel; + this.showProfileInAnalysisTab = showProfileInAnalysisTab; + } + + public String getStableId() { + return stableId; + } + + public void setStableId(String stableId) { + this.stableId = stableId; + } + + @Override + public String getGeneticAlterationType() { + return geneticAlterationType; + } + + public void setGeneticAlterationType(String geneticAlterationType) { + this.geneticAlterationType = geneticAlterationType; + } + + @Override + public String getDatatype() { + return datatype; + } + + public void setDatatype(String datatype) { + this.datatype = datatype; + } + + public String getCancerStudyIdentifier() { + return cancerStudyIdentifier; + } + + public void setCancerStudyIdentifier(String cancerStudyIdentifier) { + this.cancerStudyIdentifier = cancerStudyIdentifier; + } + + @Override + public String getDataFilename() { + return dataFilename; + } + + public void setDataFilename(String dataFilename) { + this.dataFilename = dataFilename; + } + + public String getProfileName() { + return profileName; + } + + public void setProfileName(String profileName) { + this.profileName = profileName; + } + + public String getProfileDescription() { + return profileDescription; + } + + public void setProfileDescription(String profileDescription) { + this.profileDescription = profileDescription; + } + + public String getGenePanel() { + return genePanel; + } + + public void setGenePanel(String genePanel) { + this.genePanel = genePanel; + } + + public Boolean getShowProfileInAnalysisTab() { + return showProfileInAnalysisTab; + } + + public void setShowProfileInAnalysisTab(Boolean showProfileInAnalysisTab) { + this.showProfileInAnalysisTab = showProfileInAnalysisTab; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/LongTable.java b/src/main/java/org/cbioportal/application/file/model/LongTable.java new file mode 100644 index 00000000000..f7def67e5f7 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/LongTable.java @@ -0,0 +1,47 @@ +package org.cbioportal.application.file.model; + +import java.io.Closeable; +import java.io.IOException; +import java.util.Iterator; +import java.util.Optional; +import java.util.function.Function; + +/** + * Generic memory efficient representation of a long table with columns and rows. + * The long here means the table has much more rows than columns. The number of columns is fixed. + * The class implements an iterator (single pass) over rows, where each row is a function from column to optional value. + * It also provides an iterable (multiple passes) over columns. + * @param - column type + * @param - row type + */ +public class LongTable implements Iterator>>, Closeable { + + private final Iterable columns; + private final Iterator>> rows; + + public LongTable(Iterable columns, Iterator>> rows) { + this.rows = rows; + this.columns = columns; + } + + public Iterable getColumns() { + return columns; + } + + @Override + public boolean hasNext() { + return rows.hasNext(); + } + + @Override + public Function> next() { + return rows.next(); + } + + @Override + public void close() throws IOException { + if (rows instanceof Closeable) { + ((Closeable) rows).close(); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/MafRecord.java b/src/main/java/org/cbioportal/application/file/model/MafRecord.java new file mode 100644 index 00000000000..7d30fd3c8a6 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/MafRecord.java @@ -0,0 +1,531 @@ +package org.cbioportal.application.file.model; + +/** + * Represents a record in a Mutation Annotation Format (MAF) file. + */ +//TODO Do we really need this intermediate class? +public class MafRecord { + /** + * A HUGO gene symbol. + */ + private String hugoSymbol; + + /** + * A Entrez Gene identifier. + */ + private String entrezGeneId; + + /** + * The sequencing center. + */ + private String center; + + /** + * The Genome Reference Consortium Build used by a variant calling software. It must be "GRCh37" or "GRCh38" for a human, and "GRCm38" for a mouse. + */ + private String ncbiBuild; + + /** + * A chromosome number, e.g., "7". + */ + private String chromosome; + + /** + * Start position of event. + */ + private Long startPosition; + + /** + * End position of event. + */ + private Long endPosition; + + /** + * We assume that the mutation is reported for the + strand. + */ + private String strand; + + /** + * Translational effect of variant allele, e.g. Missense_Mutation, Silent, etc. + */ + private String variantClassification; + + /** + * Variant Type, e.g. SNP, DNP, etc. + */ + private String variantType; + + /** + * The plus strand reference allele at this position. + */ + private String referenceAllele; + + /** + * Primary data genotype. + */ + private String tumorSeqAllele1; + + /** + * Primary data genotype. + */ + private String tumorSeqAllele2; + + /** + * Latest dbSNP rs ID. + */ + private String dbSnpRs; + + /** + * dbSNP validation status. + */ + private String dbSnpValStatus; + + /** + * This is the sample ID. Either a TCGA barcode (patient identifier will be extracted), or for non-TCGA data, a literal SAMPLE_ID as listed in the clinical data file. + */ + private String tumorSampleBarcode; + + /** + * The sample ID for the matched normal sample. + */ + private String matchedNormSampleBarcode; + + /** + * Primary data. + */ + private String matchNormSeqAllele1; + + /** + * Primary data. + */ + private String matchNormSeqAllele2; + + /** + * Secondary data from orthogonal technology. + */ + private String tumorValidationAllele1; + + /** + * Secondary data from orthogonal technology. + */ + private String tumorValidationAllele2; + + /** + * Secondary data from orthogonal technology. + */ + private String matchNormValidationAllele1; + + /** + * Secondary data from orthogonal technology. + */ + private String matchNormValidationAllele2; + + /** + * Second pass results from independent attempt using same methods as primary data source. "Verified", "Unknown" or "NA". + */ + private String verificationStatus; + + /** + * Second pass results from orthogonal technology. "Valid", "Invalid", "Untested", "Inconclusive", "Redacted", "Unknown" or "NA". + */ + private String validationStatus; + + /** + * "Somatic" or "Germline" are supported by the UI in Mutations tab. "None", "LOH" and "Wildtype" will not be loaded. Other values will be displayed as text. + */ + private String mutationStatus; + + /** + * Indicates current sequencing phase. + */ + private String sequencingPhase; + + /** + * Molecular assay type used to produce the analytes used for sequencing. + */ + private String sequenceSource; + + /** + * The assay platforms used for the validation call. + */ + private String validationMethod; + + /** + * Score + */ + private String score; + + /** + * The BAM file used to call the variant. + */ + private String bamFile; + + /** + * Instrument used to produce primary data. + */ + private String sequencer; + + /** + * Amino Acid Change, e.g. p.V600E. + */ + private String hgvspShort; + + /** + * Variant allele count (tumor). + */ + private Integer tAltCount; + + /** + * Reference allele count (tumor). + */ + private Integer tRefCount; + + /** + * Variant allele count (normal). + */ + private Integer nAltCount; + + /** + * Reference allele count (normal). + */ + private Integer nRefCount; + + public MafRecord() { + } + + public MafRecord(String hugoSymbol, String entrezGeneId, String center, String ncbiBuild, String chromosome, Long startPosition, Long endPosition, String strand, String variantClassification, String variantType, String referenceAllele, String tumorSeqAllele1, String tumorSeqAllele2, String dbSnpRs, String dbSnpValStatus, String tumorSampleBarcode, String matchedNormSampleBarcode, String matchNormSeqAllele1, String matchNormSeqAllele2, String tumorValidationAllele1, String tumorValidationAllele2, String matchNormValidationAllele1, String matchNormValidationAllele2, String verificationStatus, String validationStatus, String mutationStatus, String sequencingPhase, String sequenceSource, String validationMethod, String score, String bamFile, String sequencer, String hgvspShort, Integer tAltCount, Integer tRefCount, Integer nAltCount, Integer nRefCount) { + this.hugoSymbol = hugoSymbol; + this.entrezGeneId = entrezGeneId; + this.center = center; + this.ncbiBuild = ncbiBuild; + this.chromosome = chromosome; + this.startPosition = startPosition; + this.endPosition = endPosition; + this.strand = strand; + this.variantClassification = variantClassification; + this.variantType = variantType; + this.referenceAllele = referenceAllele; + this.tumorSeqAllele1 = tumorSeqAllele1; + this.tumorSeqAllele2 = tumorSeqAllele2; + this.dbSnpRs = dbSnpRs; + this.dbSnpValStatus = dbSnpValStatus; + this.tumorSampleBarcode = tumorSampleBarcode; + this.matchedNormSampleBarcode = matchedNormSampleBarcode; + this.matchNormSeqAllele1 = matchNormSeqAllele1; + this.matchNormSeqAllele2 = matchNormSeqAllele2; + this.tumorValidationAllele1 = tumorValidationAllele1; + this.tumorValidationAllele2 = tumorValidationAllele2; + this.matchNormValidationAllele1 = matchNormValidationAllele1; + this.matchNormValidationAllele2 = matchNormValidationAllele2; + this.verificationStatus = verificationStatus; + this.validationStatus = validationStatus; + this.mutationStatus = mutationStatus; + this.sequencingPhase = sequencingPhase; + this.sequenceSource = sequenceSource; + this.validationMethod = validationMethod; + this.score = score; + this.bamFile = bamFile; + this.sequencer = sequencer; + this.hgvspShort = hgvspShort; + this.tAltCount = tAltCount; + this.tRefCount = tRefCount; + this.nAltCount = nAltCount; + this.nRefCount = nRefCount; + } + + public String getHugoSymbol() { + return hugoSymbol; + } + + public void setHugoSymbol(String hugoSymbol) { + this.hugoSymbol = hugoSymbol; + } + + public String getEntrezGeneId() { + return entrezGeneId; + } + + public void setEntrezGeneId(String entrezGeneId) { + this.entrezGeneId = entrezGeneId; + } + + public String getCenter() { + return center; + } + + public void setCenter(String center) { + this.center = center; + } + + public String getNcbiBuild() { + return ncbiBuild; + } + + public void setNcbiBuild(String ncbiBuild) { + this.ncbiBuild = ncbiBuild; + } + + public String getChromosome() { + return chromosome; + } + + public void setChromosome(String chromosome) { + this.chromosome = chromosome; + } + + public Long getStartPosition() { + return startPosition; + } + + public void setStartPosition(Long startPosition) { + this.startPosition = startPosition; + } + + public Long getEndPosition() { + return endPosition; + } + + public void setEndPosition(Long endPosition) { + this.endPosition = endPosition; + } + + public String getStrand() { + return strand; + } + + public void setStrand(String strand) { + this.strand = strand; + } + + public String getVariantClassification() { + return variantClassification; + } + + public void setVariantClassification(String variantClassification) { + this.variantClassification = variantClassification; + } + + public String getVariantType() { + return variantType; + } + + public void setVariantType(String variantType) { + this.variantType = variantType; + } + + public String getReferenceAllele() { + return referenceAllele; + } + + public void setReferenceAllele(String referenceAllele) { + this.referenceAllele = referenceAllele; + } + + public String getTumorSeqAllele1() { + return tumorSeqAllele1; + } + + public void setTumorSeqAllele1(String tumorSeqAllele1) { + this.tumorSeqAllele1 = tumorSeqAllele1; + } + + public String getTumorSeqAllele2() { + return tumorSeqAllele2; + } + + public void setTumorSeqAllele2(String tumorSeqAllele2) { + this.tumorSeqAllele2 = tumorSeqAllele2; + } + + public String getDbSnpRs() { + return dbSnpRs; + } + + public void setDbSnpRs(String dbSnpRs) { + this.dbSnpRs = dbSnpRs; + } + + public String getDbSnpValStatus() { + return dbSnpValStatus; + } + + public void setDbSnpValStatus(String dbSnpValStatus) { + this.dbSnpValStatus = dbSnpValStatus; + } + + public String getTumorSampleBarcode() { + return tumorSampleBarcode; + } + + public void setTumorSampleBarcode(String tumorSampleBarcode) { + this.tumorSampleBarcode = tumorSampleBarcode; + } + + public String getMatchedNormSampleBarcode() { + return matchedNormSampleBarcode; + } + + public void setMatchedNormSampleBarcode(String matchedNormSampleBarcode) { + this.matchedNormSampleBarcode = matchedNormSampleBarcode; + } + + public String getMatchNormSeqAllele1() { + return matchNormSeqAllele1; + } + + public void setMatchNormSeqAllele1(String matchNormSeqAllele1) { + this.matchNormSeqAllele1 = matchNormSeqAllele1; + } + + public String getMatchNormSeqAllele2() { + return matchNormSeqAllele2; + } + + public void setMatchNormSeqAllele2(String matchNormSeqAllele2) { + this.matchNormSeqAllele2 = matchNormSeqAllele2; + } + + public String getTumorValidationAllele1() { + return tumorValidationAllele1; + } + + public void setTumorValidationAllele1(String tumorValidationAllele1) { + this.tumorValidationAllele1 = tumorValidationAllele1; + } + + public String getTumorValidationAllele2() { + return tumorValidationAllele2; + } + + public void setTumorValidationAllele2(String tumorValidationAllele2) { + this.tumorValidationAllele2 = tumorValidationAllele2; + } + + public String getMatchNormValidationAllele1() { + return matchNormValidationAllele1; + } + + public void setMatchNormValidationAllele1(String matchNormValidationAllele1) { + this.matchNormValidationAllele1 = matchNormValidationAllele1; + } + + public String getMatchNormValidationAllele2() { + return matchNormValidationAllele2; + } + + public void setMatchNormValidationAllele2(String matchNormValidationAllele2) { + this.matchNormValidationAllele2 = matchNormValidationAllele2; + } + + public String getVerificationStatus() { + return verificationStatus; + } + + public void setVerificationStatus(String verificationStatus) { + this.verificationStatus = verificationStatus; + } + + public String getValidationStatus() { + return validationStatus; + } + + public void setValidationStatus(String validationStatus) { + this.validationStatus = validationStatus; + } + + public String getMutationStatus() { + return mutationStatus; + } + + public void setMutationStatus(String mutationStatus) { + this.mutationStatus = mutationStatus; + } + + public String getSequencingPhase() { + return sequencingPhase; + } + + public void setSequencingPhase(String sequencingPhase) { + this.sequencingPhase = sequencingPhase; + } + + public String getSequenceSource() { + return sequenceSource; + } + + public void setSequenceSource(String sequenceSource) { + this.sequenceSource = sequenceSource; + } + + public String getValidationMethod() { + return validationMethod; + } + + public void setValidationMethod(String validationMethod) { + this.validationMethod = validationMethod; + } + + public String getScore() { + return score; + } + + public void setScore(String score) { + this.score = score; + } + + public String getBamFile() { + return bamFile; + } + + public void setBamFile(String bamFile) { + this.bamFile = bamFile; + } + + public String getSequencer() { + return sequencer; + } + + public void setSequencer(String sequencer) { + this.sequencer = sequencer; + } + + public String getHgvspShort() { + return hgvspShort; + } + + public void setHgvspShort(String hgvspShort) { + this.hgvspShort = hgvspShort; + } + + public Integer gettAltCount() { + return tAltCount; + } + + public void settAltCount(Integer tAltCount) { + this.tAltCount = tAltCount; + } + + public Integer gettRefCount() { + return tRefCount; + } + + public void settRefCount(Integer tRefCount) { + this.tRefCount = tRefCount; + } + + public Integer getnAltCount() { + return nAltCount; + } + + public void setnAltCount(Integer nAltCount) { + this.nAltCount = nAltCount; + } + + public Integer getnRefCount() { + return nRefCount; + } + + public void setnRefCount(Integer nRefCount) { + this.nRefCount = nRefCount; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/StudyRelatedMetadata.java b/src/main/java/org/cbioportal/application/file/model/StudyRelatedMetadata.java new file mode 100644 index 00000000000..a7a2ba90d7e --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/StudyRelatedMetadata.java @@ -0,0 +1,5 @@ +package org.cbioportal.application.file.model; + +public interface StudyRelatedMetadata { + String getCancerStudyIdentifier(); +} diff --git a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml new file mode 100644 index 00000000000..a84b47cf2e5 --- /dev/null +++ b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml @@ -0,0 +1,19 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml new file mode 100644 index 00000000000..4c1e71c2888 --- /dev/null +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -0,0 +1,55 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java new file mode 100644 index 00000000000..f6b217ad9fa --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java @@ -0,0 +1,99 @@ +package org.cbioportal.application.file.export; + +import org.apache.commons.compress.utils.Lists; +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.LongTable; +import org.junit.Test; + +import java.util.List; +import java.util.Optional; +import java.util.function.Function; + +import static org.junit.Assert.assertEquals; + +public class ClinicalAttributeDataServiceTests { + + ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(new ClinicalAttributeDataMapper() { + @Override + public List getClinicalSampleAttributes(String studyId) { + return List.of( + new ClinicalAttribute("test number sample displayName", "test number sample description", "NUMBER", "2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID"), + new ClinicalAttribute("test string sample displayName", "test string sample description", "STRING", "3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID")); + } + + @Override + public Cursor getClinicalSampleAttributeValues(String studyId) { + return new TestFakeCursor<>( + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "A"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "1"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "2"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_2", "TEST_SAMPLE_ID_3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "B")); + } + + @Override + public List getClinicalPatientAttributes(String studyId) { + return List.of( + new ClinicalAttribute("test number patient displayName", "test number patient description", "NUMBER", "4", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID"), + new ClinicalAttribute("test string patient displayName", "test string patient description", "STRING", "5", "TEST_STRING_PATIENT_ATTRIBUTE_ID")); + } + + @Override + public Cursor getClinicalPatientAttributeValues(String studyId) { + return new TestFakeCursor<>( + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID", "3"), + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_2", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "D")); + } + }); + + @Test + public void testGetClinicalSampleAttributeData() { + LongTable result = clinicalDataAttributeDataService.getClinicalSampleAttributeData("testStudyId"); + List clinicalAttributes = Lists.newArrayList(result.getColumns().iterator()); + assertEquals(4, clinicalAttributes.size()); + assertEquals(ClinicalAttribute.PATIENT_ID, clinicalAttributes.get(0)); + assertEquals(ClinicalAttribute.SAMPLE_ID, clinicalAttributes.get(1)); + ClinicalAttribute testNumberAttribute = clinicalAttributes.get(2); + assertEquals("TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", testNumberAttribute.getAttributeId()); + ClinicalAttribute testStringAttribute = clinicalAttributes.get(3); + assertEquals("TEST_STRING_SAMPLE_ATTRIBUTE_ID", testStringAttribute.getAttributeId()); + + List>> rows = Lists.newArrayList(result); + assertEquals(3, rows.size()); + assertEquals(Optional.of("TEST_PATIENT_ID_1"), rows.get(0).apply(ClinicalAttribute.PATIENT_ID)); + assertEquals(Optional.of("TEST_SAMPLE_ID_1"), rows.get(0).apply(ClinicalAttribute.SAMPLE_ID)); + assertEquals(Optional.of("1"), rows.get(0).apply(testNumberAttribute)); + assertEquals(Optional.of("A"), rows.get(0).apply(testStringAttribute)); + assertEquals(Optional.of("TEST_PATIENT_ID_1"), rows.get(1).apply(ClinicalAttribute.PATIENT_ID)); + assertEquals(Optional.of("TEST_SAMPLE_ID_2"), rows.get(1).apply(ClinicalAttribute.SAMPLE_ID)); + assertEquals(Optional.of("2"), rows.get(1).apply(testNumberAttribute)); + assertEquals(Optional.empty(), rows.get(1).apply(testStringAttribute)); + assertEquals(Optional.of("TEST_PATIENT_ID_2"), rows.get(2).apply(ClinicalAttribute.PATIENT_ID)); + assertEquals(Optional.of("TEST_SAMPLE_ID_3"), rows.get(2).apply(ClinicalAttribute.SAMPLE_ID)); + assertEquals(Optional.empty(), rows.get(2).apply(testNumberAttribute)); + assertEquals(Optional.of("B"), rows.get(2).apply(testStringAttribute)); + } + + @Test + public void testGetClinicalPatientAttributeData() { + LongTable result = clinicalDataAttributeDataService.getClinicalPatientAttributeData("testStudyId"); + List clinicalAttributes = Lists.newArrayList(result.getColumns().iterator()); + assertEquals(3, clinicalAttributes.size()); + assertEquals(ClinicalAttribute.PATIENT_ID, clinicalAttributes.get(0)); + ClinicalAttribute testNumberAttribute = clinicalAttributes.get(1); + assertEquals("TEST_NUMBER_PATIENT_ATTRIBUTE_ID", testNumberAttribute.getAttributeId()); + ClinicalAttribute testStringAttribute = clinicalAttributes.get(2); + assertEquals("TEST_STRING_PATIENT_ATTRIBUTE_ID", testStringAttribute.getAttributeId()); + + List>> rows = Lists.newArrayList(result); + assertEquals(2, rows.size()); + assertEquals(Optional.of("TEST_PATIENT_ID_1"), rows.get(0).apply(ClinicalAttribute.PATIENT_ID)); + assertEquals(Optional.of("3"), rows.get(0).apply(testNumberAttribute)); + assertEquals(Optional.of("C"), rows.get(0).apply(testStringAttribute)); + assertEquals(Optional.of("TEST_PATIENT_ID_2"), rows.get(1).apply(ClinicalAttribute.PATIENT_ID)); + assertEquals(Optional.empty(), rows.get(1).apply(testNumberAttribute)); + assertEquals(Optional.of("D"), rows.get(1).apply(testStringAttribute)); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java b/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java new file mode 100644 index 00000000000..1a735bf5635 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java @@ -0,0 +1,45 @@ +package org.cbioportal.application.file.export; + +import org.apache.ibatis.cursor.Cursor; + +import java.util.Arrays; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; + +public class TestFakeCursor implements Cursor { + private final Iterator iterator; + private boolean closed = false; + + public TestFakeCursor(T... ts) { + this.iterator = Arrays.stream(ts).iterator(); + } + + @Override + public Iterator iterator() { + if (closed) { + throw new IllegalStateException("Cursor is already closed."); + } + return iterator; + } + + @Override + public void close() { + closed = true; + } + + @Override + public boolean isOpen() { + return !closed; + } + + @Override + public boolean isConsumed() { + return !iterator.hasNext(); + } + + @Override + public int getCurrentIndex() { + return 0; + } +} \ No newline at end of file From 47c4bffdc72b450ce3e6cd92f56457e5fd1098b1 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 10:42:26 +0100 Subject: [PATCH 03/69] Enable genetic profile and MAF data export --- .../application/file/export/ExportConfig.java | 22 +++- .../file/export/ExportService.java | 63 ++++++---- .../file/export/GeneticProfileService.java | 20 ++++ .../file/export/MafRecordService.java | 78 ++----------- .../export/mappers/GeneticProfileMapper.java | 9 ++ .../file/export/mappers/MafRecordMapper.java | 8 ++ .../file/model/GeneticProfile.java | 110 ++++++++++++++++++ .../mappers/export/GeneticProfileMapper.xml | 23 ++++ .../mappers/export/MafRecordMapper.xml | 51 ++++++++ 9 files changed, 290 insertions(+), 94 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GeneticProfile.java create mode 100644 src/main/resources/mappers/export/GeneticProfileMapper.xml create mode 100644 src/main/resources/mappers/export/MafRecordMapper.xml diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 4aee4a9c42f..fe7cce9b102 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -4,6 +4,8 @@ import com.zaxxer.hikari.HikariDataSource; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; +import org.cbioportal.application.file.export.mappers.MafRecordMapper; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -26,16 +28,28 @@ public class ExportConfig { public CancerStudyMetadataService cancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataMapper) { return new CancerStudyMetadataService(cancerStudyMetadataMapper); } - + @Bean public ClinicalAttributeDataService clinicalDataAttributeDataService(ClinicalAttributeDataMapper clinicalAttributeDataMapper) { return new ClinicalAttributeDataService(clinicalAttributeDataMapper); } - + + @Bean + public MafRecordService mafRecordService(MafRecordMapper mafRecordMapper) { + return new MafRecordService(mafRecordMapper); + } + + @Bean + public GeneticProfileService geneticProfileService(GeneticProfileMapper geneticProfileMapper) { + return new GeneticProfileService(geneticProfileMapper); + } + @Bean public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, - ClinicalAttributeDataService clinicalDataAttributeDataService) { - return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService); + ClinicalAttributeDataService clinicalDataAttributeDataService, + GeneticProfileService geneticProfileService, + MafRecordService mafRecordService) { + return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService, geneticProfileService, mafRecordService); } @Bean("exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/ExportService.java b/src/main/java/org/cbioportal/application/file/export/ExportService.java index 24accff0522..ff93fbd3989 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportService.java @@ -1,24 +1,31 @@ package org.cbioportal.application.file.export; -import org.cbioportal.application.file.model.CancerStudyMetadata; -import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.ClinicalSampleAttributesMetadata; -import org.cbioportal.application.file.model.LongTable; +import org.cbioportal.application.file.model.*; import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.io.Writer; +import java.util.Iterator; +import java.util.List; +//TODO do I use file DTO in mybatis layer or not? Be consistent public class ExportService { private final CancerStudyMetadataService cancerStudyMetadataService; private final ClinicalAttributeDataService clinicalDataAttributeDataService; + private final GeneticProfileService geneticProfileService; + private final MafRecordService mafRecordService; public ExportService( CancerStudyMetadataService cancerStudyMetadataService, - ClinicalAttributeDataService clinicalDataAttributeDataService) { + ClinicalAttributeDataService clinicalDataAttributeDataService, + GeneticProfileService geneticProfileService, + MafRecordService mafRecordService + ) { this.cancerStudyMetadataService = cancerStudyMetadataService; this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; + this.geneticProfileService = geneticProfileService; + this.mafRecordService = mafRecordService; } @Transactional @@ -46,26 +53,37 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) } } - /* Iterator mafRecordIterator = Iterators.concat(molecularProfileList.stream().map(molecularProfile -> mafRecordFetcher.fetch(cancerStudyInfo.studyToSampleMap, molecularProfile.getStableId())).iterator()); - if (mafRecordIterator.hasNext()) { - GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata(stableId, - //TODO Use mol. alteration type and datatype from the map above instead - MolecularProfile.MolecularAlterationType.MUTATION_EXTENDED.toString(), "MAF", studyId, "data_mutations.txt", molecularProfileList.getFirst().getName(), molecularProfileList.getFirst().getDescription(), - //TODO where to get gene panel from? - Optional.empty(), - //Is it true for all data types? - true); - try (Writer mafMetaWriter = fileWriterFactory.newWriter("meta_mutations.txt")) { - new KeyValueMetadataWriter(mafMetaWriter).write(genericProfileDatatypeMetadata); - } + List geneticProfiles = geneticProfileService.getGeneticProfiles(studyId); + for (GeneticProfile geneticProfile : geneticProfiles) { + if ("MAF".equals(geneticProfile.getDatatype())) { + Iterator mafRecordIterator = mafRecordService.getMafRecords(geneticProfile.getStableId()); + if (mafRecordIterator.hasNext()) { + GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata( + geneticProfile.getStableId(), + //TODO Use mol. alteration type and datatype from the map above instead + geneticProfile.getGeneticAlterationType(), + geneticProfile.getDatatype(), + studyId, + "data_mutations.txt", + geneticProfile.getName(), + geneticProfile.getDescription(), + //TODO where to get gene panel from? + null, + geneticProfile.getShowProfileInAnalysisTab()); + try (Writer mafMetaWriter = fileWriterFactory.newWriter("meta_mutations.txt")) { + new KeyValueMetadataWriter(mafMetaWriter).write(genericProfileDatatypeMetadata); + } - try (Writer mafDataWriter = fileWriterFactory.newWriter("data_mutations.txt")) { - MafRecordWriter mafRecordWriter = new MafRecordWriter(mafDataWriter); - mafRecordWriter.write(mafRecordIterator); - } + try (Writer mafDataWriter = fileWriterFactory.newWriter("data_mutations.txt")) { + MafRecordWriter mafRecordWriter = new MafRecordWriter(mafDataWriter); + mafRecordWriter.write(mafRecordIterator); + } + } + } } //TODO Move logic to newly created case list fetcher + /* List sampleLists = getStudiesSampleListsUseCase.execute(studyIds); Map> sampleListsBySuffix = sampleLists.stream().map(sl -> { sl.getSampleStableIds().retainAll(cancerStudyInfo.studyToSampleMap.get(sl.getCancerStudyStableId())); @@ -86,6 +104,7 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) //maybe composing its own name and description would work better suffixedSampleLists.getFirst().getName(), suffixedSampleLists.getFirst().getDescription(), mergedSapleIds)); } - }*/ + } + */ } } diff --git a/src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java b/src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java new file mode 100644 index 00000000000..fa4c4f08b12 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java @@ -0,0 +1,20 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; +import org.cbioportal.application.file.model.GeneticProfile; + +import java.util.Iterator; +import java.util.List; + +public class GeneticProfileService { + + private final GeneticProfileMapper geneticProfileMapper; + + public GeneticProfileService(GeneticProfileMapper geneticProfileMapper) { + this.geneticProfileMapper = geneticProfileMapper; + } + + public List getGeneticProfiles(String studyId) { + return geneticProfileMapper.getGeneticProfiles(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/MafRecordService.java b/src/main/java/org/cbioportal/application/file/export/MafRecordService.java index f035ba3e954..5118cc1710c 100644 --- a/src/main/java/org/cbioportal/application/file/export/MafRecordService.java +++ b/src/main/java/org/cbioportal/application/file/export/MafRecordService.java @@ -1,77 +1,19 @@ package org.cbioportal.application.file.export; +import org.cbioportal.application.file.export.mappers.MafRecordMapper; import org.cbioportal.application.file.model.MafRecord; -import org.cbioportal.domain.studyview.StudyViewFilterContext; -import org.cbioportal.legacy.model.Mutation; -import org.cbioportal.legacy.web.parameter.SampleIdentifier; -import org.springframework.stereotype.Component; import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; public class MafRecordService { -/* - public Iterator fetch(Map> studyToSampleMap, String molecularProfileStableId) { - List sampleIds = List.copyOf(studyToSampleMap.values().stream().flatMap(Set::stream).toList()); - StudyViewFilterContext studyViewFilterContext = StudyViewFilterContext.builder() - .sampleIdentifiers(studyToSampleMap.entrySet().stream() - .flatMap(entry -> entry.getValue().stream().map(sampleId -> { - SampleIdentifier sampleIdentifier = new SampleIdentifier(); - sampleIdentifier.setStudyId(entry.getKey()); - sampleIdentifier.setSampleId(sampleId); - return sampleIdentifier; - })) - .collect(Collectors.toList())) - .build(); - List mutationList = getMutationsUseCase.execute(studyViewFilterContext); - return mutationList.stream() - //TODO let sql do it! - .filter(mutation -> studyToSampleMap.get(mutation.getStudyId()).contains(mutation.getSampleId())) - .map(mutation -> new MafRecord( - mutation.getGene().getHugoGeneSymbol(), - mutation.getGene().getEntrezGeneId().toString(), - mutation.getCenter(), - mutation.getNcbiBuild(), - mutation.getChr(), - mutation.getStartPosition(), - mutation.getEndPosition(), - "+", - mutation.getMutationType(), - mutation.getVariantType(), - mutation.getReferenceAllele(), - mutation.getTumorSeqAllele(), - //TODO check if this is correct - mutation.getTumorSeqAllele(), - mutation.getDbSnpRs(), - mutation.getDbSnpValStatus(), - mutation.getSampleId(), - mutation.getMatchedNormSampleBarcode(), - mutation.getMatchNormSeqAllele1(), - mutation.getMatchNormSeqAllele2(), - mutation.getTumorValidationAllele1(), - mutation.getTumorValidationAllele2(), - mutation.getMatchNormValidationAllele1(), - mutation.getMatchNormValidationAllele2(), - mutation.getVerificationStatus(), - mutation.getValidationStatus(), - mutation.getMutationStatus(), - mutation.getSequencingPhase(), - mutation.getSequenceSource(), - mutation.getValidationMethod(), - mutation.getScore() == null ? null : mutation.getScore(), - mutation.getBamFile(), - mutation.getSequencer(), - //TODO how to calculate HgvpShort? - "", - mutation.getTumorAltCount(), - mutation.getTumorRefCount(), - mutation.getNormalAltCount(), - mutation.getNormalRefCount() - //TODO export mutation.annotationJSON ? - )).iterator(); - }*/ + private final MafRecordMapper mafRecordMapper; + + public MafRecordService(MafRecordMapper mafRecordMapper) { + this.mafRecordMapper = mafRecordMapper; + } + + public Iterator getMafRecords(String molecularProfileStableId) { + return mafRecordMapper.getMafRecords(molecularProfileStableId).iterator(); + } } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java new file mode 100644 index 00000000000..40e744307df --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java @@ -0,0 +1,9 @@ +package org.cbioportal.application.file.export.mappers; + +import org.cbioportal.application.file.model.GeneticProfile; + +import java.util.List; + +public interface GeneticProfileMapper { + List getGeneticProfiles(String studyId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java new file mode 100644 index 00000000000..ee12424999f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java @@ -0,0 +1,8 @@ +package org.cbioportal.application.file.export.mappers; + +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.model.MafRecord; + +public interface MafRecordMapper { + Cursor getMafRecords(String molecularProfileStableId); +} diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticProfile.java b/src/main/java/org/cbioportal/application/file/model/GeneticProfile.java new file mode 100644 index 00000000000..b5a01eda96f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GeneticProfile.java @@ -0,0 +1,110 @@ +package org.cbioportal.application.file.model; + +public class GeneticProfile { + private String stableId; + private String name; + private String description; + private String geneticAlterationType; + private String genericAssayType; + private String datatype; + private Boolean showProfileInAnalysisTab; + private Float pivotThreshold; + private String sortOrder; + private Boolean patientLevel; + + public GeneticProfile() { + } + + public GeneticProfile(String stableId, String name, String description, String geneticAlterationType, String genericAssayType, String datatype, Boolean showProfileInAnalysisTab, Float pivotThreshold, String sortOrder, Boolean patientLevel) { + this.stableId = stableId; + this.name = name; + this.description = description; + this.geneticAlterationType = geneticAlterationType; + this.genericAssayType = genericAssayType; + this.datatype = datatype; + this.showProfileInAnalysisTab = showProfileInAnalysisTab; + this.pivotThreshold = pivotThreshold; + this.sortOrder = sortOrder; + this.patientLevel = patientLevel; + } + + public String getStableId() { + return stableId; + } + + public void setStableId(String stableId) { + this.stableId = stableId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getGeneticAlterationType() { + return geneticAlterationType; + } + + public void setGeneticAlterationType(String geneticAlterationType) { + this.geneticAlterationType = geneticAlterationType; + } + + public String getGenericAssayType() { + return genericAssayType; + } + + public void setGenericAssayType(String genericAssayType) { + this.genericAssayType = genericAssayType; + } + + public String getDatatype() { + return datatype; + } + + public void setDatatype(String datatype) { + this.datatype = datatype; + } + + public Boolean getShowProfileInAnalysisTab() { + return showProfileInAnalysisTab; + } + + public void setShowProfileInAnalysisTab(Boolean showProfileInAnalysisTab) { + this.showProfileInAnalysisTab = showProfileInAnalysisTab; + } + + public Float getPivotThreshold() { + return pivotThreshold; + } + + public void setPivotThreshold(Float pivotThreshold) { + this.pivotThreshold = pivotThreshold; + } + + public String getSortOrder() { + return sortOrder; + } + + public void setSortOrder(String sortOrder) { + this.sortOrder = sortOrder; + } + + public Boolean getPatientLevel() { + return patientLevel; + } + + public void setPatientLevel(Boolean patientLevel) { + this.patientLevel = patientLevel; + } +} diff --git a/src/main/resources/mappers/export/GeneticProfileMapper.xml b/src/main/resources/mappers/export/GeneticProfileMapper.xml new file mode 100644 index 00000000000..a5a670efbfa --- /dev/null +++ b/src/main/resources/mappers/export/GeneticProfileMapper.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/src/main/resources/mappers/export/MafRecordMapper.xml b/src/main/resources/mappers/export/MafRecordMapper.xml new file mode 100644 index 00000000000..0adac7fdd1f --- /dev/null +++ b/src/main/resources/mappers/export/MafRecordMapper.xml @@ -0,0 +1,51 @@ + + + + + + \ No newline at end of file From e416fb904d831c5e663ee13bc3a9b867b1bcf556 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 11:31:18 +0100 Subject: [PATCH 04/69] Enable case list export --- .../file/export/CaseListMetadataService.java | 19 ++++++++++++ .../application/file/export/ExportConfig.java | 15 ++++++---- .../file/export/ExportService.java | 27 +++++++---------- .../mappers/CaseListMetadataMapper.java | 9 ++++++ .../mappers/export/CaseListMetadataMapper.xml | 29 +++++++++++++++++++ 5 files changed, 76 insertions(+), 23 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java create mode 100644 src/main/resources/mappers/export/CaseListMetadataMapper.xml diff --git a/src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java b/src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java new file mode 100644 index 00000000000..d987eef5e9c --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java @@ -0,0 +1,19 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; +import org.cbioportal.application.file.model.CaseListMetadata; + +import java.util.List; + +public class CaseListMetadataService { + + private final CaseListMetadataMapper caseListMetadataMapper; + + public CaseListMetadataService(CaseListMetadataMapper caseListMetadataMapper) { + this.caseListMetadataMapper = caseListMetadataMapper; + } + + public List getCaseListsMetadata(String studyId) { + return caseListMetadataMapper.getCaseListsMetadata(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index fe7cce9b102..e2cc0f13505 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -2,10 +2,7 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; -import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; -import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; -import org.cbioportal.application.file.export.mappers.MafRecordMapper; +import org.cbioportal.application.file.export.mappers.*; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -44,12 +41,18 @@ public GeneticProfileService geneticProfileService(GeneticProfileMapper geneticP return new GeneticProfileService(geneticProfileMapper); } + @Bean + public CaseListMetadataService caseListMetadataService(CaseListMetadataMapper caseListMetadataMapper) { + return new CaseListMetadataService(caseListMetadataMapper); + } + @Bean public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, ClinicalAttributeDataService clinicalDataAttributeDataService, GeneticProfileService geneticProfileService, - MafRecordService mafRecordService) { - return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService, geneticProfileService, mafRecordService); + MafRecordService mafRecordService, + CaseListMetadataService caseListMetadataService) { + return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService, geneticProfileService, mafRecordService, caseListMetadataService); } @Bean("exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/ExportService.java b/src/main/java/org/cbioportal/application/file/export/ExportService.java index ff93fbd3989..23467288aa1 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportService.java @@ -15,17 +15,20 @@ public class ExportService { private final ClinicalAttributeDataService clinicalDataAttributeDataService; private final GeneticProfileService geneticProfileService; private final MafRecordService mafRecordService; + private final CaseListMetadataService caseListMetadataService; public ExportService( CancerStudyMetadataService cancerStudyMetadataService, ClinicalAttributeDataService clinicalDataAttributeDataService, GeneticProfileService geneticProfileService, - MafRecordService mafRecordService + MafRecordService mafRecordService, + CaseListMetadataService caseListMetadataService ) { this.cancerStudyMetadataService = cancerStudyMetadataService; this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; this.geneticProfileService = geneticProfileService; this.mafRecordService = mafRecordService; + this.caseListMetadataService = caseListMetadataService; } @Transactional @@ -83,28 +86,18 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) } //TODO Move logic to newly created case list fetcher - /* - List sampleLists = getStudiesSampleListsUseCase.execute(studyIds); - Map> sampleListsBySuffix = sampleLists.stream().map(sl -> { - sl.getSampleStableIds().retainAll(cancerStudyInfo.studyToSampleMap.get(sl.getCancerStudyStableId())); - return sl; - }).filter(sl -> !sl.getSampleStableIds().isEmpty()).collect(Collectors.groupingBy(sampleList -> sampleList.getStableId().replace(sampleList.getCancerStudyStableId(), ""))); - for (Map.Entry> entry : sampleListsBySuffix.entrySet()) { - String suffix = entry.getKey(); + List sampleLists = caseListMetadataService.getCaseListsMetadata(studyId); + for (CaseListMetadata sampleList : sampleLists) { //we skip this one as we have addGlobalCaseList=true for study - if ("_all".equals(suffix)) { + if (sampleList.getStableId().endsWith("_all")) { continue; } - List suffixedSampleLists = entry.getValue(); - String newStableId = cancerStudyInfo.metadata.cancerStudyIdentifier() + suffix; - SortedSet mergedSapleIds = suffixedSampleLists.stream().flatMap(sl -> sl.getSampleStableIds().stream()).collect(Collectors.toCollection(TreeSet::new)); - try (Writer caseListWriter = fileWriterFactory.newWriter("case_lists/cases" + suffix + ".txt")) { - new KeyValueMetadataWriter(caseListWriter).write(new CaseListMetadata(studyId, newStableId, + try (Writer caseListWriter = fileWriterFactory.newWriter("case_lists/" + sampleList.getStableId() + ".txt")) { + new KeyValueMetadataWriter(caseListWriter).write(new CaseListMetadata(studyId, sampleList.getStableId(), //TODO Sometime name/description could contain number of samples from the original study //maybe composing its own name and description would work better - suffixedSampleLists.getFirst().getName(), suffixedSampleLists.getFirst().getDescription(), mergedSapleIds)); + sampleList.getName(), sampleList.getDescription(), sampleList.getSampleIds())); } } - */ } } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java new file mode 100644 index 00000000000..bc23a505bf5 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java @@ -0,0 +1,9 @@ +package org.cbioportal.application.file.export.mappers; + +import org.cbioportal.application.file.model.CaseListMetadata; + +import java.util.List; + +public interface CaseListMetadataMapper { + List getCaseListsMetadata(String studyId); +} diff --git a/src/main/resources/mappers/export/CaseListMetadataMapper.xml b/src/main/resources/mappers/export/CaseListMetadataMapper.xml new file mode 100644 index 00000000000..9d0a9229526 --- /dev/null +++ b/src/main/resources/mappers/export/CaseListMetadataMapper.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + \ No newline at end of file From b5820f7f31c26eccb30e414ccaba589197b75244 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 14:56:06 +0100 Subject: [PATCH 05/69] Port POC unit tests. Make them pass --- .../export/ClinicalAttributeDataWriter.java | 2 +- .../file/export/KeyValueMetadataWriter.java | 113 ++++++++++----- .../file/model/CancerStudyMetadata.java | 12 +- .../ClinicalAttributeDataWriterTest.java | 71 +++++++++ .../file/export/MafRecordWriterTest.java | 76 ++++++++++ .../file/export/MetadataWriterTest.java | 137 ++++++++++++++++++ .../application/file/export/TSVUtilTest.java | 19 +++ 7 files changed, 391 insertions(+), 39 deletions(-) create mode 100644 src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriterTest.java create mode 100644 src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java create mode 100644 src/test/java/org/cbioportal/application/file/export/MetadataWriterTest.java create mode 100644 src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java index 83ecc4a1781..9a56eb8c537 100644 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java @@ -33,7 +33,7 @@ public void write(LongTable clinicalAttributeData) { writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDescription)); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDatatype)); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getPriority)); - writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getAttributeId)); + writeRow(Iterables.transform(attributes, (ClinicalAttribute attr) -> Optional.of(attr.getAttributeId()))); while (clinicalAttributeData.hasNext()) { Function> row = clinicalAttributeData.next(); writeRow(Iterables.transform(attributes, row::apply)); diff --git a/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java b/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java index 5df64c60db6..09f9a66ac31 100644 --- a/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java @@ -7,7 +7,11 @@ import java.io.IOException; import java.io.Writer; +import java.util.AbstractMap; import java.util.LinkedHashMap; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Stream; /** * A serializer for file model records that serializes them the cBioPortal key-value metadata format. @@ -24,63 +28,90 @@ public KeyValueMetadataWriter(Writer writer) { this.writer = writer; } + private static final LinkedHashMap> CANCER_STUDY_METADATA_MAPPING = new LinkedHashMap<>(); + + static { + CANCER_STUDY_METADATA_MAPPING.put("type_of_cancer", CancerStudyMetadata::getTypeOfCancer); + CANCER_STUDY_METADATA_MAPPING.put("cancer_study_identifier", CancerStudyMetadata::getCancerStudyIdentifier); + CANCER_STUDY_METADATA_MAPPING.put("name", CancerStudyMetadata::getName); + CANCER_STUDY_METADATA_MAPPING.put("description", CancerStudyMetadata::getDescription); + CANCER_STUDY_METADATA_MAPPING.put("citation", CancerStudyMetadata::getCitation); + CANCER_STUDY_METADATA_MAPPING.put("pmid", CancerStudyMetadata::getPmid); + CANCER_STUDY_METADATA_MAPPING.put("groups", CancerStudyMetadata::getGroups); + CANCER_STUDY_METADATA_MAPPING.put("add_global_case_list", cancerStudyMetadata -> cancerStudyMetadata.getAddGlobalCaseList() == null ? null : cancerStudyMetadata.getAddGlobalCaseList().toString()); + //TODO implement tags_file + //CANCER_STUDY_METADATA_MAPPING.put("tags_file", CancerStudyMetadata::getTagsFile); + CANCER_STUDY_METADATA_MAPPING.put("reference_genome", CancerStudyMetadata::getReferenceGenome); + } + /** * Write a cancer study metadata to the writer */ public void write(CancerStudyMetadata cancerStudyMetadata) { - LinkedHashMap metadata = new LinkedHashMap<>(); - metadata.put("type_of_cancer", cancerStudyMetadata.getTypeOfCancer()); - metadata.put("cancer_study_identifier", cancerStudyMetadata.getCancerStudyIdentifier()); - metadata.put("name", cancerStudyMetadata.getName()); - metadata.put("description", cancerStudyMetadata.getDescription()); - metadata.put("citation", cancerStudyMetadata.getCitation()); - metadata.put("pmid", cancerStudyMetadata.getPmid()); - metadata.put("groups", cancerStudyMetadata.getGroups()); - //metadata.put("add_global_case_list", cancerStudyMetadata.addGlobalCaseList() ? cancerStudyMetadata.addGlobalCaseList().toString() : null); - //metadata.put("tags_file", cancerStudyMetadata.tagsFile()); - metadata.put("reference_genome", cancerStudyMetadata.getReferenceGenome()); - write(metadata); + var keyValueStream = CANCER_STUDY_METADATA_MAPPING.entrySet().stream() + .map(entry -> entry(entry.getKey(), entry.getValue().apply(cancerStudyMetadata))); + write(keyValueStream); } + private static final LinkedHashMap> GENETIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); + static { + GENETIC_PROFILE_METADATA_MAPPING.put("cancer_study_identifier", GenericDatatypeMetadata::getCancerStudyIdentifier); + GENETIC_PROFILE_METADATA_MAPPING.put("genetic_alteration_type", GenericDatatypeMetadata::getGeneticAlterationType); + GENETIC_PROFILE_METADATA_MAPPING.put("datatype", GenericDatatypeMetadata::getDatatype); + GENETIC_PROFILE_METADATA_MAPPING.put("data_filename", GenericDatatypeMetadata::getDataFilename); + } /** - * Write a generic datatype metadata to the writer + * Write a generic datatype metadata to the writer */ public void write(GenericDatatypeMetadata genericDatatypeMetadata) { - LinkedHashMap metadata = new LinkedHashMap<>(); - metadata.put("cancer_study_identifier", genericDatatypeMetadata.getCancerStudyIdentifier()); - metadata.put("genetic_alteration_type", genericDatatypeMetadata.getGeneticAlterationType()); - metadata.put("datatype", genericDatatypeMetadata.getDatatype()); - metadata.put("data_filename", genericDatatypeMetadata.getDataFilename()); - write(metadata); + var keyValueStream = GENETIC_PROFILE_METADATA_MAPPING.entrySet().stream() + .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericDatatypeMetadata))); + write(keyValueStream); } + private static final LinkedHashMap> GENERIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); + static { + GENERIC_PROFILE_METADATA_MAPPING.put("stable_id", GenericProfileDatatypeMetadata::getStableId); + GENERIC_PROFILE_METADATA_MAPPING.put("show_profile_in_analysis_tab", genericProfileDatatypeMetadata -> genericProfileDatatypeMetadata.getShowProfileInAnalysisTab().toString().toLowerCase()); + GENERIC_PROFILE_METADATA_MAPPING.put("profile_name", GenericProfileDatatypeMetadata::getProfileName); + GENERIC_PROFILE_METADATA_MAPPING.put("profile_description", GenericProfileDatatypeMetadata::getProfileDescription); + GENERIC_PROFILE_METADATA_MAPPING.put("gene_panel", GenericProfileDatatypeMetadata::getGenePanel); + } /** - * Write a generic profile datatype metadata to the writer + * Write a generic profile datatype metadata to the writer */ public void write(GenericProfileDatatypeMetadata genericProfileDatatypeMetadata) { write((GenericDatatypeMetadata) genericProfileDatatypeMetadata); - LinkedHashMap metadata = new LinkedHashMap<>(); - metadata.put("stable_id", genericProfileDatatypeMetadata.getStableId()); - metadata.put("show_profile_in_analysis_tab", genericProfileDatatypeMetadata.getShowProfileInAnalysisTab().toString().toLowerCase()); - metadata.put("profile_name", genericProfileDatatypeMetadata.getProfileName()); - metadata.put("profile_description", genericProfileDatatypeMetadata.getProfileDescription()); - metadata.put("gene_panel", genericProfileDatatypeMetadata.getGenePanel()); - write(metadata); + var keyValueStream = GENERIC_PROFILE_METADATA_MAPPING.entrySet().stream() + .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericProfileDatatypeMetadata))); + write(keyValueStream); } + private static final LinkedHashMap> CASE_LIST_METADATA_MAPPING = new LinkedHashMap<>(); + static { + CASE_LIST_METADATA_MAPPING.put("cancer_study_identifier", CaseListMetadata::getCancerStudyIdentifier); + CASE_LIST_METADATA_MAPPING.put("stable_id", CaseListMetadata::getStableId); + CASE_LIST_METADATA_MAPPING.put("case_list_name", CaseListMetadata::getName); + CASE_LIST_METADATA_MAPPING.put("case_list_description", CaseListMetadata::getDescription); + CASE_LIST_METADATA_MAPPING.put("case_list_ids", caseListMetadata -> String.join("\t", caseListMetadata.getSampleIds())); + } + /** + * Write a case list metadata to the writer + * @param caseListMetadata + */ public void write(CaseListMetadata caseListMetadata) { - LinkedHashMap metadata = new LinkedHashMap<>(); - metadata.put("cancer_study_identifier", caseListMetadata.getCancerStudyIdentifier()); - metadata.put("stable_id", caseListMetadata.getStableId()); - metadata.put("case_list_name", caseListMetadata.getName()); - metadata.put("case_list_description", caseListMetadata.getDescription()); - metadata.put("case_list_ids", String.join("\t", caseListMetadata.getSampleIds())); - write(metadata); + var keyValueStream = CASE_LIST_METADATA_MAPPING.entrySet().stream() + .map(entry -> entry(entry.getKey(), entry.getValue().apply(caseListMetadata))); + write(keyValueStream); } - private void write(LinkedHashMap metadata) { - metadata.forEach((key, value) -> { + + private void write(Stream> metadata) { + metadata + //skip values that are null + .filter(entry -> entry.getValue() != null) + .forEach(entry -> { try { - writer.write(composeKeyValueLine(key, value)); + writer.write(composeKeyValueLine(entry.getKey(), entry.getValue())); } catch (IOException e) { throw new RuntimeException(e); } @@ -90,4 +121,12 @@ private void write(LinkedHashMap metadata) { private static String composeKeyValueLine(String key, String value) { return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; } + + /** + * Create a key-value entry that allows null values + * Map.entry does not allow null values + */ + private static Map.Entry entry(K key, V value) { + return new AbstractMap.SimpleEntry<>(key, value); + } } diff --git a/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java index 40900e3c7c1..97a0ad09576 100644 --- a/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java @@ -39,6 +39,7 @@ public class CancerStudyMetadata { */ private String groups; + private Boolean addGlobalCaseList; /** * The study reference genome (e.g. hg19, hg38). Without specifying this property, the study will be assigned to the reference genome specified in application.properties (property ucsc.build). */ @@ -47,7 +48,7 @@ public class CancerStudyMetadata { public CancerStudyMetadata() { } - public CancerStudyMetadata(String typeOfCancer, String cancerStudyIdentifier, String name, String description, String citation, String pmid, String groups, String referenceGenome) { + public CancerStudyMetadata(String typeOfCancer, String cancerStudyIdentifier, String name, String description, String citation, String pmid, String groups, Boolean addGlobalCaseList, String referenceGenome) { this.typeOfCancer = typeOfCancer; this.cancerStudyIdentifier = cancerStudyIdentifier; this.name = name; @@ -55,6 +56,7 @@ public CancerStudyMetadata(String typeOfCancer, String cancerStudyIdentifier, St this.citation = citation; this.pmid = pmid; this.groups = groups; + this.addGlobalCaseList = addGlobalCaseList; this.referenceGenome = referenceGenome; } @@ -121,4 +123,12 @@ public String getReferenceGenome() { public void setReferenceGenome(String referenceGenome) { this.referenceGenome = referenceGenome; } + + public Boolean getAddGlobalCaseList() { + return addGlobalCaseList; + } + + public void setAddGlobalCaseList(Boolean addGlobalCaseList) { + this.addGlobalCaseList = addGlobalCaseList; + } } \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriterTest.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriterTest.java new file mode 100644 index 00000000000..eb67c472c4e --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriterTest.java @@ -0,0 +1,71 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.LongTable; +import org.junit.Test; + +import java.io.StringWriter; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Optional; +import java.util.SequencedMap; +import java.util.function.Function; + +import static org.junit.Assert.assertEquals; + +public class ClinicalAttributeDataWriterTest { + + StringWriter output = new StringWriter(); + ClinicalAttributeDataWriter writer = new ClinicalAttributeDataWriter(output); + + @Test + public void testClinicalAttributeDataWriter() { + ClinicalAttribute clinicalAttribute = new ClinicalAttribute("attr1 name", "attr1 description", "NUMBER", "3", "ATTR1"); + SequencedMap row1 = new LinkedHashMap<>(); + row1.put(ClinicalAttribute.PATIENT_ID, "PATIENT1"); + row1.put(ClinicalAttribute.SAMPLE_ID, "SAMPLE1"); + row1.put(clinicalAttribute, "1.1"); + SequencedMap row2 = new LinkedHashMap<>(); + row2.put(ClinicalAttribute.PATIENT_ID, "PATIENT2"); + row2.put(ClinicalAttribute.SAMPLE_ID, "SAMPLE2"); + row2.put(clinicalAttribute, "2.2"); + + Function> row1f = (ClinicalAttribute attr) -> Optional.ofNullable(row1.get(attr)); + Function> row2f = (ClinicalAttribute attr) -> Optional.ofNullable(row2.get(attr)); + writer.write(new LongTable<>( + List.of(ClinicalAttribute.PATIENT_ID, ClinicalAttribute.SAMPLE_ID, clinicalAttribute), + List.of(row1f, row2f).iterator())); + + assertEquals(""" + #Patient Identifier\tSample Identifier\tattr1 name + #Patient Identifier\tSample Identifier\tattr1 description + #STRING\tSTRING\tNUMBER + #1\t1\t3 + PATIENT_ID\tSAMPLE_ID\tATTR1 + PATIENT1\tSAMPLE1\t1.1 + PATIENT2\tSAMPLE2\t2.2 + """, output.toString()); + } + + @Test + public void testEscapeTabs() { + ClinicalAttribute clinicalAttribute = new ClinicalAttribute("attr1\tname", "attr1\tdescription", "STRING", "1", "ATTR1"); + + SequencedMap row1 = new LinkedHashMap<>(); + row1.put(ClinicalAttribute.PATIENT_ID, "PATIENT1"); + row1.put(clinicalAttribute, "A\tB"); + Function> row1f = (ClinicalAttribute attr) -> Optional.ofNullable(row1.get(attr)); + writer.write(new LongTable<>( + List.of(ClinicalAttribute.PATIENT_ID, clinicalAttribute), + List.of(row1f).iterator())); + + assertEquals(""" + #Patient Identifier\tattr1\\tname + #Patient Identifier\tattr1\\tdescription + #STRING\tSTRING + #1\t1 + PATIENT_ID\tATTR1 + PATIENT1\tA\\tB + """, output.toString()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java b/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java new file mode 100644 index 00000000000..1ba69a87dc3 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java @@ -0,0 +1,76 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.MafRecord; +import org.junit.Test; + +import java.io.StringWriter; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +public class MafRecordWriterTest { + + StringWriter output = new StringWriter(); + MafRecordWriter writer = new MafRecordWriter(output); + + @Test + public void testMafRecordWriter() { + writer.write(List.of( + new MafRecord( + "HUGO", + "12345", + "center1", + "hg38", + "X", + 1000000L, + 1000100L, + "+", + "Missense_Mutation", + "SNP", + "T", + "C", + "A", + "DBSNPRS123", + "byFrequency", + "SAMPLE_1", + "SAMPLE_2", + "A", + "T", + "C", + "G", + "A", + "T", + "Verified", + "Somatic", + "Somatic", + "Phase1", + "Exome", + "Sanger", + "1.1", + "bam_file", + "Illumina hiseq 2000", + "SHRT", + 55, + 33, + 100, + 99 + ) + ).iterator()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count + HUGO\t12345\tcenter1\thg38\tX\t1000000\t1000100\t+\tMissense_Mutation\tSNP\tT\tC\tA\tDBSNPRS123\tbyFrequency\tSAMPLE_1\tSAMPLE_2\tA\tT\tC\tG\tA\tT\tVerified\tSomatic\tSomatic\tPhase1\tExome\tSanger\t1.1\tbam_file\tIllumina hiseq 2000\tSHRT\t55\t33\t100\t99 + """, output.toString()); + } + + @Test + public void testEmptyMafRecords() { + List emptyMafRecords = List.of(); + writer.write(emptyMafRecords.iterator()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count + """, output.toString()); + } + +} diff --git a/src/test/java/org/cbioportal/application/file/export/MetadataWriterTest.java b/src/test/java/org/cbioportal/application/file/export/MetadataWriterTest.java new file mode 100644 index 00000000000..463e2129210 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/MetadataWriterTest.java @@ -0,0 +1,137 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.ClinicalSampleAttributesMetadata; +import org.cbioportal.application.file.model.GenericProfileDatatypeMetadata; +import org.junit.Test; + +import java.io.StringWriter; + +import static org.junit.Assert.assertEquals; + +public class MetadataWriterTest { + + StringWriter output = new StringWriter(); + KeyValueMetadataWriter writer = new KeyValueMetadataWriter(output); + + @Test + public void testCancerStudyMetadataWriter() { + writer.write(new CancerStudyMetadata( + "toc", + "study_id1", + "study name", + "study description", + "Citation", + "1234", + "GROUP1;GROUP2", + true, + "hg38")); + + assertEquals(""" + type_of_cancer: toc + cancer_study_identifier: study_id1 + name: study name + description: study description + citation: Citation + pmid: 1234 + groups: GROUP1;GROUP2 + add_global_case_list: true + reference_genome: hg38 + """, output.toString()); + } + + @Test + public void testNulls() { + writer.write(new CancerStudyMetadata( + null, + null, + null, + null, + null, + null, + null, + null, + null + )); + + assertEquals("", output.toString()); + } + @Test + public void testBlanks() { + writer.write(new CancerStudyMetadata( + "", + "", + "", + "", + "", + "", + "", + null, //Boolean + "" + )); + + assertEquals("type_of_cancer: \ncancer_study_identifier: \nname: \ndescription: \ncitation: \npmid: \ngroups: \nreference_genome: \n", output.toString()); + } + @Test + public void testEscapeNewLines() { + writer.write(new CancerStudyMetadata( + "toc1", + "cancer_study_identifier1", + "This is a\nmultiline\nname", + "This is a\nmultiline\ndescription", + null, + null, + null, + null, + null + )); + + assertEquals(""" + type_of_cancer: toc1 + cancer_study_identifier: cancer_study_identifier1 + name: This is a\\nmultiline\\nname + description: This is a\\nmultiline\\ndescription + """, output.toString()); + } + @Test + public void testClinicalSampleAttributesMetadataWriter() { + writer.write(new ClinicalSampleAttributesMetadata( + "study_id1", + "data_file.txt" + )); + + assertEquals(""" + cancer_study_identifier: study_id1 + genetic_alteration_type: CLINICAL + datatype: SAMPLE_ATTRIBUTES + data_filename: data_file.txt + """, output.toString()); + } + + @Test + public void testMutationMetadataWriter() { + writer.write(new GenericProfileDatatypeMetadata( + "mutations", + "MUTATION_EXTENDED", + "MAF", + "study_id1", + "data_file.txt", + "profile name", + "profile description", + "gene_panel", + true + )); + + assertEquals(""" + cancer_study_identifier: study_id1 + genetic_alteration_type: MUTATION_EXTENDED + datatype: MAF + data_filename: data_file.txt + stable_id: mutations + show_profile_in_analysis_tab: true + profile_name: profile name + profile_description: profile description + gene_panel: gene_panel + """, output.toString()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java b/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java new file mode 100644 index 00000000000..caf7d3e9f9f --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java @@ -0,0 +1,19 @@ +package org.cbioportal.application.file.export; + +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.Assert.assertEquals; + +public class TSVUtilTest { + @Test + public void testComposeRow() { + List row = new ArrayList(); + row.add("a"); + row.add(null); + row.add("c"); + assertEquals("a\t\tc\n", TSVUtil.composeRow(row)); + } +} From f5f846ab002076e86efab0b74584dbfa2d483e29 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 15:21:58 +0100 Subject: [PATCH 06/69] Port Export integration smoke test --- .../ExportStudyDataIntegrationTest.java | 85 +++++++++++++++++++ 1 file changed, 85 insertions(+) create mode 100644 src/test/java/org/cbioportal/test/integration/export/ExportStudyDataIntegrationTest.java diff --git a/src/test/java/org/cbioportal/test/integration/export/ExportStudyDataIntegrationTest.java b/src/test/java/org/cbioportal/test/integration/export/ExportStudyDataIntegrationTest.java new file mode 100644 index 00000000000..d91919ea40c --- /dev/null +++ b/src/test/java/org/cbioportal/test/integration/export/ExportStudyDataIntegrationTest.java @@ -0,0 +1,85 @@ +package org.cbioportal.test.integration.export; + +import org.cbioportal.test.integration.security.ContainerConfig; +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.MethodSorters; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.core.io.Resource; +import org.springframework.http.*; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardCopyOption; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cbioportal.test.integration.security.ContainerConfig.*; + +@RunWith(SpringRunner.class) +@SpringBootTest( + webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT +) +@TestPropertySource( + properties = { + "dynamic_study_export_mode=true", + "authenticate=false", + "session.endpoint.publisher-api-key=this-is-a-secret", + "session.service.url=http://localhost:" + SESSION_SERVICE_PORT + "/api/sessions/public_portal/", + // DB settings (also see MysqlInitializer) + "spring.datasource.driverClassName=com.mysql.jdbc.Driver", + "spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect", + } +) +@ContextConfiguration(initializers = { + MyMysqlInitializer.class, + PortInitializer.class +}) +@DirtiesContext +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class ExportStudyDataIntegrationTest extends ContainerConfig { + + static final String CBIO_URL = String.format("http://localhost:%d", CBIO_PORT); + + @Autowired + private TestRestTemplate restTemplate; + + @Test + public void test1NoPublicVirtualStudiesAtTheBeginning() throws IOException { + ResponseEntity response1 = restTemplate.getForEntity( + CBIO_URL + "/export/study/study_tcga_pub.zip", Resource.class); + + assertThat(response1.getStatusCode().is2xxSuccessful()).isTrue(); + HttpHeaders headers = response1.getHeaders(); + assertThat(headers.getContentType()).isNotNull(); + assertThat(headers.getContentType().toString()).isEqualTo("application/zip"); + + // Verify Content-Disposition header for file name + String contentDisposition = headers.getFirst(HttpHeaders.CONTENT_DISPOSITION); + assertThat(contentDisposition).isNotNull(); + assertThat(contentDisposition).contains("attachment"); + assertThat(contentDisposition).contains("study_tcga_pub.zip"); + // Ensure the ZIP file is not empty + try (InputStream zipInputStream = response1.getBody().getInputStream(); + ZipInputStream zis = new ZipInputStream(zipInputStream)) { + + /*Path tempFile = Files.createTempFile("temp", ".zip"); + Files.copy(zipInputStream, tempFile, StandardCopyOption.REPLACE_EXISTING); + System.out.println("Temp file: " + tempFile);*/ + + // Ensure there's at least one entry in the ZIP + ZipEntry entry = zis.getNextEntry(); + assertThat(entry).isNotNull(); // Assert that the ZIP contains at least one file + } + } +} \ No newline at end of file From 6d27801c64cb3b3492f3df1f5ace4a809c27165b Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 15:25:28 +0100 Subject: [PATCH 07/69] Port import-export functionality test --- .github/workflows/integration-test.yml | 5 + test/integration/copy_and_sort.sh | 40 ++ .../in_service_import_export_test.sh | 20 + test/integration/test_import_export.sh | 17 + .../case_lists/cases_sequenced.txt | 5 + .../data_clinical_samples.txt | 523 ++++++++++++++++++ .../data_mutations.txt | 35 ++ .../meta_clinical_samples.txt | 4 + .../meta_mutations.txt | 8 + .../study_es_0_import_export/meta_study.txt | 9 + 10 files changed, 666 insertions(+) create mode 100755 test/integration/copy_and_sort.sh create mode 100755 test/integration/in_service_import_export_test.sh create mode 100755 test/integration/test_import_export.sh create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt create mode 100644 test/test_data/study_es_0_import_export/data_clinical_samples.txt create mode 100644 test/test_data/study_es_0_import_export/data_mutations.txt create mode 100644 test/test_data/study_es_0_import_export/meta_clinical_samples.txt create mode 100644 test/test_data/study_es_0_import_export/meta_mutations.txt create mode 100644 test/test_data/study_es_0_import_export/meta_study.txt diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index e77f1dd57f4..8d4a3158dd2 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -73,6 +73,11 @@ jobs: working-directory: ./cbioportal-docker-compose run: | $PORTAL_SOURCE_DIR/test/integration/test_load_study.sh + - name: 'TEST - Import and Export of study_es_0_import_export' + if: steps.startup.conclusion == 'success' + working-directory: ./cbioportal-docker-compose + run: | + $PORTAL_SOURCE_DIR/test/integration/test_import_export.sh - name: 'TEST - Add OncoKB annotations to study' if: steps.startup.conclusion == 'success' working-directory: ./cbioportal-docker-compose diff --git a/test/integration/copy_and_sort.sh b/test/integration/copy_and_sort.sh new file mode 100755 index 00000000000..368b231ab1b --- /dev/null +++ b/test/integration/copy_and_sort.sh @@ -0,0 +1,40 @@ +#!/bin/bash + +# Function to display usage instructions +usage() { + echo "Usage: $0 " + exit 1 +} + +# Check if the correct number of arguments is provided +if [ "$#" -ne 2 ]; then + usage +fi + +# Remove trailing slashes from paths if they exist +SOURCE_DIR="${1%/}" +DEST_DIR="${2%/}" + +# Check if the source directory exists +if [ ! -d "$SOURCE_DIR" ]; then + echo "Error: Source directory does not exist." + exit 1 +fi + +# Create the destination directory if it does not exist +mkdir -p "$DEST_DIR" + +# Copy files and sort text files +find "$SOURCE_DIR" -type f | while read -r FILE; do + REL_PATH="${FILE#$SOURCE_DIR/}" # Get relative path + DEST_FILE="$DEST_DIR/$REL_PATH" # Destination file path + DEST_DIR_PATH="$(dirname "$DEST_FILE")" # Destination directory path + + # Create the destination directory if it does not exist + mkdir -p "$DEST_DIR_PATH" + + sort "$FILE" > "$DEST_FILE" + +done + +echo "Copy and sort operation completed successfully." \ No newline at end of file diff --git a/test/integration/in_service_import_export_test.sh b/test/integration/in_service_import_export_test.sh new file mode 100755 index 00000000000..4211b42ec16 --- /dev/null +++ b/test/integration/in_service_import_export_test.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# exit when any of these fails +set -e + +echo "Importing of the test study with API validation..." +metaImport.py -v -u http://cbioportal-container:8080 -o -s /cbioportal/test/test_data/study_es_0_import_export/ + +echo "Exporting of the test study." +curl -s http://cbioportal-container:8080/export/study/study_es_0_import_export.zip > study_es_0_import_export.zip \ +&& unzip study_es_0_import_export.zip -d ./output_study_es_0_import_export + +echo "Sort content of text files from both folders to make order during comparison unimportant." +./cbioportal/test/integration/copy_and_sort.sh /cbioportal/test/test_data/study_es_0_import_export/ ./input_study_es_0_import_export_sorted/ +./cbioportal/test/integration/copy_and_sort.sh ./output_study_es_0_import_export/ ./output_study_es_0_import_export_sorted/ + +echo "Comparing the original and exported studies." +diff --recursive ./input_study_es_0_import_export_sorted/ ./output_study_es_0_import_export_sorted/ + +exit 0 diff --git a/test/integration/test_import_export.sh b/test/integration/test_import_export.sh new file mode 100755 index 00000000000..a5e97de88fc --- /dev/null +++ b/test/integration/test_import_export.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +# exit when any of these fails +set -e + +run_in_service() { + service=$1 + shift + docker compose -f docker-compose.yml -f $PORTAL_SOURCE_DIR/test/integration/docker-compose-localbuild.yml \ + run --rm \ + "$service" bash -c "$@" + return $? # return the exit code of the last command +} + +run_in_service cbioportal '/cbioportal/test/integration/in_service_import_export_test.sh' + +exit 0 diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt b/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt new file mode 100644 index 00000000000..fc201f74db1 --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_sequenced +case_list_name: Samples profiled for mutations +case_list_description: This is this case list that contains all samples that are profiled for mutations. +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SK-01 TCGA-A2-A04P-01 TCGA-A2-A0CM-01 TCGA-AR-A1AR-01 TCGA-B6-A0I6-01 TCGA-B6-A0WX-01 TCGA-BH-A0E0-01 TCGA-BH-A0HL-01 TCGA-BH-A18K-01 TCGA-BH-A18V-01 TCGA-BH-A1F0-01 TEST_SAMPLE_1 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_SAMPLE_SOMATIC_HOMOZYGOUS TEST_SAMPLE_SOMATIC_UNDEFINED diff --git a/test/test_data/study_es_0_import_export/data_clinical_samples.txt b/test/test_data/study_es_0_import_export/data_clinical_samples.txt new file mode 100644 index 00000000000..fd22eb7b077 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_clinical_samples.txt @@ -0,0 +1,523 @@ +#Patient Identifier Sample Identifier Subtype +#Patient Identifier Sample Identifier Subtype description +#STRING STRING STRING +#1 1 1 +PATIENT_ID SAMPLE_ID SUBTYPE +TCGA-A2-A0EQ TCGA-A2-A0EQ-01 Her2 enriched +TCGA-BH-A18R TCGA-BH-A18R-01 Her2 enriched +TCGA-BH-A0B8 TCGA-BH-A0B8-01 Luminal A +TCGA-BH-A0AW TCGA-BH-A0AW-01 Her2 enriched +TCGA-AO-A03M TCGA-AO-A03M-01 Luminal A +TCGA-A8-A06T TCGA-A8-A06T-01 Luminal A +TCGA-A8-A075 TCGA-A8-A075-01 Her2 enriched +TCGA-E2-A10B TCGA-E2-A10B-01 Luminal A +TCGA-A2-A0CV TCGA-A2-A0CV-01 Luminal A +TCGA-A2-A0EY TCGA-A2-A0EY-01 Luminal B +TCGA-BH-A18J TCGA-BH-A18J-01 Luminal B +TCGA-B6-A0IK TCGA-B6-A0IK-01 Her2 enriched +TCGA-AQ-A04J TCGA-AQ-A04J-01 basal-like +TCGA-E2-A15J TCGA-E2-A15J-01 Luminal A +TCGA-BH-A0DT TCGA-BH-A0DT-01 Luminal A +TCGA-A2-A04V TCGA-A2-A04V-01 Luminal A +TCGA-BH-A1EW TCGA-BH-A1EW-01 Luminal B +TCGA-A8-A09Q TCGA-A8-A09Q-01 Luminal B +TCGA-A2-A0T0 TCGA-A2-A0T0-01 basal-like +TCGA-AO-A124 TCGA-AO-A124-01 basal-like +TCGA-A2-A0YI TCGA-A2-A0YI-01 Luminal A +TCGA-B6-A0IC TCGA-B6-A0IC-01 Luminal B +TCGA-AN-A0XR TCGA-AN-A0XR-01 Luminal B +TCGA-E2-A15R TCGA-E2-A15R-01 Luminal A +TCGA-A2-A04N TCGA-A2-A04N-01 Luminal A +TCGA-A8-A07E TCGA-A8-A07E-01 Luminal A +TCGA-BH-A1EO TCGA-BH-A1EO-01 Luminal A +TCGA-BH-A1F0 TCGA-BH-A1F0-01 basal-like +TCGA-AR-A0U4 TCGA-AR-A0U4-01 basal-like +TCGA-AR-A0TS TCGA-AR-A0TS-01 basal-like +TCGA-B6-A0I2 TCGA-B6-A0I2-01 basal-like +TCGA-BH-A0B0 TCGA-BH-A0B0-01 Luminal A +TCGA-E2-A1B6 TCGA-E2-A1B6-01 Luminal A +TCGA-AO-A0JI TCGA-AO-A0JI-01 Luminal B +TCGA-B6-A0WZ TCGA-B6-A0WZ-01 Luminal A +TCGA-BH-A0C1 TCGA-BH-A0C1-01 Luminal A +TCGA-BH-A0BP TCGA-BH-A0BP-01 Luminal A +TCGA-A2-A0SX TCGA-A2-A0SX-01 basal-like +TCGA-A8-A09I TCGA-A8-A09I-01 Luminal B +TCGA-BH-A0DK TCGA-BH-A0DK-01 Luminal A +TCGA-A8-A086 TCGA-A8-A086-01 Luminal A +TCGA-A8-A07U TCGA-A8-A07U-01 basal-like +TCGA-AO-A12E TCGA-AO-A12E-01 Luminal A +TCGA-A8-A09A TCGA-A8-A09A-01 Luminal A +TCGA-B6-A0RQ TCGA-B6-A0RQ-01 Luminal A +TCGA-A7-A0CJ TCGA-A7-A0CJ-01 Luminal B +TCGA-A8-A099 TCGA-A8-A099-01 Luminal A +TCGA-C8-A12P TCGA-C8-A12P-01 Her2 enriched +TCGA-A8-A08X TCGA-A8-A08X-01 Her2 enriched +TCGA-C8-A131 TCGA-C8-A131-01 basal-like +TCGA-D8-A146 TCGA-D8-A146-01 Luminal A +TCGA-AR-A1AW TCGA-AR-A1AW-01 Luminal A +TCGA-E2-A14Y TCGA-E2-A14Y-01 basal-like +TCGA-B6-A0RI TCGA-B6-A0RI-01 Luminal A +TCGA-AO-A0JA TCGA-AO-A0JA-01 Luminal A +TCGA-C8-A12X TCGA-C8-A12X-01 Luminal B +TCGA-A8-A08P TCGA-A8-A08P-01 Luminal B +TCGA-A8-A091 TCGA-A8-A091-01 Luminal A +TCGA-BH-A0GY TCGA-BH-A0GY-01 Luminal A +TCGA-BH-A0HB TCGA-BH-A0HB-01 Luminal A +TCGA-A8-A08F TCGA-A8-A08F-01 Luminal B +TCGA-E2-A14Q TCGA-E2-A14Q-01 Luminal A +TCGA-E2-A152 TCGA-E2-A152-01 Her2 enriched +TCGA-AO-A0J9 TCGA-AO-A0J9-01 Luminal A +TCGA-AR-A1AO TCGA-AR-A1AO-01 Claudin low +TCGA-A2-A0ER TCGA-A2-A0ER-01 Luminal B +TCGA-E2-A15A TCGA-E2-A15A-01 Luminal B +TCGA-A2-A04W TCGA-A2-A04W-01 Her2 enriched +TCGA-BH-A18S TCGA-BH-A18S-01 Luminal A +TCGA-AO-A03N TCGA-AO-A03N-01 Her2 enriched +TCGA-A8-A06U TCGA-A8-A06U-01 Luminal A +TCGA-A8-A076 TCGA-A8-A076-01 Her2 enriched +TCGA-A2-A0CW TCGA-A2-A0CW-01 Luminal B +TCGA-BH-A0B7 TCGA-BH-A0B7-01 Her2 enriched +TCGA-BH-A0AV TCGA-BH-A0AV-01 basal-like +TCGA-E2-A10C TCGA-E2-A10C-01 Luminal B +TCGA-A8-A0A4 TCGA-A8-A0A4-01 Luminal A +TCGA-BH-A0HK TCGA-BH-A0HK-01 Luminal A +TCGA-E2-A15I TCGA-E2-A15I-01 Luminal A +TCGA-A7-A0DC TCGA-A7-A0DC-01 Luminal A +TCGA-AO-A03V TCGA-AO-A03V-01 Luminal A +TCGA-BH-A1EV TCGA-BH-A1EV-01 Her2 enriched +TCGA-BH-A18K TCGA-BH-A18K-01 basal-like +TCGA-BH-A0E6 TCGA-BH-A0E6-01 basal-like +TCGA-A2-A0D0 TCGA-A2-A0D0-01 basal-like +TCGA-A8-A0AD TCGA-A8-A0AD-01 Luminal A +TCGA-AR-A0TT TCGA-AR-A0TT-01 Luminal B +TCGA-AN-A0FL TCGA-AN-A0FL-01 basal-like +TCGA-A8-A07F TCGA-A8-A07F-01 Luminal A +TCGA-A8-A09X TCGA-A8-A09X-01 Her2 enriched +TCGA-AN-A0FD TCGA-AN-A0FD-01 Luminal A +TCGA-BH-A0C0 TCGA-BH-A0C0-01 Luminal B +TCGA-BH-A0BO TCGA-BH-A0BO-01 Luminal A +TCGA-BH-A0H3 TCGA-BH-A0H3-01 Luminal A +TCGA-AN-A0FT TCGA-AN-A0FT-01 Luminal A +TCGA-BH-A0W3 TCGA-BH-A0W3-01 Luminal B +TCGA-A2-A0SY TCGA-A2-A0SY-01 Luminal A +TCGA-BH-A0BG TCGA-BH-A0BG-01 basal-like +TCGA-B6-A0RP TCGA-B6-A0RP-01 Luminal A +TCGA-AO-A12D TCGA-AO-A12D-01 Her2 enriched +TCGA-AO-A0JJ TCGA-AO-A0JJ-01 Luminal A +TCGA-AN-A0AM TCGA-AN-A0AM-01 Luminal B +TCGA-C8-A132 TCGA-C8-A132-01 Luminal A +TCGA-C8-A12Q TCGA-C8-A12Q-01 Her2 enriched +TCGA-D8-A147 TCGA-D8-A147-01 basal-like +TCGA-BH-A0GZ TCGA-BH-A0GZ-01 Luminal A +TCGA-AR-A1AX TCGA-AR-A1AX-01 Luminal A +TCGA-B6-A0WS TCGA-B6-A0WS-01 Luminal A +TCGA-B6-A0X4 TCGA-B6-A0X4-01 Luminal A +TCGA-B6-A0RH TCGA-B6-A0RH-01 Her2 enriched +TCGA-E2-A159 TCGA-E2-A159-01 basal-like +TCGA-E2-A14X TCGA-E2-A14X-01 basal-like +TCGA-C8-A12Y TCGA-C8-A12Y-01 Luminal A +TCGA-A8-A090 TCGA-A8-A090-01 Luminal A +TCGA-A8-A08O TCGA-A8-A08O-01 Luminal A +TCGA-AO-A0J2 TCGA-AO-A0J2-01 Her2 enriched +TCGA-AR-A1AP TCGA-AR-A1AP-01 Luminal A +TCGA-E2-A14P TCGA-E2-A14P-01 Her2 enriched +TCGA-A1-A0SH TCGA-A1-A0SH-01 Luminal A +TCGA-A8-A08G TCGA-A8-A08G-01 Luminal B +TCGA-BH-A0BW TCGA-BH-A0BW-01 basal-like +TCGA-A2-A04X TCGA-A2-A04X-01 Her2 enriched +TCGA-AO-A03O TCGA-AO-A03O-01 Luminal B +TCGA-BH-A0B2 TCGA-BH-A0B2-01 Luminal A +TCGA-AN-A0XL TCGA-AN-A0XL-01 Luminal A +TCGA-BH-A18T TCGA-BH-A18T-01 Luminal A +TCGA-AR-A1AH TCGA-AR-A1AH-01 basal-like +TCGA-A2-A0EW TCGA-A2-A0EW-01 Luminal A +TCGA-A8-A06R TCGA-A8-A06R-01 Luminal B +TCGA-AQ-A04L TCGA-AQ-A04L-01 Luminal A +TCGA-B6-A0IM TCGA-B6-A0IM-01 Luminal B +TCGA-BH-A0AY TCGA-BH-A0AY-01 Luminal B +TCGA-A2-A04P TCGA-A2-A04P-01 basal-like +TCGA-BH-A0HP TCGA-BH-A0HP-01 Luminal A +TCGA-BH-A0DZ TCGA-BH-A0DZ-01 Her2 enriched +TCGA-E2-A15D TCGA-E2-A15D-01 Luminal A +TCGA-BH-A18L TCGA-BH-A18L-01 Luminal B +TCGA-BH-A0HX TCGA-BH-A0HX-01 Luminal A +TEST_PATIENT_1 TEST_SAMPLE_1 +TCGA-AN-A0XT TCGA-AN-A0XT-01 Luminal A +TCGA-A8-A07C TCGA-A8-A07C-01 basal-like +TCGA-E2-A15L TCGA-E2-A15L-01 Luminal B +TCGA-AN-A03Y TCGA-AN-A03Y-01 Luminal B +TCGA-A2-A0CT TCGA-A2-A0CT-01 Luminal B +TCGA-AR-A0TY TCGA-AR-A0TY-01 Luminal B +TCGA-A8-A09W TCGA-A8-A09W-01 Luminal B +TCGA-AN-A0FK TCGA-AN-A0FK-01 Luminal B +TCGA-A8-A06Z TCGA-A8-A06Z-01 Luminal B +TCGA-E2-A15T TCGA-E2-A15T-01 Luminal B +TCGA-AR-A0TQ TCGA-AR-A0TQ-01 Luminal B +TCGA-AR-A0U2 TCGA-AR-A0U2-01 Luminal B +TCGA-BH-A0DE TCGA-BH-A0DE-01 Luminal A +TCGA-E2-A1B4 TCGA-E2-A1B4-01 Luminal A +TCGA-BH-A0W4 TCGA-BH-A0W4-01 Luminal A +TCGA-BH-A0H0 TCGA-BH-A0H0-01 Luminal B +TCGA-AO-A0JG TCGA-AO-A0JG-01 Luminal A +TCGA-AN-A0FS TCGA-AN-A0FS-01 Luminal A +TCGA-A8-A09G TCGA-A8-A09G-01 Her2 enriched +TCGA-B6-A0WX TCGA-B6-A0WX-01 basal-like +TCGA-BH-A0BJ TCGA-BH-A0BJ-01 Luminal A +TCGA-B6-A0RS TCGA-B6-A0RS-01 Her2 enriched +TCGA-C8-A12N TCGA-C8-A12N-01 Luminal A +TCGA-A2-A0T3 TCGA-A2-A0T3-01 Luminal B +TCGA-AO-A12C TCGA-AO-A12C-01 Luminal A +TCGA-AN-A0AL TCGA-AN-A0AL-01 basal-like +TCGA-A8-A084 TCGA-A8-A084-01 Luminal B +TCGA-A8-A07S TCGA-A8-A07S-01 Luminal B +TCGA-A2-A0CL TCGA-A2-A0CL-01 Her2 enriched +TCGA-A8-A097 TCGA-A8-A097-01 Luminal B +TCGA-E2-A14S TCGA-E2-A14S-01 Luminal B +TCGA-BH-A0BZ TCGA-BH-A0BZ-01 Luminal B +TCGA-E2-A154 TCGA-E2-A154-01 Luminal A +TCGA-C8-A137 TCGA-C8-A137-01 Her2 enriched +TCGA-C8-A12V TCGA-C8-A12V-01 basal-like +TCGA-E2-A1BD TCGA-E2-A1BD-01 Luminal A +TCGA-A1-A0SK TCGA-A1-A0SK-01 basal-like +TCGA-A7-A0CD TCGA-A7-A0CD-01 Luminal A +TCGA-AR-A1AY TCGA-AR-A1AY-01 basal-like +TCGA-BH-A0C3 TCGA-BH-A0C3-01 Luminal B +TCGA-BH-A0BR TCGA-BH-A0BR-01 Luminal A +TCGA-BH-A0RX TCGA-BH-A0RX-01 basal-like +TCGA-A2-A0EO TCGA-A2-A0EO-01 Luminal A +TCGA-AO-A0J7 TCGA-AO-A0J7-01 Luminal B +TCGA-AR-A1AQ TCGA-AR-A1AQ-01 basal-like +TCGA-C8-A1HL TCGA-C8-A1HL-01 Luminal B +TCGA-A2-A04Y TCGA-A2-A04Y-01 Luminal A +TCGA-AO-A03P TCGA-AO-A03P-01 Luminal B +TCGA-A2-A0YT TCGA-A2-A0YT-01 Luminal B +TCGA-A8-A0A2 TCGA-A8-A0A2-01 Luminal A +TCGA-BH-A0HI TCGA-BH-A0HI-01 Luminal A +TCGA-BH-A0B9 TCGA-BH-A0B9-01 basal-like +TCGA-AR-A1AI TCGA-AR-A1AI-01 basal-like +TCGA-E2-A10E TCGA-E2-A10E-01 Luminal A +TCGA-BH-A18U TCGA-BH-A18U-01 Luminal B +TCGA-E2-A14Z TCGA-E2-A14Z-01 Luminal A +TCGA-A2-A0CU TCGA-A2-A0CU-01 Luminal A +TCGA-A2-A04Q TCGA-A2-A04Q-01 basal-like +TCGA-A2-A0EX TCGA-A2-A0EX-01 Luminal A +TCGA-BH-A0HQ TCGA-BH-A0HQ-01 Luminal A +TCGA-B6-A0IN TCGA-B6-A0IN-01 Luminal A +TEST_PATIENT_15 TEST_SAMPLE_15 +TCGA-BH-A18M TCGA-BH-A18M-01 Luminal A +TCGA-E2-A15C TCGA-E2-A15C-01 Luminal A +TCGA-BH-A0BA TCGA-BH-A0BA-01 Luminal A +TCGA-BH-A0HY TCGA-BH-A0HY-01 Her2 enriched +TCGA-BH-A0DS TCGA-BH-A0DS-01 Luminal A +TCGA-AN-A0XS TCGA-AN-A0XS-01 Luminal A +TCGA-A8-A0AB TCGA-A8-A0AB-01 Luminal B +TCGA-A8-A09N TCGA-A8-A09N-01 Luminal B +TCGA-AN-A049 TCGA-AN-A049-01 Luminal B +TCGA-AN-A03X TCGA-AN-A03X-01 Luminal A +TCGA-E2-A15K TCGA-E2-A15K-01 Luminal B +TCGA-AR-A0TZ TCGA-AR-A0TZ-01 Luminal B +TCGA-A2-A0YD TCGA-A2-A0YD-01 Luminal A +TCGA-AN-A041 TCGA-AN-A041-01 Luminal B +TCGA-AN-A0FJ TCGA-AN-A0FJ-01 basal-like +TCGA-A8-A09V TCGA-A8-A09V-01 Luminal A +TCGA-E2-A15S TCGA-E2-A15S-01 Luminal B +TCGA-BH-A0B1 TCGA-BH-A0B1-01 Luminal A +TCGA-B6-A0I5 TCGA-B6-A0I5-01 Luminal A +TCGA-AR-A0U3 TCGA-AR-A0U3-01 Luminal B +TCGA-AR-A0TR TCGA-AR-A0TR-01 Luminal A +TCGA-A2-A0YL TCGA-A2-A0YL-01 Luminal A +TCGA-BH-A0W5 TCGA-BH-A0W5-01 Luminal A +TCGA-A8-A07L TCGA-A8-A07L-01 Luminal B +TCGA-BH-A0DD TCGA-BH-A0DD-01 Luminal B +TCGA-AN-A0AS TCGA-AN-A0AS-01 Luminal B +TCGA-BH-A0BQ TCGA-BH-A0BQ-01 Luminal A +TCGA-B6-A0WY TCGA-B6-A0WY-01 Luminal A +TCGA-E2-A1B5 TCGA-E2-A1B5-01 basal-like +TCGA-A2-A0YC TCGA-A2-A0YC-01 Luminal A +TCGA-A8-A085 TCGA-A8-A085-01 Luminal B +TCGA-BH-A0DL TCGA-BH-A0DL-01 basal-like +TCGA-AN-A0AK TCGA-AN-A0AK-01 Luminal B +TCGA-AN-A0FZ TCGA-AN-A0FZ-01 Luminal A +TCGA-A2-A0T4 TCGA-A2-A0T4-01 Luminal B +TCGA-C8-A12O TCGA-C8-A12O-01 Luminal A +TCGA-C8-A130 TCGA-C8-A130-01 Her2 enriched +TCGA-AN-A04A TCGA-AN-A04A-01 Luminal A +TCGA-A2-A0CM TCGA-A2-A0CM-01 basal-like +TCGA-AO-A12B TCGA-AO-A12B-01 Luminal B +TCGA-A8-A096 TCGA-A8-A096-01 Luminal B +TCGA-E2-A153 TCGA-E2-A153-01 Luminal A +TCGA-D8-A145 TCGA-D8-A145-01 Luminal A +TCGA-E2-A14R TCGA-E2-A14R-01 basal-like +TCGA-C8-A12W TCGA-C8-A12W-01 Luminal B +TCGA-C8-A138 TCGA-C8-A138-01 Her2 enriched +TCGA-A8-A0A1 TCGA-A8-A0A1-01 Luminal A +TCGA-BH-A0H9 TCGA-BH-A0H9-01 Luminal A +TCGA-BH-A0EE TCGA-BH-A0EE-01 Her2 enriched +TCGA-A1-A0SJ TCGA-A1-A0SJ-01 Luminal A +TCGA-AO-A0J8 TCGA-AO-A0J8-01 Luminal A +TCGA-A1-A0SB TCGA-A1-A0SB-01 +TCGA-A1-A0SB TCGA-A1-A0SB-02 +TCGA-C8-A1HM TCGA-C8-A1HM-01 Luminal B +TCGA-AR-A1AR TCGA-AR-A1AR-01 basal-like +TCGA-BH-A0HA TCGA-BH-A0HA-01 Luminal A +TCGA-BH-A0B4 TCGA-BH-A0B4-01 Luminal A +TCGA-A2-A0CZ TCGA-A2-A0CZ-01 Luminal A +TCGA-A8-A0A9 TCGA-A8-A0A9-01 Luminal B +TCGA-A2-A0EU TCGA-A2-A0EU-01 Luminal A +TCGA-B6-A0IO TCGA-B6-A0IO-01 Luminal A +TCGA-AR-A1AJ TCGA-AR-A1AJ-01 basal-like +TCGA-A8-A06P TCGA-A8-A06P-01 Luminal A +TCGA-BH-A0EA TCGA-BH-A0EA-01 Luminal A +TCGA-AN-A0XN TCGA-AN-A0XN-01 Luminal A +TCGA-BH-A18V TCGA-BH-A18V-01 basal-like +TCGA-BH-A0E9 TCGA-BH-A0E9-01 Luminal A +TCGA-BH-A0DX TCGA-BH-A0DX-01 Luminal A +TCGA-A2-A04R TCGA-A2-A04R-01 Luminal B +TCGA-E2-A15F TCGA-E2-A15F-01 Luminal A +TCGA-E2-A106 TCGA-E2-A106-01 Luminal A +TCGA-BH-A18N TCGA-BH-A18N-01 Luminal A +TCGA-B6-A0IG TCGA-B6-A0IG-01 Luminal A +TCGA-AN-A0XV TCGA-AN-A0XV-01 Luminal A +TCGA-BH-A1ES TCGA-BH-A1ES-01 Luminal A +TCGA-BH-A0E1 TCGA-BH-A0E1-01 Luminal A +TCGA-BH-A0DP TCGA-BH-A0DP-01 Luminal A +TCGA-BH-A18F TCGA-BH-A18F-01 Luminal B +TCGA-AR-A0TW TCGA-AR-A0TW-01 Luminal A +TCGA-A2-A0D3 TCGA-A2-A0D3-01 Luminal A +TCGA-E2-A10F TCGA-E2-A10F-01 Luminal A +TCGA-A8-A079 TCGA-A8-A079-01 Luminal B +TCGA-A8-A06X TCGA-A8-A06X-01 Luminal B +TCGA-A8-A09M TCGA-A8-A09M-01 Luminal B +TCGA-B6-A0I6 TCGA-B6-A0I6-01 +TCGA-A2-A0YM TCGA-A2-A0YM-01 basal-like +TCGA-A8-A09E TCGA-A8-A09E-01 Luminal B +TCGA-AN-A04D TCGA-AN-A04D-01 basal-like +TCGA-BH-A0DG TCGA-BH-A0DG-01 Luminal A +TCGA-AN-A0AR TCGA-AN-A0AR-01 basal-like +TCGA-AO-A0JE TCGA-AO-A0JE-01 Her2 enriched +TCGA-BH-A0BL TCGA-BH-A0BL-01 basal-like +TCGA-B6-A0WV TCGA-B6-A0WV-01 Luminal B +TCGA-B6-A0X7 TCGA-B6-A0X7-01 Luminal A +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HETEROZYGOUS +TCGA-A1-A0SM TCGA-A1-A0SM-01 Luminal B +TCGA-A8-A07I TCGA-A8-A07I-01 Her2 enriched +TCGA-BH-A0H6 TCGA-BH-A0H6-01 Luminal A +TCGA-C8-A12L TCGA-C8-A12L-01 Her2 enriched +TCGA-AO-A129 TCGA-AO-A129-01 basal-like +TCGA-AN-A0FY TCGA-AN-A0FY-01 Luminal B +TCGA-AN-A0AJ TCGA-AN-A0AJ-01 Luminal B +TCGA-A2-A0T5 TCGA-A2-A0T5-01 Luminal A +TCGA-A2-A0ST TCGA-A2-A0ST-01 basal-like +TCGA-A8-A082 TCGA-A8-A082-01 Luminal B +TCGA-AO-A0JM TCGA-AO-A0JM-01 Luminal B +TCGA-B6-A0RU TCGA-B6-A0RU-01 basal-like +TCGA-AO-A12A TCGA-AO-A12A-01 Luminal A +TCGA-C8-A1HN TCGA-C8-A1HN-01 Luminal B +TCGA-B6-A0RM TCGA-B6-A0RM-01 Luminal A +TCGA-AR-A1AS TCGA-AR-A1AS-01 Luminal A +TCGA-E2-A156 TCGA-E2-A156-01 Luminal A +TCGA-BH-A0BD TCGA-BH-A0BD-01 Luminal B +TCGA-E2-A105 TCGA-E2-A105-01 Luminal A +TCGA-A8-A095 TCGA-A8-A095-01 Luminal B +TCGA-A8-A08T TCGA-A8-A08T-01 Luminal A +TCGA-C8-A135 TCGA-C8-A135-01 Her2 enriched +TCGA-C8-A12T TCGA-C8-A12T-01 Her2 enriched +TCGA-D8-A142 TCGA-D8-A142-01 basal-like +TCGA-A8-A08B TCGA-A8-A08B-01 Her2 enriched +TCGA-AO-A0J5 TCGA-AO-A0J5-01 Luminal A +TCGA-AR-A1AK TCGA-AR-A1AK-01 Luminal A +TCGA-C8-A1HF TCGA-C8-A1HF-01 Her2 enriched +TCGA-B6-A0RE TCGA-B6-A0RE-01 basal-like +TCGA-BH-A0HF TCGA-BH-A0HF-01 Luminal A +TCGA-A8-A08L TCGA-A8-A08L-01 Her2 enriched +TCGA-D8-A13Y TCGA-D8-A13Y-01 Luminal B +TCGA-BH-A0BT TCGA-BH-A0BT-01 Luminal A +TCGA-A2-A0EM TCGA-A2-A0EM-01 Luminal A +TCGA-A1-A0SE TCGA-A1-A0SE-01 Luminal A +TEST_PATIENT_4 TEST_SAMPLE_4 +TCGA-BH-A0HO TCGA-BH-A0HO-01 Luminal A +TCGA-B6-A0IP TCGA-B6-A0IP-01 Luminal A +TCGA-BH-A0B3 TCGA-BH-A0B3-01 basal-like +TCGA-A8-A06Q TCGA-A8-A06Q-01 Luminal B +TCGA-BH-A0EB TCGA-BH-A0EB-01 Luminal A +TCGA-A2-A0EV TCGA-A2-A0EV-01 Luminal A +TCGA-BH-A0AZ TCGA-BH-A0AZ-01 Luminal A +TCGA-B6-A0IH TCGA-B6-A0IH-01 Luminal A +TCGA-E2-A15E TCGA-E2-A15E-01 Luminal A +TCGA-E2-A107 TCGA-E2-A107-01 Luminal B +TCGA-BH-A0HW TCGA-BH-A0HW-01 Luminal B +TCGA-AN-A0XU TCGA-AN-A0XU-01 basal-like +TCGA-A8-A07B TCGA-A8-A07B-01 Her2 enriched +TCGA-BH-A0E2 TCGA-BH-A0E2-01 Luminal A +TCGA-BH-A0DQ TCGA-BH-A0DQ-01 Luminal A +TCGA-AR-A0TX TCGA-AR-A0TX-01 Her2 enriched +TCGA-A2-A0D4 TCGA-A2-A0D4-01 Luminal B +TCGA-A2-A0CS TCGA-A2-A0CS-01 Luminal A +TCGA-E2-A15M TCGA-E2-A15M-01 Luminal B +TCGA-A8-A06Y TCGA-A8-A06Y-01 Luminal A +TCGA-A7-A13F TCGA-A7-A13F-01 Luminal B +TCGA-A2-A0YF TCGA-A2-A0YF-01 Luminal A +TCGA-A8-A09T TCGA-A8-A09T-01 Luminal A +TCGA-BH-A0W7 TCGA-BH-A0W7-01 Luminal A +TCGA-AR-A0U1 TCGA-AR-A0U1-01 basal-like +TCGA-AR-A0TP TCGA-AR-A0TP-01 basal-like +TCGA-B6-A0I8 TCGA-B6-A0I8-01 Luminal A +TCGA-A8-A09D TCGA-A8-A09D-01 Luminal B +TCGA-AN-A04C TCGA-AN-A04C-01 Her2 enriched +TEST_PATIENT_2 TEST_SAMPLE_2 +TCGA-AO-A0JF TCGA-AO-A0JF-01 Luminal A +TCGA-B6-A0WW TCGA-B6-A0WW-01 Luminal B +TCGA-A8-A07J TCGA-A8-A07J-01 Luminal A +TCGA-BH-A0H7 TCGA-BH-A0H7-01 Luminal A +TCGA-A2-A0SU TCGA-A2-A0SU-01 Luminal A +TCGA-A2-A0T6 TCGA-A2-A0T6-01 Luminal A +TCGA-C8-A12M TCGA-C8-A12M-01 Luminal B +TCGA-AO-A12H TCGA-AO-A12H-01 Luminal A +TCGA-AN-A0FX TCGA-AN-A0FX-01 basal-like +TCGA-B6-A0RT TCGA-B6-A0RT-01 basal-like +TCGA-A8-A083 TCGA-A8-A083-01 Luminal A +TCGA-A8-A07R TCGA-A8-A07R-01 basal-like +TCGA-E2-A155 TCGA-E2-A155-01 Luminal B +TCGA-E2-A1BC TCGA-E2-A1BC-01 Luminal A +TCGA-E2-A14T TCGA-E2-A14T-01 Luminal A +TCGA-AR-A1AT TCGA-AR-A1AT-01 Her2 enriched +TCGA-A8-A07Z TCGA-A8-A07Z-01 Luminal B +TCGA-B6-A0RL TCGA-B6-A0RL-01 Luminal B +TCGA-BH-A0BC TCGA-BH-A0BC-01 Luminal A +TEST_PATIENT_3 TEST_SAMPLE_3 +TCGA-B6-A0X0 TCGA-B6-A0X0-01 Luminal A +TCGA-A8-A08S TCGA-A8-A08S-01 Luminal B +TCGA-C8-A12U TCGA-C8-A12U-01 Luminal B +TCGA-A8-A094 TCGA-A8-A094-01 Her2 enriched +TCGA-A7-A0CE TCGA-A7-A0CE-01 basal-like +TCGA-C8-A1HG TCGA-C8-A1HG-01 Luminal B +TCGA-AR-A1AL TCGA-AR-A1AL-01 Luminal A +TCGA-A8-A08C TCGA-A8-A08C-01 Luminal A +TCGA-BH-A0BS TCGA-BH-A0BS-01 Luminal A +TCGA-A2-A0EN TCGA-A2-A0EN-01 Luminal A +TCGA-AO-A0J6 TCGA-AO-A0J6-01 basal-like +TCGA-A1-A0SD TCGA-A1-A0SD-01 Luminal A +TCGA-D8-A13Z TCGA-D8-A13Z-01 Her2 enriched +TCGA-A8-A08I TCGA-A8-A08I-01 Luminal B +TCGA-BH-A18P TCGA-BH-A18P-01 Her2 enriched +TCGA-BH-A0HL TCGA-BH-A0HL-01 +TCGA-A8-A0A7 TCGA-A8-A0A7-01 Her2 enriched +TCGA-B6-A0IQ TCGA-B6-A0IQ-01 basal-like +TCGA-A2-A0ES TCGA-A2-A0ES-01 Luminal A +TCGA-A2-A0CX TCGA-A2-A0CX-01 Her2 enriched +TCGA-BH-A0AU TCGA-BH-A0AU-01 Luminal B +TCGA-E2-A15H TCGA-E2-A15H-01 Luminal A +TCGA-A8-A06N TCGA-A8-A06N-01 Luminal B +TCGA-BH-A18H TCGA-BH-A18H-01 Luminal A +TCGA-A7-A0DB TCGA-A7-A0DB-01 Luminal A +TCGA-AQ-A04H TCGA-AQ-A04H-01 Luminal B +TCGA-BH-A1EU TCGA-BH-A1EU-01 Luminal A +TCGA-E2-A108 TCGA-E2-A108-01 Claudin low +TCGA-BH-A0E7 TCGA-BH-A0E7-01 Luminal A +TCGA-AN-A046 TCGA-AN-A046-01 Luminal A +TCGA-A2-A0CP TCGA-A2-A0CP-01 Luminal A +TCGA-A2-A0D1 TCGA-A2-A0D1-01 Her2 enriched +TCGA-A2-A0YG TCGA-A2-A0YG-01 Luminal B +TCGA-AO-A126 TCGA-AO-A126-01 Luminal A +TCGA-B6-A0IA TCGA-B6-A0IA-01 Luminal A +TCGA-E2-A15P TCGA-E2-A15P-01 Luminal A +TCGA-AN-A0XP TCGA-AN-A0XP-01 Luminal A +TCGA-A8-A07G TCGA-A8-A07G-01 Luminal A +TCGA-A8-A09K TCGA-A8-A09K-01 Luminal B +TCGA-A8-A07O TCGA-A8-A07O-01 basal-like +TCGA-A8-A09C TCGA-A8-A09C-01 Luminal B +TCGA-B6-A0I9 TCGA-B6-A0I9-01 Her2 enriched +TCGA-BH-A0DI TCGA-BH-A0DI-01 Luminal A +TCGA-AO-A0JC TCGA-AO-A0JC-01 Luminal B +TCGA-A2-A0SV TCGA-A2-A0SV-01 Luminal B +TCGA-A2-A0T7 TCGA-A2-A0T7-01 Luminal A +TCGA-A1-A0SO TCGA-A1-A0SO-01 basal-like +TCGA-E2-A1B0 TCGA-E2-A1B0-01 Her2 enriched +TCGA-D8-A140 TCGA-D8-A140-01 Luminal B +TCGA-BH-A0BF TCGA-BH-A0BF-01 Luminal B +TCGA-AO-A12G TCGA-AO-A12G-01 Luminal A +TCGA-A8-A07W TCGA-A8-A07W-01 Luminal B +TCGA-A8-A08Z TCGA-A8-A08Z-01 Luminal A +TCGA-AN-A0FW TCGA-AN-A0FW-01 Luminal A +TCGA-C8-A133 TCGA-C8-A133-01 Luminal A +TCGA-AR-A1AU TCGA-AR-A1AU-01 Luminal A +TCGA-B6-A0RO TCGA-B6-A0RO-01 Luminal A +TCGA-E2-A14W TCGA-E2-A14W-01 Luminal B +TCGA-E2-A158 TCGA-E2-A158-01 basal-like +TCGA-B6-A0X5 TCGA-B6-A0X5-01 Luminal B +TCGA-A8-A093 TCGA-A8-A093-01 Luminal A +TCGA-B6-A0WT TCGA-B6-A0WT-01 Luminal A +TCGA-A8-A08R TCGA-A8-A08R-01 basal-like +TCGA-BH-A0C7 TCGA-BH-A0C7-01 Luminal B +TCGA-BH-A0BV TCGA-BH-A0BV-01 Luminal A +TCGA-B6-A0RG TCGA-B6-A0RG-01 Luminal A +TCGA-AO-A0J3 TCGA-AO-A0J3-01 Luminal B +TCGA-C8-A12Z TCGA-C8-A12Z-01 Her2 enriched +TCGA-A7-A0CH TCGA-A7-A0CH-01 Luminal A +TCGA-A8-A08J TCGA-A8-A08J-01 Her2 enriched +TCGA-E2-A14O TCGA-E2-A14O-01 Luminal B +TCGA-E2-A150 TCGA-E2-A150-01 basal-like +TCGA-A8-A08H TCGA-A8-A08H-01 basal-like +TCGA-BH-A0B5 TCGA-BH-A0B5-01 Luminal B +TCGA-E2-A10A TCGA-E2-A10A-01 Luminal B +TCGA-A7-A0D9 TCGA-A7-A0D9-01 Luminal A +TCGA-A8-A0A6 TCGA-A8-A0A6-01 Luminal A +TCGA-BH-A18Q TCGA-BH-A18Q-01 basal-like +TCGA-A8-A06O TCGA-A8-A06O-01 Luminal B +TCGA-A2-A0ET TCGA-A2-A0ET-01 Luminal A +TCGA-A2-A0CY TCGA-A2-A0CY-01 Her2 enriched +TCGA-A8-A09Z TCGA-A8-A09Z-01 Luminal B +TCGA-BH-A18I TCGA-BH-A18I-01 Luminal A +TCGA-E2-A15G TCGA-E2-A15G-01 Luminal A +TCGA-AO-A03L TCGA-AO-A03L-01 Her2 enriched +TCGA-BH-A0HU TCGA-BH-A0HU-01 Luminal B +TCGA-BH-A1ET TCGA-BH-A1ET-01 Luminal A +TCGA-B6-A0IJ TCGA-B6-A0IJ-01 basal-like +TCGA-A7-A0DA TCGA-A7-A0DA-01 basal-like +TCGA-E2-A109 TCGA-E2-A109-01 Luminal B +TCGA-E2-A15O TCGA-E2-A15O-01 Luminal A +TCGA-AN-A0FF TCGA-AN-A0FF-01 Luminal B +TCGA-A2-A0T1 TCGA-A2-A0T1-01 Her2 enriched +TCGA-A2-A0YH TCGA-A2-A0YH-01 Luminal B +TCGA-A2-A0CQ TCGA-A2-A0CQ-01 Luminal A +TCGA-A2-A0D2 TCGA-A2-A0D2-01 basal-like +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_UNDEFINED +TCGA-BH-A0DO TCGA-BH-A0DO-01 Luminal A +TCGA-BH-A0E0 TCGA-BH-A0E0-01 basal-like +TCGA-B6-A0IB TCGA-B6-A0IB-01 Luminal B +TCGA-AO-A125 TCGA-AO-A125-01 Luminal A +TCGA-BH-A0WA TCGA-BH-A0WA-01 basal-like +TCGA-AN-A0XO TCGA-AN-A0XO-01 Luminal A +TCGA-AR-A0TV TCGA-AR-A0TV-01 Luminal B +TCGA-AN-A0XW TCGA-AN-A0XW-01 Luminal B +TCGA-A7-A13D TCGA-A7-A13D-01 basal-like +TCGA-A8-A09R TCGA-A8-A09R-01 Luminal B +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HOMOZYGOUS +TCGA-A8-A09B TCGA-A8-A09B-01 Luminal A +TCGA-BH-A0H5 TCGA-BH-A0H5-01 Luminal A +TCGA-AO-A0JD TCGA-AO-A0JD-01 Luminal B +TCGA-BH-A0BM TCGA-BH-A0BM-01 Luminal A +TCGA-BH-A0DH TCGA-BH-A0DH-01 Luminal A +TCGA-E2-A1B1 TCGA-E2-A1B1-01 Luminal A +TCGA-A2-A0SW TCGA-A2-A0SW-01 Luminal B +TCGA-AN-A0FN TCGA-AN-A0FN-01 Luminal A +TCGA-AO-A12F TCGA-AO-A12F-01 basal-like +TCGA-AN-A0FV TCGA-AN-A0FV-01 Her2 enriched +TCGA-A8-A07P TCGA-A8-A07P-01 Luminal A +TCGA-A8-A081 TCGA-A8-A081-01 Her2 enriched +TCGA-B6-A0RV TCGA-B6-A0RV-01 Luminal A +TCGA-C8-A12K TCGA-C8-A12K-01 basal-like +TCGA-AO-A0JL TCGA-AO-A0JL-01 basal-like +TCGA-C8-A134 TCGA-C8-A134-01 basal-like +TCGA-AR-A1AV TCGA-AR-A1AV-01 Luminal B +TCGA-B6-A0RN TCGA-B6-A0RN-01 Luminal A +TCGA-E2-A14V TCGA-E2-A14V-01 Her2 enriched +TCGA-A8-A092 TCGA-A8-A092-01 Her2 enriched +TCGA-D8-A141 TCGA-D8-A141-01 Luminal A +TCGA-C8-A1HI TCGA-C8-A1HI-01 Luminal A +TCGA-AR-A1AN TCGA-AR-A1AN-01 Luminal A +TCGA-AO-A0J4 TCGA-AO-A0J4-01 basal-like +TCGA-A8-A08A TCGA-A8-A08A-01 Luminal A +TCGA-A7-A0CG TCGA-A7-A0CG-01 Luminal A +TCGA-BH-A0EI TCGA-BH-A0EI-01 Luminal A +TCGA-E2-A14N TCGA-E2-A14N-01 basal-like diff --git a/test/test_data/study_es_0_import_export/data_mutations.txt b/test/test_data/study_es_0_import_export/data_mutations.txt new file mode 100644 index 00000000000..5d181f48041 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_mutations.txt @@ -0,0 +1,35 @@ +Hugo_Symbol Entrez_Gene_Id Center NCBI_Build Chromosome Start_Position End_Position Strand Variant_Classification Variant_Type Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 dbSNP_RS dbSNP_Val_Status Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Match_Norm_Seq_Allele1 Match_Norm_Seq_Allele2 Tumor_Validation_Allele1 Tumor_Validation_Allele2 Match_Norm_Validation_Allele1 Match_Norm_Validation_Allele2 Verification_Status Validation_Status Mutation_Status Sequencing_Phase Sequence_Source Validation_Method Score BAM_File Sequencer HGVSp_Short t_alt_count t_ref_count n_alt_count n_ref_count +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_UNDEFINED TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HETEROZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HOMOZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_15 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_4 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_3 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_2 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_1 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +MSH3 4437 genome.wustl.edu GRCh37 5 80024722 80024722 + Frame_Shift_Del DEL T - - NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +MYB 4602 genome.wustl.edu GRCh37 6 135507043 135507044 + Frame_Shift_Ins INS - A A NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 - - NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +PIEZO1 9780 genome.wustl.edu GRCh37 16 88790292 88790292 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +TP53 7157 genome.wustl.edu GRCh37 17 7578253 7578253 + Missense_Mutation SNP C A A NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A C NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +OR11H1 81061 genome.wustl.edu GRCh37 22 16449539 16449539 + Missense_Mutation SNP A G G NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +TMEM247 388946 genome.wustl.edu GRCh37 2 46707888 46707888 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 G G NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +ABLIM1 3983 genome.wustl.edu GRCh37 10 116247760 116247760 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +ADAMTS20 80070 genome.wustl.edu GRCh37 12 43944926 43944926 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +DTNB 1838 genome.wustl.edu GRCh37 2 25678299 25678299 + Missense_Mutation SNP C T T NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Nonsense_Mutation SNP G A A rs80357262 NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41201181 41201181 + Missense_Mutation SNP C A A rs80357069 byCluster TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +ATM 472 genome.wustl.edu GRCh37 11 108173702 108173702 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 - G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +ATM 472 genome.wustl.edu GRCh37 11 108106472 108106472 + Frame_Shift_Del DEL T - - novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +BRCA2 675 genome.wustl.edu GRCh37 13 108106473 108106473 + Nonsense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106484 108106484 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0E0-01 TCGA-BH-A0E0-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106483 108106483 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0HL-01 TCGA-BH-A0HL-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106482 108106482 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18K-01 TCGA-BH-A18K-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106481 108106481 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18V-01 TCGA-BH-A18V-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106480 108106480 + Nonsense_Mutation SNP T C C NA NA TCGA-B6-A0I6-01 TCGA-B6-A0I6-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106479 108106479 + Nonsense_Mutation SNP T C C NA NA TCGA-BH-A1F0-01 TCGA-BH-A1F0-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106478 108106478 + Missense_Mutation SNP T C C NA NA TCGA-B6-A0WX-01 TCGA-B6-A0WX-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106477 108106477 + Missense_Mutation SNP T C C NA NA TCGA-AR-A1AR-01 TCGA-AR-A1AR-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106476 108106476 + In_Frame_Del DEL T - - NA NA TCGA-A2-A0CM-01 TCGA-A2-A0CM-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106475 108106475 + In_Frame_Del DEL T - - NA NA TCGA-A1-A0SK-01 TCGA-A1-A0SK-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106474 108106474 + Nonsense_Mutation SNP T C C NA NA TCGA-A2-A04P-01 TCGA-A2-A04P-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA diff --git a/test/test_data/study_es_0_import_export/meta_clinical_samples.txt b/test/test_data/study_es_0_import_export/meta_clinical_samples.txt new file mode 100644 index 00000000000..c3cdc6773ed --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_clinical_samples.txt @@ -0,0 +1,4 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: CLINICAL +datatype: SAMPLE_ATTRIBUTES +data_filename: data_clinical_samples.txt diff --git a/test/test_data/study_es_0_import_export/meta_mutations.txt b/test/test_data/study_es_0_import_export/meta_mutations.txt new file mode 100644 index 00000000000..c9bb93bfae1 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_mutations.txt @@ -0,0 +1,8 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: MUTATION_EXTENDED +datatype: MAF +data_filename: data_mutations.txt +stable_id: mutations +show_profile_in_analysis_tab: true +profile_name: Mutations +profile_description: Mutation data from whole exome sequencing. diff --git a/test/test_data/study_es_0_import_export/meta_study.txt b/test/test_data/study_es_0_import_export/meta_study.txt new file mode 100644 index 00000000000..277e2cff81f --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_study.txt @@ -0,0 +1,9 @@ +type_of_cancer: brca +cancer_study_identifier: study_es_0_import_export +name: Test study es_0 +description: Test study es_0 +citation: Cell 2018 +pmid: 29625048,29596782,29622463,29617662,29625055,29625050 +groups: SU2C-PI3K;PUBLIC;GDAC +add_global_case_list: true +reference_genome: hg19 From 9795ca068162d0a6a777a84651f7a982a6541ffb Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 16:07:47 +0100 Subject: [PATCH 08/69] Enable dynamic study export mode on CI for running tests --- .github/workflows/integration-test.yml | 3 ++- src/main/resources/application.properties.EXAMPLE | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 8d4a3158dd2..10732cd868d 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -45,7 +45,8 @@ jobs: cat $PORTAL_SOURCE_DIR/src/main/resources/application.properties | \ sed 's|spring.datasource.url=.*|spring.datasource.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \ sed 's|spring.datasource.username=.*|spring.datasource.username=cbio_user|' | \ - sed 's|spring.datasource.password=.*|spring.datasource.password=somepassword|' \ + sed 's|spring.datasource.password=.*|spring.datasource.password=somepassword|' | \ + sed 's|dynamic_study_export_mode=.*|dynamic_study_export_mode=true|' \ > application.properties - name: 'Copy cgds.sql file into Docker Compose' run: cp ./cbioportal/src/main/resources/db-scripts/cgds.sql ./cbioportal-docker-compose/data/. diff --git a/src/main/resources/application.properties.EXAMPLE b/src/main/resources/application.properties.EXAMPLE index 200407da082..001a3afbbbe 100644 --- a/src/main/resources/application.properties.EXAMPLE +++ b/src/main/resources/application.properties.EXAMPLE @@ -442,5 +442,8 @@ spring.devtools.restart.enabled=false ## Custom Buttons # download_custom_buttons_json=classpath:custom_buttons/download_custom_button_avm.json +# Study Data Export +dynamic_study_export_mode=false + # EOL - Do not delete the following lines From 147c9fd30d634924cdad836af6cc44a2608c507d Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 26 Mar 2025 17:54:47 +0100 Subject: [PATCH 09/69] Fix import export study data differences --- .../file/export/ClinicalAttributeDataService.java | 3 ++- .../cbioportal/application/file/export/ExportService.java | 4 ++-- .../resources/mappers/export/CancerStudyMetadataMapper.xml | 3 ++- src/main/resources/mappers/export/MafRecordMapper.xml | 5 ++++- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java index 848af2d8256..d638d1cb478 100644 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java +++ b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java @@ -24,7 +24,8 @@ public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttribut } public LongTable getClinicalSampleAttributeData(String studyId) { - List clinicalSampleAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId); + List clinicalSampleAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId).stream() + .filter(clinicalAttribute -> !NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalAttribute.getAttributeId())).toList(); Iterable clinicalSampleAttributeValues = clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId); Iterable completeSampleAttributes = Iterables.concat( diff --git a/src/main/java/org/cbioportal/application/file/export/ExportService.java b/src/main/java/org/cbioportal/application/file/export/ExportService.java index 23467288aa1..b0fd39b3bae 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportService.java @@ -62,7 +62,7 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) Iterator mafRecordIterator = mafRecordService.getMafRecords(geneticProfile.getStableId()); if (mafRecordIterator.hasNext()) { GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata( - geneticProfile.getStableId(), + geneticProfile.getStableId().replace(studyId + "_", ""), //TODO Use mol. alteration type and datatype from the map above instead geneticProfile.getGeneticAlterationType(), geneticProfile.getDatatype(), @@ -92,7 +92,7 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) if (sampleList.getStableId().endsWith("_all")) { continue; } - try (Writer caseListWriter = fileWriterFactory.newWriter("case_lists/" + sampleList.getStableId() + ".txt")) { + try (Writer caseListWriter = fileWriterFactory.newWriter("case_lists/cases_" + sampleList.getStableId().replace(studyId + "_", "") + ".txt")) { new KeyValueMetadataWriter(caseListWriter).write(new CaseListMetadata(studyId, sampleList.getStableId(), //TODO Sometime name/description could contain number of samples from the original study //maybe composing its own name and description would work better diff --git a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml index a84b47cf2e5..18f5a094fdb 100644 --- a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml +++ b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml @@ -11,7 +11,8 @@ cs.CITATION AS citation, cs.PMID AS pmid, cs.`GROUPS` AS `groups`, - rg.NAME AS referenceGenome + rg.NAME AS referenceGenome, + 1 AS addGlobalCaseList FROM cancer_study cs JOIN reference_genome rg ON rg.REFERENCE_GENOME_ID = cs.REFERENCE_GENOME_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} diff --git a/src/main/resources/mappers/export/MafRecordMapper.xml b/src/main/resources/mappers/export/MafRecordMapper.xml index 0adac7fdd1f..03719cb78c9 100644 --- a/src/main/resources/mappers/export/MafRecordMapper.xml +++ b/src/main/resources/mappers/export/MafRecordMapper.xml @@ -8,6 +8,7 @@ resultSetType="FORWARD_ONLY"> SELECT g.ENTREZ_GENE_ID AS entrezGeneId, + m.CENTER AS center, g.HUGO_GENE_SYMBOL AS hugoSymbol, me.NCBI_BUILD AS ncbiBuild, me.CHR AS chromosome, @@ -27,6 +28,8 @@ m.MATCH_NORM_SEQ_ALLELE2 AS matchNormSeqAllele2, m.TUMOR_VALIDATION_ALLELE1 AS tumorValidationAllele1, m.TUMOR_VALIDATION_ALLELE2 AS tumorValidationAllele2, + m.MATCH_NORM_VALIDATION_ALLELE1 AS matchNormValidationAllele1, + m.MATCH_NORM_VALIDATION_ALLELE2 AS matchNormValidationAllele2, m.VERIFICATION_STATUS AS verificationStatus, m.VALIDATION_STATUS AS validationStatus, m.MUTATION_STATUS AS mutationStatus, @@ -42,7 +45,7 @@ m.NORMAL_ALT_COUNT AS nAltCount, m.NORMAL_REF_COUNT AS nRefCount FROM mutation m - JOIN genetic_profile gp ON m.GENETIC_PROFILE_ID = m.GENETIC_PROFILE_ID + JOIN genetic_profile gp ON gp.GENETIC_PROFILE_ID = m.GENETIC_PROFILE_ID JOIN sample s ON s.INTERNAL_ID = m.SAMPLE_ID JOIN gene g ON g.ENTREZ_GENE_ID = m.ENTREZ_GENE_ID JOIN mutation_event me ON me.MUTATION_EVENT_ID = m.MUTATION_EVENT_ID From c7d07d42bf6219382e20aa5463ea0160f666930c Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Mon, 31 Mar 2025 16:03:33 +0200 Subject: [PATCH 10/69] Refactor the code --- .../export/ClinicalAttributeDataService.java | 100 ------------- .../application/file/export/ExportConfig.java | 16 ++- .../file/export/ExportController.java | 2 + .../file/export/MafRecordService.java | 19 --- .../application/file/export/TSVUtil.java | 20 --- .../CancerStudyMetadataExporter.java | 31 ++++ ...icalAttributesMetadataAndDataExporter.java | 40 ++++++ ...ientAttributesMetadataAndDataExporter.java | 24 ++++ ...mpleAttributesMetadataAndDataExporter.java | 24 ++++ .../file/export/exporters/Exporter.java | 16 +++ .../exporters/MAFMetadataAndDataExporter.java | 54 +++++++ .../exporters/MetadataAndDataExporter.java | 54 +++++++ .../export/exporters/MetadataExporter.java | 35 +++++ .../mappers/ClinicalAttributeDataMapper.java | 15 +- .../CancerStudyMetadataService.java | 4 +- .../CaseListMetadataService.java | 2 +- .../ClinicalAttributeDataService.java | 136 ++++++++++++++++++ .../export/{ => services}/ExportService.java | 81 ++++++----- .../{ => services}/GeneticProfileService.java | 3 +- .../export/services/MafRecordService.java | 19 +++ .../ClinicalAttributeDataWriter.java | 30 ++-- .../{ => writers}/KeyValueMetadataWriter.java | 117 ++++++++------- .../export/{ => writers}/MafRecordWriter.java | 9 +- .../file/model/CancerStudyMetadata.java | 2 +- .../file/model/ClinicalAttribute.java | 23 ++- ...a.java => ClinicalAttributesMetadata.java} | 23 ++- .../ClinicalPatientAttributeValue.java | 2 +- .../ClinicalSampleAttributeValue.java | 2 +- .../file/model/GenericDatatypeMetadata.java | 2 + .../model/GenericProfileDatatypeMetadata.java | 2 - .../application/file/model/LongTable.java | 47 ------ .../application/file/model/MafRecord.java | 1 - .../file/utils/CloseableIterator.java | 7 + .../application/file/utils/CursorAdapter.java | 37 +++++ .../{export => utils}/FileWriterFactory.java | 2 +- .../application/file/utils/MapUtils.java | 14 ++ .../application/file/utils/TSVUtil.java | 13 ++ .../ZipOutputStreamWriterFactory.java | 2 +- .../export/ClinicalAttributeDataMapper.xml | 4 +- .../ClinicalAttributeDataServiceTests.java | 72 ++++++---- ...ava => ClinicalAttributeExporterTest.java} | 18 +-- .../file/export/MafRecordWriterTest.java | 1 + ...terTest.java => MetadataExporterTest.java} | 32 +++-- .../file/export/SimpleCloseableIterator.java | 29 ++++ .../application/file/export/TSVUtilTest.java | 1 + .../file/export/TestFakeCursor.java | 2 - 46 files changed, 797 insertions(+), 392 deletions(-) delete mode 100644 src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java delete mode 100644 src/main/java/org/cbioportal/application/file/export/MafRecordService.java delete mode 100644 src/main/java/org/cbioportal/application/file/export/TSVUtil.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ClinicalAttributesMetadataAndDataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesMetadataAndDataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesMetadataAndDataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MAFMetadataAndDataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MetadataAndDataExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java rename src/main/java/org/cbioportal/application/file/export/{ => services}/CancerStudyMetadataService.java (90%) rename src/main/java/org/cbioportal/application/file/export/{ => services}/CaseListMetadataService.java (90%) create mode 100644 src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java rename src/main/java/org/cbioportal/application/file/export/{ => services}/ExportService.java (52%) rename src/main/java/org/cbioportal/application/file/export/{ => services}/GeneticProfileService.java (87%) create mode 100644 src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java rename src/main/java/org/cbioportal/application/file/export/{ => writers}/ClinicalAttributeDataWriter.java (60%) rename src/main/java/org/cbioportal/application/file/export/{ => writers}/KeyValueMetadataWriter.java (83%) rename src/main/java/org/cbioportal/application/file/export/{ => writers}/MafRecordWriter.java (96%) rename src/main/java/org/cbioportal/application/file/model/{ClinicalSampleAttributesMetadata.java => ClinicalAttributesMetadata.java} (52%) rename src/main/java/org/cbioportal/application/file/{export => model}/ClinicalPatientAttributeValue.java (95%) rename src/main/java/org/cbioportal/application/file/{export => model}/ClinicalSampleAttributeValue.java (96%) delete mode 100644 src/main/java/org/cbioportal/application/file/model/LongTable.java create mode 100644 src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java create mode 100644 src/main/java/org/cbioportal/application/file/utils/CursorAdapter.java rename src/main/java/org/cbioportal/application/file/{export => utils}/FileWriterFactory.java (75%) create mode 100644 src/main/java/org/cbioportal/application/file/utils/MapUtils.java create mode 100644 src/main/java/org/cbioportal/application/file/utils/TSVUtil.java rename src/main/java/org/cbioportal/application/file/{export => utils}/ZipOutputStreamWriterFactory.java (96%) rename src/test/java/org/cbioportal/application/file/export/{ClinicalAttributeDataWriterTest.java => ClinicalAttributeExporterTest.java} (70%) rename src/test/java/org/cbioportal/application/file/export/{MetadataWriterTest.java => MetadataExporterTest.java} (82%) create mode 100644 src/test/java/org/cbioportal/application/file/export/SimpleCloseableIterator.java diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java deleted file mode 100644 index d638d1cb478..00000000000 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataService.java +++ /dev/null @@ -1,100 +0,0 @@ -package org.cbioportal.application.file.export; - -import com.google.common.collect.Iterables; -import com.google.common.collect.Iterators; -import com.google.common.collect.PeekingIterator; -import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; -import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.LongTable; - -import java.util.*; -import java.util.function.Function; - -/** - * Service to retrieve clinical data attributes and values for a study as a long table - */ -public class ClinicalAttributeDataService { - - public static final Set NOT_EXPORTABLE_SAMPLE_ATTRIBUTES = Set.of("MUTATION_COUNT", "FRACTION_GENOME_ALTERED"); - - private final ClinicalAttributeDataMapper clinicalAttributeDataMapper; - - public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttributeDataMapper) { - this.clinicalAttributeDataMapper = clinicalAttributeDataMapper; - } - - public LongTable getClinicalSampleAttributeData(String studyId) { - List clinicalSampleAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId).stream() - .filter(clinicalAttribute -> !NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalAttribute.getAttributeId())).toList(); - Iterable clinicalSampleAttributeValues = clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId); - - Iterable completeSampleAttributes = Iterables.concat( - List.of(ClinicalAttribute.PATIENT_ID, ClinicalAttribute.SAMPLE_ID), - clinicalSampleAttributes); - return new LongTable<>(completeSampleAttributes, new Iterator<>() { - private final PeekingIterator clinicalSampleAttributeValueIterator = Iterators.peekingIterator(clinicalSampleAttributeValues.iterator()); - - @Override - public boolean hasNext() { - return clinicalSampleAttributeValueIterator.hasNext(); - } - - @Override - public Function> next() { - while (clinicalSampleAttributeValueIterator.hasNext()) { - ClinicalSampleAttributeValue clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); - HashMap attributeValueMap = new HashMap<>(); - attributeValueMap.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), clinicalSampleAttributeValue.getPatientId()); - attributeValueMap.put(ClinicalAttribute.SAMPLE_ID.getAttributeId(), clinicalSampleAttributeValue.getSampleId()); - if (!NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalSampleAttributeValue.getAttributeId())) { - attributeValueMap.put(clinicalSampleAttributeValue.getAttributeId(), clinicalSampleAttributeValue.getAttributeValue()); - } - while (clinicalSampleAttributeValueIterator.hasNext() - && clinicalSampleAttributeValueIterator.peek().getPatientId().equals(clinicalSampleAttributeValue.getPatientId()) - && clinicalSampleAttributeValueIterator.peek().getSampleId().equals(clinicalSampleAttributeValue.getSampleId())) { - clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); - if (!NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalSampleAttributeValue.getAttributeId())) { - attributeValueMap.put(clinicalSampleAttributeValue.getAttributeId(), clinicalSampleAttributeValue.getAttributeValue()); - } - } - return (clinicalAttribute -> Optional.ofNullable(attributeValueMap.get(clinicalAttribute.getAttributeId()))); - } - throw new IllegalStateException("No more elements"); - } - }); - } - - public LongTable getClinicalPatientAttributeData(String studyId) { - List clinicalPatientAttributes = clinicalAttributeDataMapper.getClinicalPatientAttributes(studyId); - Iterable clinicalPatientAttributeValues = clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId); - - Iterable completePatientAttributes = Iterables.concat( - List.of(ClinicalAttribute.PATIENT_ID), - clinicalPatientAttributes); - return new LongTable<>(completePatientAttributes, new Iterator<>() { - private final PeekingIterator clinicalPatientAttributeValueIterator = Iterators.peekingIterator(clinicalPatientAttributeValues.iterator()); - - @Override - public boolean hasNext() { - return clinicalPatientAttributeValueIterator.hasNext(); - } - - @Override - public Function> next() { - while (clinicalPatientAttributeValueIterator.hasNext()) { - ClinicalPatientAttributeValue clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); - HashMap attributeValueMap = new HashMap<>(); - attributeValueMap.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), clinicalPatientAttributeValue.getPatientId()); - attributeValueMap.put(clinicalPatientAttributeValue.getAttributeId(), clinicalPatientAttributeValue.getAttributeValue()); - while (clinicalPatientAttributeValueIterator.hasNext() - && clinicalPatientAttributeValueIterator.peek().getPatientId().equals(clinicalPatientAttributeValue.getPatientId())) { - clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); - attributeValueMap.put(clinicalPatientAttributeValue.getAttributeId(), clinicalPatientAttributeValue.getAttributeValue()); - } - return (clinicalAttribute -> Optional.ofNullable(attributeValueMap.get(clinicalAttribute.getAttributeId()))); - } - throw new IllegalStateException("No more elements"); - } - }); - } -} diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index e2cc0f13505..1edcaf95732 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -2,7 +2,17 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import org.cbioportal.application.file.export.mappers.*; +import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; +import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; +import org.cbioportal.application.file.export.mappers.MafRecordMapper; +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; +import org.cbioportal.application.file.export.services.CaseListMetadataService; +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.export.services.ExportService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.export.services.MafRecordService; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -54,7 +64,7 @@ public ExportService exportService(CancerStudyMetadataService cancerStudyMetadat CaseListMetadataService caseListMetadataService) { return new ExportService(cancerStudyMetadataService, clinicalDataAttributeDataService, geneticProfileService, mafRecordService, caseListMetadataService); } - + @Bean("exportSqlSessionFactory") public SqlSessionFactoryBean exportSqlSessionFactory(@Qualifier("exportDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); @@ -83,5 +93,5 @@ public DataSource exportDataSource(DataSourceProperties mysqlDataSourcePropertie return new HikariDataSource(hikariConfig); } - + } diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 4efcdaedf5e..42456487ccc 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -1,6 +1,8 @@ package org.cbioportal.application.file.export; import jakarta.servlet.http.HttpServletResponse; +import org.cbioportal.application.file.export.services.ExportService; +import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; diff --git a/src/main/java/org/cbioportal/application/file/export/MafRecordService.java b/src/main/java/org/cbioportal/application/file/export/MafRecordService.java deleted file mode 100644 index 5118cc1710c..00000000000 --- a/src/main/java/org/cbioportal/application/file/export/MafRecordService.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.cbioportal.application.file.export.mappers.MafRecordMapper; -import org.cbioportal.application.file.model.MafRecord; - -import java.util.Iterator; - -public class MafRecordService { - - private final MafRecordMapper mafRecordMapper; - - public MafRecordService(MafRecordMapper mafRecordMapper) { - this.mafRecordMapper = mafRecordMapper; - } - - public Iterator getMafRecords(String molecularProfileStableId) { - return mafRecordMapper.getMafRecords(molecularProfileStableId).iterator(); - } -} diff --git a/src/main/java/org/cbioportal/application/file/export/TSVUtil.java b/src/main/java/org/cbioportal/application/file/export/TSVUtil.java deleted file mode 100644 index 20dff1e1ff9..00000000000 --- a/src/main/java/org/cbioportal/application/file/export/TSVUtil.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cbioportal.application.file.export; - -import com.google.common.collect.Iterables; - -import java.util.Optional; -import java.util.stream.Collectors; -import java.util.stream.StreamSupport; - -public class TSVUtil { - public static final String TAB = "\t"; - - public static String composeRow(Iterable row) { - return composeRowOfOptionals(Iterables.transform(row, Optional::ofNullable)); - } - - public static String composeRowOfOptionals(Iterable> row) { - return StreamSupport.stream(row.spliterator(), false) - .map(s -> s.map(string -> string.replace(TAB, "\\t")).orElse("")).collect(Collectors.joining(TAB)) + "\n"; - } -} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java new file mode 100644 index 00000000000..86e8b7b5e52 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java @@ -0,0 +1,31 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; +import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; +import org.cbioportal.application.file.model.CancerStudyMetadata; + +import java.io.Writer; + +public class CancerStudyMetadataExporter extends MetadataExporter { + + private final CancerStudyMetadataService cancerStudyMetadataService; + + public CancerStudyMetadataExporter(CancerStudyMetadataService cancerStudyMetadataService) { + this.cancerStudyMetadataService = cancerStudyMetadataService; + } + + @Override + public String getMetaFilename() { + return "meta_study.txt"; + } + + @Override + protected CancerStudyMetadata getMetadata(String studyId) { + return cancerStudyMetadataService.getCancerStudyMetadata(studyId); + } + + @Override + protected void writeMetadata(Writer writer, CancerStudyMetadata metadata) { + new KeyValueMetadataWriter(writer).write(metadata); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalAttributesMetadataAndDataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalAttributesMetadataAndDataExporter.java new file mode 100644 index 00000000000..ff4b72e0b45 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalAttributesMetadataAndDataExporter.java @@ -0,0 +1,40 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.export.writers.ClinicalAttributeDataWriter; +import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalAttributesMetadata; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.Writer; +import java.util.SequencedMap; + +public abstract class ClinicalAttributesMetadataAndDataExporter extends MetadataAndDataExporter>> { + + protected final ClinicalAttributeDataService clinicalDataAttributeDataService; + + public ClinicalAttributesMetadataAndDataExporter(ClinicalAttributeDataService clinicalDataAttributeDataService) { + this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; + } + + @Override + public String getGeneticAlterationType() { + return "CLINICAL"; + } + + @Override + protected void writeData(Writer writer, CloseableIterator> data) { + new ClinicalAttributeDataWriter(writer).write(data); + } + + @Override + protected ClinicalAttributesMetadata getMetadata(String studyId) { + return new ClinicalAttributesMetadata(studyId, getGeneticAlterationType(), getDatatype(), getDataFilename()); + } + + @Override + protected void writeMetadata(Writer writer, ClinicalAttributesMetadata metadata) { + new KeyValueMetadataWriter(writer).write(metadata); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesMetadataAndDataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesMetadataAndDataExporter.java new file mode 100644 index 00000000000..7892b1d07cc --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesMetadataAndDataExporter.java @@ -0,0 +1,24 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.util.SequencedMap; + +public class ClinicalPatientAttributesMetadataAndDataExporter extends ClinicalAttributesMetadataAndDataExporter { + + public ClinicalPatientAttributesMetadataAndDataExporter(ClinicalAttributeDataService clinicalDataAttributeDataService) { + super(clinicalDataAttributeDataService); + } + + @Override + public String getDatatype() { + return "PATIENT_ATTRIBUTES"; + } + + @Override + protected CloseableIterator> getData(String studyId) { + return clinicalDataAttributeDataService.getClinicalPatientAttributeData(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesMetadataAndDataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesMetadataAndDataExporter.java new file mode 100644 index 00000000000..58d67dfbc67 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesMetadataAndDataExporter.java @@ -0,0 +1,24 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.util.SequencedMap; + +public class ClinicalSampleAttributesMetadataAndDataExporter extends ClinicalAttributesMetadataAndDataExporter { + + public ClinicalSampleAttributesMetadataAndDataExporter(ClinicalAttributeDataService clinicalDataAttributeDataService) { + super(clinicalDataAttributeDataService); + } + + @Override + public String getDatatype() { + return "SAMPLE_ATTRIBUTES"; + } + + @Override + protected CloseableIterator> getData(String studyId) { + return clinicalDataAttributeDataService.getClinicalSampleAttributeData(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java new file mode 100644 index 00000000000..1da6f8ef06f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java @@ -0,0 +1,16 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.utils.FileWriterFactory; + +/** + * Exports data to file(s) for a study + */ +public interface Exporter { + + /** + * @param fileWriterFactory - a factory to create writers + * @param studyId - the study id + * @return true - if data was exported, false - if no data was exported e.g. no data available for the study + */ + boolean exportData(FileWriterFactory fileWriterFactory, String studyId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MAFMetadataAndDataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MAFMetadataAndDataExporter.java new file mode 100644 index 00000000000..0eb298bd280 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MAFMetadataAndDataExporter.java @@ -0,0 +1,54 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.MafRecordService; +import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; +import org.cbioportal.application.file.export.writers.MafRecordWriter; +import org.cbioportal.application.file.model.GenericProfileDatatypeMetadata; +import org.cbioportal.application.file.model.MafRecord; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.Writer; + +//TODO think how profile data types metaddata and data write has to be different +public class MAFMetadataAndDataExporter extends MetadataAndDataExporter> { + + private final MafRecordService mafRecordService; + + public MAFMetadataAndDataExporter(MafRecordService mafRecordService) { + this.mafRecordService = mafRecordService; + } + + @Override + public String getGeneticAlterationType() { + return "MUTATION_EXTENDED"; + } + + @Override + public String getDatatype() { + return "MAF"; + } + + @Override + protected CloseableIterator getData(String studyId) { + return mafRecordService.getMafRecords(studyId); + } + + @Override + protected void writeData(Writer writer, CloseableIterator data) { + new MafRecordWriter(writer).write(data); + } + + @Override + protected GenericProfileDatatypeMetadata getMetadata(String studyId) { + /** + * String stableId, String geneticAlterationType, String datatype, String cancerStudyIdentifier, String dataFilename, String profileName, String profileDescription, String genePanel, Boolean showProfileInAnalysisTab + */ + //GeneticProfile + return new GenericProfileDatatypeMetadata("profile", getGeneticAlterationType(), getDatatype(), studyId, getDataFilename(), "profileName", "profileDescription", "genePanel", true); + } + + @Override + protected void writeMetadata(Writer writer, GenericProfileDatatypeMetadata metadata) { + new KeyValueMetadataWriter(writer).write(metadata); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataAndDataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataAndDataExporter.java new file mode 100644 index 00000000000..a0c9f58b7c9 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataAndDataExporter.java @@ -0,0 +1,54 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.model.StudyRelatedMetadata; +import org.cbioportal.application.file.utils.FileWriterFactory; + +import java.io.Closeable; +import java.io.Writer; +import java.util.Iterator; + +/** + * Export metadata and data for a specific genetic alteration type and datatype. + * + * @param - a metadata type + * @param - a data type + */ +public abstract class MetadataAndDataExporter & Closeable> extends MetadataExporter { + + /** + * @return the genetic alteration type of the datatype. e.g. "MUTATION_EXTENDED" + */ + public abstract String getGeneticAlterationType(); + + public abstract String getDatatype(); + + @Override + public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { + try (DS data = getData(studyId)) { + if (data.hasNext()) { + if (!super.exportData(fileWriterFactory, studyId)) { + throw new IllegalStateException("Cannot get metadata for study " + studyId + " for genetic alteration type" + getGeneticAlterationType() + " and datatype " + getDatatype()); + } + try (Writer dataFileWriter = fileWriterFactory.newWriter(getDataFilename())) { + writeData(dataFileWriter, data); + } + return true; + } + } catch (Exception e) { + throw new RuntimeException(e); + } + return false; + } + + public String getDataFilename() { + return "data_" + getGeneticAlterationType().toLowerCase() + "_" + getDatatype().toLowerCase() + ".txt"; + } + + protected abstract DS getData(String studyId); + + protected abstract void writeData(Writer writer, DS data); + + public String getMetaFilename() { + return "meta_" + getGeneticAlterationType().toLowerCase() + "_" + getDatatype().toLowerCase() + ".txt"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java new file mode 100644 index 00000000000..6c754381fbc --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java @@ -0,0 +1,35 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.model.StudyRelatedMetadata; +import org.cbioportal.application.file.utils.FileWriterFactory; + +import java.io.IOException; +import java.io.Writer; + +/** + * Exports a metadata to a file + * + * @param - a metadata type + */ +public abstract class MetadataExporter implements Exporter { + + public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { + M metadata = getMetadata(studyId); + if (metadata == null) { + return false; + } + try (Writer metaFileWriter = fileWriterFactory.newWriter(getMetaFilename())) { + writeMetadata(metaFileWriter, metadata); + return true; + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public abstract String getMetaFilename(); + + protected abstract M getMetadata(String studyId); + + protected abstract void writeMetadata(Writer writer, M metadata); + +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java index c5e6d5646a7..173b0d0f5e8 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java @@ -1,16 +1,19 @@ package org.cbioportal.application.file.export.mappers; import org.apache.ibatis.cursor.Cursor; -import org.cbioportal.application.file.export.ClinicalPatientAttributeValue; -import org.cbioportal.application.file.export.ClinicalSampleAttributeValue; import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; +import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; import java.util.List; public interface ClinicalAttributeDataMapper { - List getClinicalSampleAttributes(String studyId); - Cursor getClinicalSampleAttributeValues(String studyId); - List getClinicalPatientAttributes(String studyId); - Cursor getClinicalPatientAttributeValues(String studyId); + List getClinicalSampleAttributes(String studyId); + + Cursor getClinicalSampleAttributeValues(String studyId); + + List getClinicalPatientAttributes(String studyId); + + Cursor getClinicalPatientAttributeValues(String studyId); } diff --git a/src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java b/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java similarity index 90% rename from src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java rename to src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java index a25c16482ce..41b2da0bdd2 100644 --- a/src/main/java/org/cbioportal/application/file/export/CancerStudyMetadataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.services; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.model.CancerStudyMetadata; @@ -10,7 +10,7 @@ public class CancerStudyMetadataService { public CancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataMapper) { this.cancerStudyMetadataMapper = cancerStudyMetadataMapper; } - + public CancerStudyMetadata getCancerStudyMetadata(String studyId) { return cancerStudyMetadataMapper.getCancerStudyMetadata(studyId); } diff --git a/src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java b/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java similarity index 90% rename from src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java rename to src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java index d987eef5e9c..b73c0aba970 100644 --- a/src/main/java/org/cbioportal/application/file/export/CaseListMetadataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.services; import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; import org.cbioportal.application.file.model.CaseListMetadata; diff --git a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java new file mode 100644 index 00000000000..454ad2e1d47 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java @@ -0,0 +1,136 @@ +package org.cbioportal.application.file.export.services; + +import com.google.common.collect.Iterators; +import com.google.common.collect.PeekingIterator; +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; +import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.LinkedHashMap; +import java.util.SequencedMap; +import java.util.Set; +import java.util.TreeMap; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * Service to retrieve clinical data attributes and values for a study + */ +public class ClinicalAttributeDataService { + + public static final Set NOT_EXPORTABLE_SAMPLE_ATTRIBUTES = Set.of("MUTATION_COUNT", "FRACTION_GENOME_ALTERED"); + + private final ClinicalAttributeDataMapper clinicalAttributeDataMapper; + + public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttributeDataMapper) { + this.clinicalAttributeDataMapper = clinicalAttributeDataMapper; + } + + public CloseableIterator> getClinicalSampleAttributeData(String studyId) { + final TreeMap clinicalSampleAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId).stream() + .filter(clinicalAttribute -> !NOT_EXPORTABLE_SAMPLE_ATTRIBUTES.contains(clinicalAttribute.getAttributeId())) + .filter(clinicalAttribute -> !ClinicalAttribute.PATIENT_ID.getAttributeId().equals(clinicalAttribute.getAttributeId())) + .filter(clinicalAttribute -> !ClinicalAttribute.SAMPLE_ID.getAttributeId().equals(clinicalAttribute.getAttributeId())) + .collect(Collectors.toMap( + ClinicalAttribute::getAttributeId, + Function.identity(), + (existing, duplicate) -> { + throw new IllegalStateException("Duplicate (the same attribute id) clinical sample attributes detected: " + existing + " and " + duplicate); + }, + TreeMap::new)); + + final Cursor clinicalSampleAttributeValues = clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId); + + return new CloseableIterator<>() { + + private final PeekingIterator clinicalSampleAttributeValueIterator = Iterators.peekingIterator(clinicalSampleAttributeValues.iterator()); + + @Override + public boolean hasNext() { + return clinicalSampleAttributeValueIterator.hasNext(); + } + + @Override + public LinkedHashMap next() { + while (clinicalSampleAttributeValueIterator.hasNext()) { + ClinicalSampleAttributeValue clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); + LinkedHashMap attributeValueMap = new LinkedHashMap<>(); + attributeValueMap.put(ClinicalAttribute.PATIENT_ID, clinicalSampleAttributeValue.getPatientId()); + attributeValueMap.put(ClinicalAttribute.SAMPLE_ID, clinicalSampleAttributeValue.getSampleId()); + if (clinicalSampleAttributes.containsKey(clinicalSampleAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalSampleAttributes.get(clinicalSampleAttributeValue.getAttributeId()), clinicalSampleAttributeValue.getAttributeValue()); + } + while (clinicalSampleAttributeValueIterator.hasNext() + && clinicalSampleAttributeValueIterator.peek().getPatientId().equals(clinicalSampleAttributeValue.getPatientId()) + && clinicalSampleAttributeValueIterator.peek().getSampleId().equals(clinicalSampleAttributeValue.getSampleId())) { + clinicalSampleAttributeValue = clinicalSampleAttributeValueIterator.next(); + if (clinicalSampleAttributes.containsKey(clinicalSampleAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalSampleAttributes.get(clinicalSampleAttributeValue.getAttributeId()), clinicalSampleAttributeValue.getAttributeValue()); + } + } + return attributeValueMap; + } + throw new IllegalStateException("No more elements"); + } + + @Override + public void close() throws IOException { + clinicalSampleAttributeValues.close(); + } + }; + } + + public CloseableIterator> getClinicalPatientAttributeData(String studyId) { + final TreeMap clinicalPatientAttributes = clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId).stream() + .filter(clinicalAttribute -> !ClinicalAttribute.PATIENT_ID.getAttributeId().equals(clinicalAttribute.getAttributeId())) + .filter(clinicalAttribute -> !ClinicalAttribute.SAMPLE_ID.getAttributeId().equals(clinicalAttribute.getAttributeId())) + .collect(Collectors.toMap( + ClinicalAttribute::getAttributeId, + Function.identity(), + (existing, duplicate) -> { + throw new IllegalStateException("Duplicate (the same attribute id) clinical patient attributes detected: " + existing + " and " + duplicate); + }, + TreeMap::new)); + + final Cursor clinicalPatientAttributeValues = clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId); + + return new CloseableIterator<>() { + private final PeekingIterator clinicalPatientAttributeValueIterator = Iterators.peekingIterator(clinicalPatientAttributeValues.iterator()); + + @Override + public boolean hasNext() { + return clinicalPatientAttributeValueIterator.hasNext(); + } + + @Override + public LinkedHashMap next() { + while (clinicalPatientAttributeValueIterator.hasNext()) { + ClinicalPatientAttributeValue clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); + LinkedHashMap attributeValueMap = new LinkedHashMap<>(); + attributeValueMap.put(ClinicalAttribute.PATIENT_ID, clinicalPatientAttributeValue.getPatientId()); + if (clinicalPatientAttributes.containsKey(clinicalPatientAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalPatientAttributes.get(clinicalPatientAttributeValue.getAttributeId()), clinicalPatientAttributeValue.getAttributeValue()); + } + while (clinicalPatientAttributeValueIterator.hasNext() + && clinicalPatientAttributeValueIterator.peek().getPatientId().equals(clinicalPatientAttributeValue.getPatientId())) { + clinicalPatientAttributeValue = clinicalPatientAttributeValueIterator.next(); + if (clinicalPatientAttributes.containsKey(clinicalPatientAttributeValue.getAttributeId())) { + attributeValueMap.put(clinicalPatientAttributes.get(clinicalPatientAttributeValue.getAttributeId()), clinicalPatientAttributeValue.getAttributeValue()); + } + } + return attributeValueMap; + } + throw new IllegalStateException("No more elements"); + } + + @Override + public void close() throws IOException { + clinicalPatientAttributeValues.close(); + } + }; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java similarity index 52% rename from src/main/java/org/cbioportal/application/file/export/ExportService.java rename to src/main/java/org/cbioportal/application/file/export/services/ExportService.java index b0fd39b3bae..4cc5584c48d 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -1,12 +1,23 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.services; -import org.cbioportal.application.file.model.*; +import org.cbioportal.application.file.export.writers.ClinicalAttributeDataWriter; +import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; +import org.cbioportal.application.file.export.writers.MafRecordWriter; +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.CaseListMetadata; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalAttributesMetadata; +import org.cbioportal.application.file.model.GenericProfileDatatypeMetadata; +import org.cbioportal.application.file.model.GeneticProfile; +import org.cbioportal.application.file.model.MafRecord; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.cbioportal.application.file.utils.FileWriterFactory; import org.springframework.transaction.annotation.Transactional; import java.io.IOException; import java.io.Writer; -import java.util.Iterator; import java.util.List; +import java.util.SequencedMap; //TODO do I use file DTO in mybatis layer or not? Be consistent public class ExportService { @@ -18,11 +29,11 @@ public class ExportService { private final CaseListMetadataService caseListMetadataService; public ExportService( - CancerStudyMetadataService cancerStudyMetadataService, - ClinicalAttributeDataService clinicalDataAttributeDataService, - GeneticProfileService geneticProfileService, - MafRecordService mafRecordService, - CaseListMetadataService caseListMetadataService + CancerStudyMetadataService cancerStudyMetadataService, + ClinicalAttributeDataService clinicalDataAttributeDataService, + GeneticProfileService geneticProfileService, + MafRecordService mafRecordService, + CaseListMetadataService caseListMetadataService ) { this.cancerStudyMetadataService = cancerStudyMetadataService; this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; @@ -42,11 +53,11 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) // by iterating over the available data types and calling the appropriate fetchers and writers // the boiler plate code below should be replaced by the above logic - try (LongTable clinicalAttributeData = clinicalDataAttributeDataService.getClinicalSampleAttributeData(studyId)) { + try (CloseableIterator> clinicalAttributeData = clinicalDataAttributeDataService.getClinicalSampleAttributeData(studyId)) { if (clinicalAttributeData.hasNext()) { - ClinicalSampleAttributesMetadata clinicalSampleAttributesMetadata = new ClinicalSampleAttributesMetadata(studyId, "data_clinical_samples.txt"); + ClinicalAttributesMetadata clinicalAttributesMetadata = new ClinicalAttributesMetadata(studyId, "", "", "data_clinical_samples.txt"); try (Writer clinicalSampleMetadataWriter = fileWriterFactory.newWriter("meta_clinical_samples.txt")) { - new KeyValueMetadataWriter(clinicalSampleMetadataWriter).write(clinicalSampleAttributesMetadata); + new KeyValueMetadataWriter(clinicalSampleMetadataWriter).write(clinicalAttributesMetadata); } try (Writer clinicalSampleDataWriter = fileWriterFactory.newWriter("data_clinical_samples.txt")) { @@ -58,31 +69,31 @@ public void exportStudyData(FileWriterFactory fileWriterFactory, String studyId) List geneticProfiles = geneticProfileService.getGeneticProfiles(studyId); for (GeneticProfile geneticProfile : geneticProfiles) { - if ("MAF".equals(geneticProfile.getDatatype())) { - Iterator mafRecordIterator = mafRecordService.getMafRecords(geneticProfile.getStableId()); - if (mafRecordIterator.hasNext()) { - GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata( - geneticProfile.getStableId().replace(studyId + "_", ""), - //TODO Use mol. alteration type and datatype from the map above instead - geneticProfile.getGeneticAlterationType(), - geneticProfile.getDatatype(), - studyId, - "data_mutations.txt", - geneticProfile.getName(), - geneticProfile.getDescription(), - //TODO where to get gene panel from? - null, - geneticProfile.getShowProfileInAnalysisTab()); - try (Writer mafMetaWriter = fileWriterFactory.newWriter("meta_mutations.txt")) { - new KeyValueMetadataWriter(mafMetaWriter).write(genericProfileDatatypeMetadata); - } + if ("MAF".equals(geneticProfile.getDatatype())) { + CloseableIterator mafRecordIterator = mafRecordService.getMafRecords(geneticProfile.getStableId()); + if (mafRecordIterator.hasNext()) { + GenericProfileDatatypeMetadata genericProfileDatatypeMetadata = new GenericProfileDatatypeMetadata( + geneticProfile.getStableId().replace(studyId + "_", ""), + //TODO Use mol. alteration type and datatype from the map above instead + geneticProfile.getGeneticAlterationType(), + geneticProfile.getDatatype(), + studyId, + "data_mutations.txt", + geneticProfile.getName(), + geneticProfile.getDescription(), + //TODO where to get gene panel from? + null, + geneticProfile.getShowProfileInAnalysisTab()); + try (Writer mafMetaWriter = fileWriterFactory.newWriter("meta_mutations.txt")) { + new KeyValueMetadataWriter(mafMetaWriter).write(genericProfileDatatypeMetadata); + } - try (Writer mafDataWriter = fileWriterFactory.newWriter("data_mutations.txt")) { - MafRecordWriter mafRecordWriter = new MafRecordWriter(mafDataWriter); - mafRecordWriter.write(mafRecordIterator); - } - } - } + try (Writer mafDataWriter = fileWriterFactory.newWriter("data_mutations.txt")) { + MafRecordWriter mafRecordWriter = new MafRecordWriter(mafDataWriter); + mafRecordWriter.write(mafRecordIterator); + } + } + } } //TODO Move logic to newly created case list fetcher diff --git a/src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java similarity index 87% rename from src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java rename to src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java index fa4c4f08b12..469c5acddb5 100644 --- a/src/main/java/org/cbioportal/application/file/export/GeneticProfileService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java @@ -1,9 +1,8 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.services; import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; import org.cbioportal.application.file.model.GeneticProfile; -import java.util.Iterator; import java.util.List; public class GeneticProfileService { diff --git a/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java b/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java new file mode 100644 index 00000000000..1e35cd6d7a3 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java @@ -0,0 +1,19 @@ +package org.cbioportal.application.file.export.services; + +import org.cbioportal.application.file.export.mappers.MafRecordMapper; +import org.cbioportal.application.file.model.MafRecord; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.cbioportal.application.file.utils.CursorAdapter; + +public class MafRecordService { + + private final MafRecordMapper mafRecordMapper; + + public MafRecordService(MafRecordMapper mafRecordMapper) { + this.mafRecordMapper = mafRecordMapper; + } + + public CloseableIterator getMafRecords(String molecularProfileStableId) { + return new CursorAdapter<>(mafRecordMapper.getMafRecords(molecularProfileStableId)); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/ClinicalAttributeDataWriter.java similarity index 60% rename from src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java rename to src/main/java/org/cbioportal/application/file/export/writers/ClinicalAttributeDataWriter.java index 9a56eb8c537..1a54bc73ff2 100644 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalAttributeDataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/ClinicalAttributeDataWriter.java @@ -1,16 +1,14 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.writers; import com.google.common.collect.Iterables; import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.LongTable; +import org.cbioportal.application.file.utils.CloseableIterator; import java.io.IOException; import java.io.Writer; -import java.util.*; -import java.util.function.Function; +import java.util.SequencedMap; -import static org.cbioportal.application.file.export.TSVUtil.composeRow; -import static org.cbioportal.application.file.export.TSVUtil.composeRowOfOptionals; +import static org.cbioportal.application.file.utils.TSVUtil.composeRow; public class ClinicalAttributeDataWriter { @@ -27,22 +25,28 @@ public ClinicalAttributeDataWriter(Writer writer) { /** * Writes model pojo to the cBioPortal clinical attribute format */ - public void write(LongTable clinicalAttributeData) { - Iterable attributes = clinicalAttributeData.getColumns(); + public void write(CloseableIterator> clinicalAttributeData) { + if (!clinicalAttributeData.hasNext()) { + return; + } + SequencedMap row = clinicalAttributeData.next(); + Iterable attributes = row.keySet(); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDisplayName)); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDescription)); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getDatatype)); writeCommentsRow(Iterables.transform(attributes, ClinicalAttribute::getPriority)); - writeRow(Iterables.transform(attributes, (ClinicalAttribute attr) -> Optional.of(attr.getAttributeId()))); + writeRow(Iterables.transform(attributes, ClinicalAttribute::getAttributeId)); + + writeRow(row.values()); while (clinicalAttributeData.hasNext()) { - Function> row = clinicalAttributeData.next(); - writeRow(Iterables.transform(attributes, row::apply)); + row = clinicalAttributeData.next(); + writeRow(row.values()); } } - private void writeRow(Iterable> row) { + private void writeRow(Iterable row) { try { - writer.write(composeRowOfOptionals(row)); + writer.write(composeRow(row)); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java similarity index 83% rename from src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java rename to src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java index 09f9a66ac31..93f528845d1 100644 --- a/src/main/java/org/cbioportal/application/file/export/KeyValueMetadataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.writers; import org.cbioportal.application.file.model.CancerStudyMetadata; import org.cbioportal.application.file.model.CaseListMetadata; @@ -7,28 +7,22 @@ import java.io.IOException; import java.io.Writer; -import java.util.AbstractMap; import java.util.LinkedHashMap; import java.util.Map; import java.util.function.Function; import java.util.stream.Stream; +import static org.cbioportal.application.file.utils.MapUtils.entry; + /** * A serializer for file model records that serializes them the cBioPortal key-value metadata format. * e.g. meta_study.txt */ public class KeyValueMetadataWriter { - private final Writer writer; - - /** - * @param writer - the writer to write the key-value metadata to - * e.g. StringWriter, FileWriter - */ - public KeyValueMetadataWriter(Writer writer) { - this.writer = writer; - } - private static final LinkedHashMap> CANCER_STUDY_METADATA_MAPPING = new LinkedHashMap<>(); + private static final LinkedHashMap> GENETIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); + private static final LinkedHashMap> GENERIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); + private static final LinkedHashMap> CASE_LIST_METADATA_MAPPING = new LinkedHashMap<>(); static { CANCER_STUDY_METADATA_MAPPING.put("type_of_cancer", CancerStudyMetadata::getTypeOfCancer); @@ -44,89 +38,92 @@ public KeyValueMetadataWriter(Writer writer) { CANCER_STUDY_METADATA_MAPPING.put("reference_genome", CancerStudyMetadata::getReferenceGenome); } + static { + GENETIC_PROFILE_METADATA_MAPPING.put("cancer_study_identifier", GenericDatatypeMetadata::getCancerStudyIdentifier); + GENETIC_PROFILE_METADATA_MAPPING.put("genetic_alteration_type", GenericDatatypeMetadata::getGeneticAlterationType); + GENETIC_PROFILE_METADATA_MAPPING.put("datatype", GenericDatatypeMetadata::getDatatype); + GENETIC_PROFILE_METADATA_MAPPING.put("data_filename", GenericDatatypeMetadata::getDataFilename); + } + + static { + GENERIC_PROFILE_METADATA_MAPPING.put("stable_id", GenericProfileDatatypeMetadata::getStableId); + GENERIC_PROFILE_METADATA_MAPPING.put("show_profile_in_analysis_tab", genericProfileDatatypeMetadata -> genericProfileDatatypeMetadata.getShowProfileInAnalysisTab().toString().toLowerCase()); + GENERIC_PROFILE_METADATA_MAPPING.put("profile_name", GenericProfileDatatypeMetadata::getProfileName); + GENERIC_PROFILE_METADATA_MAPPING.put("profile_description", GenericProfileDatatypeMetadata::getProfileDescription); + GENERIC_PROFILE_METADATA_MAPPING.put("gene_panel", GenericProfileDatatypeMetadata::getGenePanel); + } + + static { + CASE_LIST_METADATA_MAPPING.put("cancer_study_identifier", CaseListMetadata::getCancerStudyIdentifier); + CASE_LIST_METADATA_MAPPING.put("stable_id", CaseListMetadata::getStableId); + CASE_LIST_METADATA_MAPPING.put("case_list_name", CaseListMetadata::getName); + CASE_LIST_METADATA_MAPPING.put("case_list_description", CaseListMetadata::getDescription); + CASE_LIST_METADATA_MAPPING.put("case_list_ids", caseListMetadata -> String.join("\t", caseListMetadata.getSampleIds())); + } + + private final Writer writer; + + /** + * @param writer - the writer to write the key-value metadata to + * e.g. StringWriter, FileWriter + */ + public KeyValueMetadataWriter(Writer writer) { + this.writer = writer; + } + + private static String composeKeyValueLine(String key, String value) { + return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; + } + /** * Write a cancer study metadata to the writer */ public void write(CancerStudyMetadata cancerStudyMetadata) { var keyValueStream = CANCER_STUDY_METADATA_MAPPING.entrySet().stream() - .map(entry -> entry(entry.getKey(), entry.getValue().apply(cancerStudyMetadata))); + .map(entry -> entry(entry.getKey(), entry.getValue().apply(cancerStudyMetadata))); write(keyValueStream); } - private static final LinkedHashMap> GENETIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); - static { - GENETIC_PROFILE_METADATA_MAPPING.put("cancer_study_identifier", GenericDatatypeMetadata::getCancerStudyIdentifier); - GENETIC_PROFILE_METADATA_MAPPING.put("genetic_alteration_type", GenericDatatypeMetadata::getGeneticAlterationType); - GENETIC_PROFILE_METADATA_MAPPING.put("datatype", GenericDatatypeMetadata::getDatatype); - GENETIC_PROFILE_METADATA_MAPPING.put("data_filename", GenericDatatypeMetadata::getDataFilename); - } /** * Write a generic datatype metadata to the writer */ public void write(GenericDatatypeMetadata genericDatatypeMetadata) { var keyValueStream = GENETIC_PROFILE_METADATA_MAPPING.entrySet().stream() - .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericDatatypeMetadata))); + .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericDatatypeMetadata))); write(keyValueStream); } - private static final LinkedHashMap> GENERIC_PROFILE_METADATA_MAPPING = new LinkedHashMap<>(); - static { - GENERIC_PROFILE_METADATA_MAPPING.put("stable_id", GenericProfileDatatypeMetadata::getStableId); - GENERIC_PROFILE_METADATA_MAPPING.put("show_profile_in_analysis_tab", genericProfileDatatypeMetadata -> genericProfileDatatypeMetadata.getShowProfileInAnalysisTab().toString().toLowerCase()); - GENERIC_PROFILE_METADATA_MAPPING.put("profile_name", GenericProfileDatatypeMetadata::getProfileName); - GENERIC_PROFILE_METADATA_MAPPING.put("profile_description", GenericProfileDatatypeMetadata::getProfileDescription); - GENERIC_PROFILE_METADATA_MAPPING.put("gene_panel", GenericProfileDatatypeMetadata::getGenePanel); - } /** * Write a generic profile datatype metadata to the writer */ public void write(GenericProfileDatatypeMetadata genericProfileDatatypeMetadata) { write((GenericDatatypeMetadata) genericProfileDatatypeMetadata); var keyValueStream = GENERIC_PROFILE_METADATA_MAPPING.entrySet().stream() - .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericProfileDatatypeMetadata))); + .map(entry -> entry(entry.getKey(), entry.getValue().apply(genericProfileDatatypeMetadata))); write(keyValueStream); } - private static final LinkedHashMap> CASE_LIST_METADATA_MAPPING = new LinkedHashMap<>(); - static { - CASE_LIST_METADATA_MAPPING.put("cancer_study_identifier", CaseListMetadata::getCancerStudyIdentifier); - CASE_LIST_METADATA_MAPPING.put("stable_id", CaseListMetadata::getStableId); - CASE_LIST_METADATA_MAPPING.put("case_list_name", CaseListMetadata::getName); - CASE_LIST_METADATA_MAPPING.put("case_list_description", CaseListMetadata::getDescription); - CASE_LIST_METADATA_MAPPING.put("case_list_ids", caseListMetadata -> String.join("\t", caseListMetadata.getSampleIds())); - } /** * Write a case list metadata to the writer + * * @param caseListMetadata */ public void write(CaseListMetadata caseListMetadata) { var keyValueStream = CASE_LIST_METADATA_MAPPING.entrySet().stream() - .map(entry -> entry(entry.getKey(), entry.getValue().apply(caseListMetadata))); + .map(entry -> entry(entry.getKey(), entry.getValue().apply(caseListMetadata))); write(keyValueStream); } private void write(Stream> metadata) { metadata - //skip values that are null - .filter(entry -> entry.getValue() != null) - .forEach(entry -> { - try { - writer.write(composeKeyValueLine(entry.getKey(), entry.getValue())); - } catch (IOException e) { - throw new RuntimeException(e); - } - }); - } - - private static String composeKeyValueLine(String key, String value) { - return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; - } - - /** - * Create a key-value entry that allows null values - * Map.entry does not allow null values - */ - private static Map.Entry entry(K key, V value) { - return new AbstractMap.SimpleEntry<>(key, value); + //skip values that are null + .filter(entry -> entry.getValue() != null) + .forEach(entry -> { + try { + writer.write(composeKeyValueLine(entry.getKey(), entry.getValue())); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); } } diff --git a/src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/MafRecordWriter.java similarity index 96% rename from src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java rename to src/main/java/org/cbioportal/application/file/export/writers/MafRecordWriter.java index 97ed0275b78..1f086379f9e 100644 --- a/src/main/java/org/cbioportal/application/file/export/MafRecordWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/MafRecordWriter.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.export.writers; import org.cbioportal.application.file.model.MafRecord; @@ -8,15 +8,14 @@ import java.util.LinkedHashMap; import java.util.function.Function; -import static org.cbioportal.application.file.export.TSVUtil.composeRow; +import static org.cbioportal.application.file.utils.TSVUtil.composeRow; /** * Writes MAF records to a writer */ public class MafRecordWriter { - private final Writer writer; - private static final LinkedHashMap> MAF_ROW = new LinkedHashMap<>(); + static { MAF_ROW.put("Hugo_Symbol", MafRecord::getHugoSymbol); MAF_ROW.put("Entrez_Gene_Id", MafRecord::getEntrezGeneId); @@ -57,6 +56,8 @@ public class MafRecordWriter { MAF_ROW.put("n_ref_count", (mafRecord -> mafRecord.getnRefCount() == null ? null : mafRecord.getnRefCount().toString())); } + private final Writer writer; + public MafRecordWriter(Writer writer) { this.writer = writer; } diff --git a/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java index 97a0ad09576..93d88ea2bf6 100644 --- a/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/CancerStudyMetadata.java @@ -3,7 +3,7 @@ /** * Represents metadata for a cancer study. */ -public class CancerStudyMetadata { +public class CancerStudyMetadata implements StudyRelatedMetadata { /** * The cancer type abbreviation, e.g., "brca". This should be the same cancer type as specified in the meta_cancer_type.txt file, if available. The type can be "mixed" for studies with multiple cancer types. */ diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java index 426ec596ee4..ba4ab6ad248 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttribute.java @@ -1,25 +1,23 @@ package org.cbioportal.application.file.model; public class ClinicalAttribute { - private String displayName; - private String description; - private String datatype; - private String priority; - private String attributeId; - public static final ClinicalAttribute PATIENT_ID = new ClinicalAttribute( "Patient Identifier", "Patient Identifier", "STRING", "1", "PATIENT_ID"); - public static final ClinicalAttribute SAMPLE_ID = new ClinicalAttribute( "Sample Identifier", "Sample Identifier", "STRING", "1", "SAMPLE_ID"); + private String displayName; + private String description; + private String datatype; + private String priority; + private String attributeId; public ClinicalAttribute() { } @@ -71,4 +69,15 @@ public String getAttributeId() { public void setAttributeId(String attributeId) { this.attributeId = attributeId; } + + @Override + public String toString() { + return "ClinicalAttribute{" + + "displayName='" + displayName + '\'' + + ", description='" + description + '\'' + + ", datatype='" + datatype + '\'' + + ", priority='" + priority + '\'' + + ", attributeId='" + attributeId + '\'' + + '}'; + } } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesMetadata.java similarity index 52% rename from src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java rename to src/main/java/org/cbioportal/application/file/model/ClinicalAttributesMetadata.java index 8af4fbdd078..f2a69b3ee1e 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributesMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesMetadata.java @@ -1,14 +1,20 @@ package org.cbioportal.application.file.model; -public class ClinicalSampleAttributesMetadata implements GenericDatatypeMetadata { +public class ClinicalAttributesMetadata implements GenericDatatypeMetadata { private String cancerStudyIdentifier; private String dataFilename; - public ClinicalSampleAttributesMetadata() { + private String geneticAlterationType; + + private String datatype; + + public ClinicalAttributesMetadata() { } - public ClinicalSampleAttributesMetadata(String cancerStudyIdentifier, String dataFilename) { + public ClinicalAttributesMetadata(String cancerStudyIdentifier, String geneticAlterationType, String datatype, String dataFilename) { this.cancerStudyIdentifier = cancerStudyIdentifier; + this.geneticAlterationType = geneticAlterationType; + this.datatype = datatype; this.dataFilename = dataFilename; } @@ -31,12 +37,19 @@ public void setDataFilename(String dataFilename) { @Override public String getGeneticAlterationType() { - return "CLINICAL"; + return this.geneticAlterationType; + } + + public void setGeneticAlterationType(String geneticAlterationType) { + this.geneticAlterationType = geneticAlterationType; } @Override public String getDatatype() { - return "SAMPLE_ATTRIBUTES"; + return this.datatype; } + public void setDatatype(String datatype) { + this.datatype = datatype; + } } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java similarity index 95% rename from src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java rename to src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java index 3f630ed98f5..2e38546dc56 100644 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalPatientAttributeValue.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.model; public class ClinicalPatientAttributeValue { private String patientId; diff --git a/src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java similarity index 96% rename from src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java rename to src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java index 7fab9e0efb0..b7e18f23440 100644 --- a/src/main/java/org/cbioportal/application/file/export/ClinicalSampleAttributeValue.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.model; public class ClinicalSampleAttributeValue { private String patientId; diff --git a/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java index 17b0b7255ef..9236df03d52 100644 --- a/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/GenericDatatypeMetadata.java @@ -2,6 +2,8 @@ public interface GenericDatatypeMetadata extends StudyRelatedMetadata { String getGeneticAlterationType(); + String getDatatype(); + String getDataFilename(); } diff --git a/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java index 3927bf78e09..b4a11253c6e 100644 --- a/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/GenericProfileDatatypeMetadata.java @@ -1,7 +1,5 @@ package org.cbioportal.application.file.model; -import java.util.Optional; - public class GenericProfileDatatypeMetadata implements GenericDatatypeMetadata { private String stableId; private String geneticAlterationType; diff --git a/src/main/java/org/cbioportal/application/file/model/LongTable.java b/src/main/java/org/cbioportal/application/file/model/LongTable.java deleted file mode 100644 index f7def67e5f7..00000000000 --- a/src/main/java/org/cbioportal/application/file/model/LongTable.java +++ /dev/null @@ -1,47 +0,0 @@ -package org.cbioportal.application.file.model; - -import java.io.Closeable; -import java.io.IOException; -import java.util.Iterator; -import java.util.Optional; -import java.util.function.Function; - -/** - * Generic memory efficient representation of a long table with columns and rows. - * The long here means the table has much more rows than columns. The number of columns is fixed. - * The class implements an iterator (single pass) over rows, where each row is a function from column to optional value. - * It also provides an iterable (multiple passes) over columns. - * @param - column type - * @param - row type - */ -public class LongTable implements Iterator>>, Closeable { - - private final Iterable columns; - private final Iterator>> rows; - - public LongTable(Iterable columns, Iterator>> rows) { - this.rows = rows; - this.columns = columns; - } - - public Iterable getColumns() { - return columns; - } - - @Override - public boolean hasNext() { - return rows.hasNext(); - } - - @Override - public Function> next() { - return rows.next(); - } - - @Override - public void close() throws IOException { - if (rows instanceof Closeable) { - ((Closeable) rows).close(); - } - } -} diff --git a/src/main/java/org/cbioportal/application/file/model/MafRecord.java b/src/main/java/org/cbioportal/application/file/model/MafRecord.java index 7d30fd3c8a6..eeed694dd39 100644 --- a/src/main/java/org/cbioportal/application/file/model/MafRecord.java +++ b/src/main/java/org/cbioportal/application/file/model/MafRecord.java @@ -3,7 +3,6 @@ /** * Represents a record in a Mutation Annotation Format (MAF) file. */ -//TODO Do we really need this intermediate class? public class MafRecord { /** * A HUGO gene symbol. diff --git a/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java new file mode 100644 index 00000000000..c81c3947167 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java @@ -0,0 +1,7 @@ +package org.cbioportal.application.file.utils; + +import java.io.Closeable; +import java.util.Iterator; + +public interface CloseableIterator extends Closeable, Iterator { +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/utils/CursorAdapter.java b/src/main/java/org/cbioportal/application/file/utils/CursorAdapter.java new file mode 100644 index 00000000000..ffaf0d951d5 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/utils/CursorAdapter.java @@ -0,0 +1,37 @@ +package org.cbioportal.application.file.utils; + +import org.apache.ibatis.cursor.Cursor; + +import java.io.IOException; +import java.util.Iterator; + +public class CursorAdapter implements CloseableIterator { + private final Cursor cursor; + private Iterator iterator; + + public CursorAdapter(Cursor cursor) { + this.cursor = cursor; + } + + @Override + public void close() throws IOException { + cursor.close(); + } + + @Override + public boolean hasNext() { + return getIterator().hasNext(); + } + + @Override + public T next() { + return getIterator().next(); + } + + private Iterator getIterator() { + if (iterator == null) { + iterator = cursor.iterator(); + } + return iterator; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java similarity index 75% rename from src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java rename to src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java index d2b16e3de58..d769d425da2 100644 --- a/src/main/java/org/cbioportal/application/file/export/FileWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.utils; import java.io.IOException; import java.io.Writer; diff --git a/src/main/java/org/cbioportal/application/file/utils/MapUtils.java b/src/main/java/org/cbioportal/application/file/utils/MapUtils.java new file mode 100644 index 00000000000..9b816aa1f93 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/utils/MapUtils.java @@ -0,0 +1,14 @@ +package org.cbioportal.application.file.utils; + +import java.util.AbstractMap; +import java.util.Map; + +public class MapUtils { + /** + * Create a key-value entry that allows null values + * Map.entry does not allow null values + */ + public static Map.Entry entry(K key, V value) { + return new AbstractMap.SimpleEntry<>(key, value); + } +} diff --git a/src/main/java/org/cbioportal/application/file/utils/TSVUtil.java b/src/main/java/org/cbioportal/application/file/utils/TSVUtil.java new file mode 100644 index 00000000000..4b42f175a10 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/utils/TSVUtil.java @@ -0,0 +1,13 @@ +package org.cbioportal.application.file.utils; + +import java.util.stream.Collectors; +import java.util.stream.StreamSupport; + +public class TSVUtil { + public static final String TAB = "\t"; + + public static String composeRow(Iterable row) { + return StreamSupport.stream(row.spliterator(), false) + .map(s -> s == null ? "" : s.replace(TAB, "\\t")).collect(Collectors.joining(TAB)) + "\n"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java similarity index 96% rename from src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java rename to src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java index 76d21074aaa..42ce54489df 100644 --- a/src/main/java/org/cbioportal/application/file/export/ZipOutputStreamWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java @@ -1,4 +1,4 @@ -package org.cbioportal.application.file.export; +package org.cbioportal.application.file.utils; import java.io.Closeable; import java.io.IOException; diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index 4c1e71c2888..b66e1b90ecc 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -14,7 +14,7 @@ WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND cam.PATIENT_ATTRIBUTE=false SELECT @@ -11,7 +8,19 @@ cam.PRIORITY as priority FROM clinical_attribute_meta cam JOIN cancer_study cs ON cs.CANCER_STUDY_ID = cam.CANCER_STUDY_ID - WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND cam.PATIENT_ATTRIBUTE=false + WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND cam.PATIENT_ATTRIBUTE=false AND cam.ATTR_ID NOT IN ( + "MUTATION_COUNT", "FRACTION_GENOME_ALTERED" + ) + + @@ -39,15 +50,24 @@ JOIN cancer_study cs ON cs.CANCER_STUDY_ID = cam.CANCER_STUDY_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND cam.PATIENT_ATTRIBUTE=true + + resultType="org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata"> SELECT + cs.CANCER_STUDY_IDENTIFIER AS cancerStudyIdentifier, gp.STABLE_ID AS stableId, - gp.NAME AS name, - gp.DESCRIPTION AS description, + gp.NAME AS profileName, + gp.DESCRIPTION AS profileDescription, gp.GENETIC_ALTERATION_TYPE AS geneticAlterationType, - gp.GENERIC_ASSAY_TYPE AS genericAssayType, gp.DATATYPE AS datatype, + gp.GENERIC_ASSAY_TYPE AS genericAssayType, gp.SHOW_PROFILE_IN_ANALYSIS_TAB AS showProfileInAnalysisTab, gp.PIVOT_THRESHOLD AS pivotThreshold, gp.SORT_ORDER AS sortOrder, gp.PATIENT_LEVEL AS patientLevel FROM genetic_profile gp JOIN cancer_study cs ON gp.CANCER_STUDY_ID = cs.CANCER_STUDY_ID - WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} + WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND gp.GENETIC_ALTERATION_TYPE = #{geneticAlterationType} AND gp.DATATYPE = #{datatype} \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java deleted file mode 100644 index cde2be0e609..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataServiceTests.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.apache.ibatis.cursor.Cursor; -import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; -import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; -import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; -import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; -import org.cbioportal.application.file.utils.CloseableIterator; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.List; -import java.util.SequencedMap; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -public class ClinicalAttributeDataServiceTests { - - ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(new ClinicalAttributeDataMapper() { - @Override - public List getClinicalSampleAttributes(String studyId) { - return List.of( - new ClinicalAttribute("test number sample displayName", "test number sample description", "NUMBER", "2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID"), - new ClinicalAttribute("test string sample displayName", "test string sample description", "STRING", "3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID")); - } - - @Override - public Cursor getClinicalSampleAttributeValues(String studyId) { - return new TestFakeCursor<>( - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "A"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "1"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "2"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_2", "TEST_SAMPLE_ID_3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "B")); - } - - @Override - public List getClinicalPatientAttributes(String studyId) { - return List.of( - new ClinicalAttribute("test number patient displayName", "test number patient description", "NUMBER", "4", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID"), - new ClinicalAttribute("test string patient displayName", "test string patient description", "STRING", "5", "TEST_STRING_PATIENT_ATTRIBUTE_ID")); - } - - @Override - public Cursor getClinicalPatientAttributeValues(String studyId) { - return new TestFakeCursor<>( - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID", "3"), - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_2", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "D")); - } - }); - - @Test - public void testGetClinicalSampleAttributeData() { - CloseableIterator> result = clinicalDataAttributeDataService.getClinicalSampleAttributeData("testStudyId"); - assertTrue(result.hasNext()); - SequencedMap row1 = result.next(); - List clinicalAttributes = new ArrayList<>(row1.keySet()); - assertEquals(4, clinicalAttributes.size()); - assertEquals(ClinicalAttribute.PATIENT_ID, clinicalAttributes.get(0)); - assertEquals(ClinicalAttribute.SAMPLE_ID, clinicalAttributes.get(1)); - ClinicalAttribute testNumberAttribute = clinicalAttributes.get(2); - assertEquals("TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", testNumberAttribute.getAttributeId()); - ClinicalAttribute testStringAttribute = clinicalAttributes.get(3); - assertEquals("TEST_STRING_SAMPLE_ATTRIBUTE_ID", testStringAttribute.getAttributeId()); - - assertTrue(result.hasNext()); - SequencedMap row2 = result.next(); - assertTrue(result.hasNext()); - SequencedMap row3 = result.next(); - - assertEquals("TEST_PATIENT_ID_1", row1.get(ClinicalAttribute.PATIENT_ID)); - assertEquals("TEST_SAMPLE_ID_1", row1.get(ClinicalAttribute.SAMPLE_ID)); - assertEquals("1", row1.get(testNumberAttribute)); - assertEquals("A", row1.get(testStringAttribute)); - assertEquals("TEST_PATIENT_ID_1", row2.get(ClinicalAttribute.PATIENT_ID)); - assertEquals("TEST_SAMPLE_ID_2", row2.get(ClinicalAttribute.SAMPLE_ID)); - assertEquals("2", row2.get(testNumberAttribute)); - assertNull(row2.get(testStringAttribute)); - assertEquals("TEST_PATIENT_ID_2", row3.get(ClinicalAttribute.PATIENT_ID)); - assertEquals("TEST_SAMPLE_ID_3", row3.get(ClinicalAttribute.SAMPLE_ID)); - assertNull(row3.get(testNumberAttribute)); - assertEquals("B", row3.get(testStringAttribute)); - } - - @Test - public void testGetClinicalPatientAttributeData() { - CloseableIterator> result = clinicalDataAttributeDataService.getClinicalPatientAttributeData("testStudyId"); - - assertTrue(result.hasNext()); - SequencedMap row1 = result.next(); - List clinicalAttributes = new ArrayList<>(row1.keySet()); - assertEquals(3, clinicalAttributes.size()); - assertEquals(ClinicalAttribute.PATIENT_ID, clinicalAttributes.get(0)); - ClinicalAttribute testNumberAttribute = clinicalAttributes.get(1); - assertEquals("TEST_NUMBER_PATIENT_ATTRIBUTE_ID", testNumberAttribute.getAttributeId()); - ClinicalAttribute testStringAttribute = clinicalAttributes.get(2); - assertEquals("TEST_STRING_PATIENT_ATTRIBUTE_ID", testStringAttribute.getAttributeId()); - - assertTrue(result.hasNext()); - SequencedMap row2 = result.next(); - assertEquals("TEST_PATIENT_ID_1", row1.get(ClinicalAttribute.PATIENT_ID)); - assertEquals("3", row1.get(testNumberAttribute)); - assertEquals("C", row1.get(testStringAttribute)); - assertEquals("TEST_PATIENT_ID_2", row2.get(ClinicalAttribute.PATIENT_ID)); - assertNull(row2.get(testNumberAttribute)); - assertEquals("D", row2.get(testStringAttribute)); - } -} diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java new file mode 100644 index 00000000000..61122954a8d --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java @@ -0,0 +1,117 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.ClinicalPatientAttributesDataTypeExporter; +import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; +import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.junit.Test; + +import java.util.List; +import java.util.Set; + +import static org.junit.Assert.assertEquals; + +public class ClinicalAttributeDataTypeExporterTests { + + + @Test + public void testGetClinicalSampleAttributeData() { + var factory = new InMemoryFileWriterFactory(); + + new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_clinical_sample_attributes.txt", "data_clinical_sample_attributes.txt"), fileContents.keySet()); + + assertEquals( + "cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: CLINICAL\n" + + "datatype: SAMPLE_ATTRIBUTES\n" + + "data_filename: data_clinical_sample_attributes.txt\n", + fileContents.get("meta_clinical_sample_attributes.txt").toString()); + + assertEquals( + "#Patient Identifier\tSample Identifier\ttest number sample displayName\ttest string sample displayName\n" + + "#Patient Identifier\tSample Identifier\ttest number sample description\ttest string sample description\n" + + "#STRING\tSTRING\tNUMBER\tSTRING\n" + + "#1\t1\t2\t3\n" + + "PATIENT_ID\tSAMPLE_ID\tTEST_NUMBER_SAMPLE_ATTRIBUTE_ID\tTEST_STRING_SAMPLE_ATTRIBUTE_ID\n" + + "TEST_PATIENT_ID_1\tTEST_SAMPLE_ID_1\t1\tA\n" + + "TEST_PATIENT_ID_1\tTEST_SAMPLE_ID_2\t2\t\n" + + "TEST_PATIENT_ID_2\tTEST_SAMPLE_ID_3\t\tB\n", + fileContents.get("data_clinical_sample_attributes.txt").toString()); + } + + @Test + public void testGetClinicalPatientAttributeData() { + var factory = new InMemoryFileWriterFactory(); + + new ClinicalPatientAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_clinical_patient_attributes.txt", "data_clinical_patient_attributes.txt"), fileContents.keySet()); + + assertEquals( + "cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: CLINICAL\n" + + "datatype: PATIENT_ATTRIBUTES\n" + + "data_filename: data_clinical_patient_attributes.txt\n", + fileContents.get("meta_clinical_patient_attributes.txt").toString()); + + assertEquals( + "#Patient Identifier\ttest string patient displayName\ttest number patient displayName\n" + + "#Patient Identifier\ttest string patient description\ttest number patient description\n" + + "#STRING\tSTRING\tNUMBER\n" + + "#1\t5\t4\n" + + "PATIENT_ID\tTEST_STRING_PATIENT_ATTRIBUTE_ID\tTEST_NUMBER_PATIENT_ATTRIBUTE_ID\n" + + "TEST_PATIENT_ID_1\tC\t3\n" + + "TEST_PATIENT_ID_2\tD\t\n", + fileContents.get("data_clinical_patient_attributes.txt").toString()); + } + + ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(null) { + @Override + public boolean hasClinicalSampleAttributes(String studyId) { + return true; + } + + @Override + public List getClinicalSampleAttributes(String studyId) { + return List.of( + new ClinicalAttribute("test number sample displayName", "test number sample description", "NUMBER", "2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID"), + new ClinicalAttribute("test string sample displayName", "test string sample description", "STRING", "3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID")); + } + + public boolean hasClinicalPatientAttributes(String studyId) { + return true; + } + + @Override + public CloseableIterator getClinicalSampleAttributeValues(String studyId) { + return new SimpleCloseableIterator<>( + List.of( + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "A"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "1"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "2"), + new ClinicalSampleAttributeValue("TEST_PATIENT_ID_2", "TEST_SAMPLE_ID_3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "B"))); + } + + @Override + public List getClinicalPatientAttributes(String studyId) { + return List.of( + new ClinicalAttribute("test string patient displayName", "test string patient description", "STRING", "5", "TEST_STRING_PATIENT_ATTRIBUTE_ID"), + new ClinicalAttribute("test number patient displayName", "test number patient description", "NUMBER", "4", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID")); + } + + @Override + public CloseableIterator getClinicalPatientAttributeValues(String studyId) { + return new SimpleCloseableIterator<>(List.of( + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID", "3"), + new ClinicalPatientAttributeValue("TEST_PATIENT_ID_2", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "D"))); + } + }; +} diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeExporterTest.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeExporterTest.java deleted file mode 100644 index b968e8fff86..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeExporterTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.cbioportal.application.file.export.writers.ClinicalAttributeDataWriter; -import org.cbioportal.application.file.model.ClinicalAttribute; -import org.junit.Test; - -import java.io.StringWriter; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.SequencedMap; - -import static org.junit.Assert.assertEquals; - -public class ClinicalAttributeExporterTest { - - StringWriter output = new StringWriter(); - ClinicalAttributeDataWriter writer = new ClinicalAttributeDataWriter(output); - - @Test - public void testClinicalAttributeDataWriter() { - ClinicalAttribute clinicalAttribute = new ClinicalAttribute("attr1 name", "attr1 description", "NUMBER", "3", "ATTR1"); - SequencedMap row1 = new LinkedHashMap<>(); - row1.put(ClinicalAttribute.PATIENT_ID, "PATIENT1"); - row1.put(ClinicalAttribute.SAMPLE_ID, "SAMPLE1"); - row1.put(clinicalAttribute, "1.1"); - SequencedMap row2 = new LinkedHashMap<>(); - row2.put(ClinicalAttribute.PATIENT_ID, "PATIENT2"); - row2.put(ClinicalAttribute.SAMPLE_ID, "SAMPLE2"); - row2.put(clinicalAttribute, "2.2"); - - writer.write(new SimpleCloseableIterator<>(List.of(row1, row2))); - - assertEquals(""" - #Patient Identifier\tSample Identifier\tattr1 name - #Patient Identifier\tSample Identifier\tattr1 description - #STRING\tSTRING\tNUMBER - #1\t1\t3 - PATIENT_ID\tSAMPLE_ID\tATTR1 - PATIENT1\tSAMPLE1\t1.1 - PATIENT2\tSAMPLE2\t2.2 - """, output.toString()); - } - - @Test - public void testEscapeTabs() { - ClinicalAttribute clinicalAttribute = new ClinicalAttribute("attr1\tname", "attr1\tdescription", "STRING", "1", "ATTR1"); - - SequencedMap row1 = new LinkedHashMap<>(); - row1.put(ClinicalAttribute.PATIENT_ID, "PATIENT1"); - row1.put(clinicalAttribute, "A\tB"); - - writer.write(new SimpleCloseableIterator<>(List.of(row1))); - - assertEquals(""" - #Patient Identifier\tattr1\\tname - #Patient Identifier\tattr1\\tdescription - #STRING\tSTRING - #1\t1 - PATIENT_ID\tATTR1 - PATIENT1\tA\\tB - """, output.toString()); - } -} diff --git a/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java new file mode 100644 index 00000000000..d8c6a9a3288 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java @@ -0,0 +1,28 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.utils.FileWriterFactory; + +import java.io.IOException; +import java.io.StringWriter; +import java.io.Writer; +import java.util.LinkedHashMap; + +/** + * A factory for creating in-memory file writers. + * This is used for testing purposes to capture the output of file writers. + */ +public class InMemoryFileWriterFactory implements FileWriterFactory { + + private final LinkedHashMap fileContents = new LinkedHashMap<>(); + + @Override + public Writer newWriter(String name) throws IOException { + StringWriter stringWriter = new StringWriter(); + fileContents.put(name, stringWriter); + return stringWriter; + } + + public LinkedHashMap getFileContents() { + return fileContents; + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/KeyValueMetadataWriterTests.java b/src/test/java/org/cbioportal/application/file/export/KeyValueMetadataWriterTests.java new file mode 100644 index 00000000000..d197f4aac4d --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/KeyValueMetadataWriterTests.java @@ -0,0 +1,67 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; +import org.junit.Test; + +import java.io.StringWriter; +import java.util.LinkedHashMap; + +import static org.junit.Assert.assertEquals; + +public class KeyValueMetadataWriterTests { + + @Test + public void testEmptyMetadata() { + StringWriter output = new StringWriter(); + LinkedHashMap metadata = new LinkedHashMap<>(); + + new KeyValueMetadataWriter(output).write(metadata); + + assertEquals("", output.toString()); + } + + @Test + public void testNullMetadataValues() { + StringWriter output = new StringWriter(); + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("key1", null); + + new KeyValueMetadataWriter(output).write(metadata); + + assertEquals("", output.toString()); + } + + @Test + public void testBlankMetadataValues() { + StringWriter output = new StringWriter(); + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("key1", ""); + + new KeyValueMetadataWriter(output).write(metadata); + + assertEquals("key1: \n", output.toString()); + } + + @Test + public void testEscapeNewlineInMetadataValue() { + StringWriter output = new StringWriter(); + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("key1", "\n"); + + new KeyValueMetadataWriter(output).write(metadata); + + assertEquals("key1: \\n\n", output.toString()); + } + + @Test + public void testMultipleKeys() { + StringWriter output = new StringWriter(); + LinkedHashMap metadata = new LinkedHashMap<>(); + metadata.put("key1", "key #1"); + metadata.put("key2", "key #2"); + + new KeyValueMetadataWriter(output).write(metadata); + + assertEquals("key1: key #1\nkey2: key #2\n", output.toString()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java new file mode 100644 index 00000000000..4e75a88947b --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java @@ -0,0 +1,121 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.export.services.MafRecordService; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.MafRecord; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.junit.Test; + +import java.util.List; +import java.util.Set; + +import static java.util.Collections.emptyList; +import static org.junit.Assert.assertEquals; + +public class MafDataTypeExporterTest { + GeneticProfileService geneticProfileService = new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata genProf = new GeneticProfileDatatypeMetadata(); + genProf.setCancerStudyIdentifier(studyId); + genProf.setStableId("MAF_STABLE_ID"); + genProf.setGeneticAlterationType("MUTATION_EXTENDED"); + genProf.setDatatype("MAF"); + return List.of(genProf); + } + }; + + @Test + public void testMafDataTypeExport() { + var factory = new InMemoryFileWriterFactory(); + + MafRecordService mafRecordService = new MafRecordService(null) { + @Override + public CloseableIterator getMafRecords(String molecularProfileStableId) { + MafRecord mafRecord = new MafRecord(); + mafRecord.setHugoSymbol("HUGO"); + mafRecord.setEntrezGeneId("12345"); + mafRecord.setCenter("center1"); + mafRecord.setNcbiBuild("hg38"); + mafRecord.setChromosome("X"); + mafRecord.setStartPosition(1000000L); + mafRecord.setEndPosition(1000100L); + mafRecord.setStrand("+"); + mafRecord.setVariantClassification("Missense_Mutation"); + mafRecord.setVariantType("SNP"); + mafRecord.setReferenceAllele("T"); + mafRecord.setTumorSeqAllele1("C"); + mafRecord.setTumorSeqAllele2("A"); + mafRecord.setDbSnpRs("DBSNPRS123"); + mafRecord.setDbSnpValStatus("byFrequency"); + mafRecord.setTumorSampleBarcode("SAMPLE_1"); + mafRecord.setMatchedNormSampleBarcode("SAMPLE_2"); + mafRecord.setMatchNormSeqAllele1("A"); + mafRecord.setMatchNormSeqAllele2("T"); + mafRecord.setTumorValidationAllele1("C"); + mafRecord.setTumorValidationAllele2("G"); + mafRecord.setMatchNormValidationAllele1("A"); + mafRecord.setMatchNormValidationAllele2("T"); + mafRecord.setVerificationStatus("Verified"); + mafRecord.setValidationStatus("Somatic"); + mafRecord.setMutationStatus("Somatic"); + mafRecord.setSequencingPhase("Phase1"); + mafRecord.setSequenceSource("Exome"); + mafRecord.setValidationMethod("Sanger"); + mafRecord.setScore("1.1"); + mafRecord.setBamFile("bam_file"); + mafRecord.setSequencer("Illumina hiseq 2000"); + mafRecord.setHgvspShort("SHRT"); + mafRecord.settAltCount(55); + mafRecord.settRefCount(33); + mafRecord.setnAltCount(100); + mafRecord.setnRefCount(99); + + return new SimpleCloseableIterator<>(List.of(mafRecord)); + } + }; + + MafDataTypeExporter mafDataTypeExporter = new MafDataTypeExporter(geneticProfileService, mafRecordService); + + mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_mutation_extended_maf_maf_stable_id.txt", "data_mutation_extended_maf_maf_stable_id.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: MUTATION_EXTENDED\n" + + "datatype: MAF\n" + + "stable_id: MAF_STABLE_ID\n" + + "data_filename: data_mutation_extended_maf_maf_stable_id.txt\n", fileContents.get("meta_mutation_extended_maf_maf_stable_id.txt").toString()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count + HUGO\t12345\tcenter1\thg38\tX\t1000000\t1000100\t+\tMissense_Mutation\tSNP\tT\tC\tA\tDBSNPRS123\tbyFrequency\tSAMPLE_1\tSAMPLE_2\tA\tT\tC\tG\tA\tT\tVerified\tSomatic\tSomatic\tPhase1\tExome\tSanger\t1.1\tbam_file\tIllumina hiseq 2000\tSHRT\t55\t33\t100\t99 + """, fileContents.get("data_mutation_extended_maf_maf_stable_id.txt").toString()); + } + + @Test + public void testMafDataTypeExportNoRows() { + var factory = new InMemoryFileWriterFactory(); + + MafRecordService mafRecordService = new MafRecordService(null) { + @Override + public CloseableIterator getMafRecords(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(emptyList()); + } + }; + + MafDataTypeExporter mafDataTypeExporter = new MafDataTypeExporter(geneticProfileService, mafRecordService); + + mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_mutation_extended_maf_maf_stable_id.txt", "data_mutation_extended_maf_maf_stable_id.txt"), fileContents.keySet()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count + """, fileContents.get("data_mutation_extended_maf_maf_stable_id.txt").toString()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java b/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java deleted file mode 100644 index 773c7827c82..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/MafRecordWriterTest.java +++ /dev/null @@ -1,77 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.cbioportal.application.file.export.writers.MafRecordWriter; -import org.cbioportal.application.file.model.MafRecord; -import org.junit.Test; - -import java.io.StringWriter; -import java.util.List; - -import static org.junit.Assert.assertEquals; - -public class MafRecordWriterTest { - - StringWriter output = new StringWriter(); - MafRecordWriter writer = new MafRecordWriter(output); - - @Test - public void testMafRecordWriter() { - writer.write(List.of( - new MafRecord( - "HUGO", - "12345", - "center1", - "hg38", - "X", - 1000000L, - 1000100L, - "+", - "Missense_Mutation", - "SNP", - "T", - "C", - "A", - "DBSNPRS123", - "byFrequency", - "SAMPLE_1", - "SAMPLE_2", - "A", - "T", - "C", - "G", - "A", - "T", - "Verified", - "Somatic", - "Somatic", - "Phase1", - "Exome", - "Sanger", - "1.1", - "bam_file", - "Illumina hiseq 2000", - "SHRT", - 55, - 33, - 100, - 99 - ) - ).iterator()); - - assertEquals(""" - Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count - HUGO\t12345\tcenter1\thg38\tX\t1000000\t1000100\t+\tMissense_Mutation\tSNP\tT\tC\tA\tDBSNPRS123\tbyFrequency\tSAMPLE_1\tSAMPLE_2\tA\tT\tC\tG\tA\tT\tVerified\tSomatic\tSomatic\tPhase1\tExome\tSanger\t1.1\tbam_file\tIllumina hiseq 2000\tSHRT\t55\t33\t100\t99 - """, output.toString()); - } - - @Test - public void testEmptyMafRecords() { - List emptyMafRecords = List.of(); - writer.write(emptyMafRecords.iterator()); - - assertEquals(""" - Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count - """, output.toString()); - } - -} diff --git a/src/test/java/org/cbioportal/application/file/export/MetadataExporterTest.java b/src/test/java/org/cbioportal/application/file/export/MetadataExporterTest.java deleted file mode 100644 index d6f786beca6..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/MetadataExporterTest.java +++ /dev/null @@ -1,143 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; -import org.cbioportal.application.file.model.CancerStudyMetadata; -import org.cbioportal.application.file.model.ClinicalAttributesMetadata; -import org.cbioportal.application.file.model.GenericProfileDatatypeMetadata; -import org.junit.Test; - -import java.io.StringWriter; - -import static org.junit.Assert.assertEquals; - -public class MetadataExporterTest { - - StringWriter output = new StringWriter(); - KeyValueMetadataWriter writer = new KeyValueMetadataWriter(output); - - @Test - public void testCancerStudyMetadataWriter() { - writer.write(new CancerStudyMetadata( - "toc", - "study_id1", - "study name", - "study description", - "Citation", - "1234", - "GROUP1;GROUP2", - true, - "hg38")); - - assertEquals(""" - type_of_cancer: toc - cancer_study_identifier: study_id1 - name: study name - description: study description - citation: Citation - pmid: 1234 - groups: GROUP1;GROUP2 - add_global_case_list: true - reference_genome: hg38 - """, output.toString()); - } - - @Test - public void testNulls() { - writer.write(new CancerStudyMetadata( - null, - null, - null, - null, - null, - null, - null, - null, - null - )); - - assertEquals("", output.toString()); - } - - @Test - public void testBlanks() { - writer.write(new CancerStudyMetadata( - "", - "", - "", - "", - "", - "", - "", - null, //Boolean - "" - )); - - assertEquals("type_of_cancer: \ncancer_study_identifier: \nname: \ndescription: \ncitation: \npmid: \ngroups: \nreference_genome: \n", output.toString()); - } - - @Test - public void testEscapeNewLines() { - writer.write(new CancerStudyMetadata( - "toc1", - "cancer_study_identifier1", - "This is a\nmultiline\nname", - "This is a\nmultiline\ndescription", - null, - null, - null, - null, - null - )); - - assertEquals(""" - type_of_cancer: toc1 - cancer_study_identifier: cancer_study_identifier1 - name: This is a\\nmultiline\\nname - description: This is a\\nmultiline\\ndescription - """, output.toString()); - } - - @Test - public void testClinicalSampleAttributesMetadataWriter() { - writer.write(new ClinicalAttributesMetadata( - "study_id1", - "CLINICAL", - "SAMPLE_ATTRIBUTES", - "data_file.txt" - )); - - assertEquals(""" - cancer_study_identifier: study_id1 - genetic_alteration_type: CLINICAL - datatype: SAMPLE_ATTRIBUTES - data_filename: data_file.txt - """, output.toString()); - } - - @Test - public void testMutationMetadataWriter() { - writer.write(new GenericProfileDatatypeMetadata( - "mutations", - "MUTATION_EXTENDED", - "MAF", - "study_id1", - "data_file.txt", - "profile name", - "profile description", - "gene_panel", - true - )); - - assertEquals(""" - cancer_study_identifier: study_id1 - genetic_alteration_type: MUTATION_EXTENDED - datatype: MAF - data_filename: data_file.txt - stable_id: mutations - show_profile_in_analysis_tab: true - profile_name: profile name - profile_description: profile description - gene_panel: gene_panel - """, output.toString()); - } -} diff --git a/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java b/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java deleted file mode 100644 index 2b192971442..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/TSVUtilTest.java +++ /dev/null @@ -1,20 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.cbioportal.application.file.utils.TSVUtil; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertEquals; - -public class TSVUtilTest { - @Test - public void testComposeRow() { - List row = new ArrayList(); - row.add("a"); - row.add(null); - row.add("c"); - assertEquals("a\t\tc\n", TSVUtil.composeRow(row)); - } -} diff --git a/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java b/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java deleted file mode 100644 index 14e5edab30c..00000000000 --- a/src/test/java/org/cbioportal/application/file/export/TestFakeCursor.java +++ /dev/null @@ -1,43 +0,0 @@ -package org.cbioportal.application.file.export; - -import org.apache.ibatis.cursor.Cursor; - -import java.util.Arrays; -import java.util.Iterator; - -public class TestFakeCursor implements Cursor { - private final Iterator iterator; - private boolean closed = false; - - public TestFakeCursor(T... ts) { - this.iterator = Arrays.stream(ts).iterator(); - } - - @Override - public Iterator iterator() { - if (closed) { - throw new IllegalStateException("Cursor is already closed."); - } - return iterator; - } - - @Override - public void close() { - closed = true; - } - - @Override - public boolean isOpen() { - return !closed; - } - - @Override - public boolean isConsumed() { - return !iterator.hasNext(); - } - - @Override - public int getCurrentIndex() { - return 0; - } -} \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java new file mode 100644 index 00000000000..411b9ca7901 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java @@ -0,0 +1,141 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.ClinicalAttributesMetadata; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.junit.Test; + +import java.util.LinkedHashMap; + +import static org.junit.Assert.assertEquals; + +public class ToMetadataKeyValuesTest { + + @Test + public void testCancerStudyMetadataMetadata() { + var cancerStudyMetadata = new CancerStudyMetadata(); + cancerStudyMetadata.setCancerStudyIdentifier("study_id1"); + cancerStudyMetadata.setName("study name"); + cancerStudyMetadata.setAddGlobalCaseList(true); + cancerStudyMetadata.setDescription("study description"); + cancerStudyMetadata.setCitation("Citation"); + cancerStudyMetadata.setPmid("1234"); + cancerStudyMetadata.setGroups("GROUP1;GROUP2"); + cancerStudyMetadata.setReferenceGenome("hg38"); + cancerStudyMetadata.setTypeOfCancer("toc"); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", "study_id1"); + expectedMetadata.put("type_of_cancer", "toc"); + expectedMetadata.put("name", "study name"); + expectedMetadata.put("description", "study description"); + expectedMetadata.put("citation", "Citation"); + expectedMetadata.put("pmid", "1234"); + expectedMetadata.put("groups", "GROUP1;GROUP2"); + expectedMetadata.put("add_global_case_list", "true"); + expectedMetadata.put("reference_genome", "hg38"); + assertEquals(expectedMetadata, cancerStudyMetadata.toMetadataKeyValues()); + } + + /** + * Test for the CancerStudyMetadata class when all fields are null. + * nulls are still included in the metadata map for specific metadata keys. + */ + @Test + public void testCancerStudyMetadataMetadataNulls() { + var cancerStudyMetadata = new CancerStudyMetadata(); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", null); + expectedMetadata.put("type_of_cancer", null); + expectedMetadata.put("name", null); + expectedMetadata.put("description", null); + expectedMetadata.put("citation", null); + expectedMetadata.put("pmid", null); + expectedMetadata.put("groups", null); + expectedMetadata.put("add_global_case_list", null); + expectedMetadata.put("reference_genome", null); + assertEquals(expectedMetadata, cancerStudyMetadata.toMetadataKeyValues()); + } + + @Test + public void testClinicalAttributesMetadata() { + var clinicalAttributesMetadata = new ClinicalAttributesMetadata(); + clinicalAttributesMetadata.setCancerStudyIdentifier("study_id1"); + clinicalAttributesMetadata.setGeneticAlterationType("CLINICAL"); + clinicalAttributesMetadata.setDatatype("SAMPLE_ATTRIBUTES"); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", "study_id1"); + expectedMetadata.put("genetic_alteration_type", "CLINICAL"); + expectedMetadata.put("datatype", "SAMPLE_ATTRIBUTES"); + + assertEquals(expectedMetadata, clinicalAttributesMetadata.toMetadataKeyValues()); + } + + @Test + public void testClinicalAttributesMetadataNulls() { + var clinicalAttributesMetadata = new ClinicalAttributesMetadata(); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", null); + expectedMetadata.put("genetic_alteration_type", null); + expectedMetadata.put("datatype", null); + + assertEquals(expectedMetadata, clinicalAttributesMetadata.toMetadataKeyValues()); + } + + @Test + public void testGeneticProfileDatatypeMetadata() { + var geneticProfileMetadata = new GeneticProfileDatatypeMetadata(); + geneticProfileMetadata.setGeneticAlterationType("MUTATION_EXTENDED"); + geneticProfileMetadata.setDatatype("MAF"); + geneticProfileMetadata.setStableId("mutations"); + geneticProfileMetadata.setShowProfileInAnalysisTab(true); + geneticProfileMetadata.setProfileName("profile name"); + geneticProfileMetadata.setProfileDescription("profile description"); + geneticProfileMetadata.setGenePanel("gene_panel"); + geneticProfileMetadata.setPivotThreshold(1.5f); + geneticProfileMetadata.setPatientLevel(false); + geneticProfileMetadata.setGenericAssayType("genericAssayType"); + geneticProfileMetadata.setCancerStudyIdentifier("study_id1"); + geneticProfileMetadata.setSortOrder("ASC"); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", "study_id1"); + expectedMetadata.put("genetic_alteration_type", "MUTATION_EXTENDED"); + expectedMetadata.put("datatype", "MAF"); + expectedMetadata.put("stable_id", "mutations"); + expectedMetadata.put("show_profile_in_analysis_tab", "true"); + expectedMetadata.put("profile_name", "profile name"); + expectedMetadata.put("profile_description", "profile description"); + expectedMetadata.put("gene_panel", "gene_panel"); + expectedMetadata.put("pivot_threshold_value", "1.5"); + expectedMetadata.put("value_sort_order", "ASC"); + expectedMetadata.put("patient_level", "false"); + expectedMetadata.put("generic_assay_type", "genericAssayType"); + + assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); + } + + @Test + public void testGeneticProfileDatatypeMetadataNulls() { + var geneticProfileMetadata = new GeneticProfileDatatypeMetadata(); + + var expectedMetadata = new LinkedHashMap(); + expectedMetadata.put("cancer_study_identifier", null); + expectedMetadata.put("genetic_alteration_type", null); + expectedMetadata.put("datatype", null); + expectedMetadata.put("stable_id", null); + expectedMetadata.put("show_profile_in_analysis_tab", null); + expectedMetadata.put("profile_name", null); + expectedMetadata.put("profile_description", null); + expectedMetadata.put("gene_panel", null); + expectedMetadata.put("pivot_threshold_value", null); + expectedMetadata.put("value_sort_order", null); + expectedMetadata.put("patient_level", null); + expectedMetadata.put("generic_assay_type", null); + + assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/ToRowTests.java b/src/test/java/org/cbioportal/application/file/export/ToRowTests.java new file mode 100644 index 00000000000..5042cf01190 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ToRowTests.java @@ -0,0 +1,16 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.model.MafRecord; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; + +public class ToRowTests { + @Test + public void testMafRowToRow() { + var mafRecord = new MafRecord(); + assertNotNull(mafRecord.toRow()); + assertEquals(37, mafRecord.toRow().size()); + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/TsvDataWriterTest.java b/src/test/java/org/cbioportal/application/file/export/TsvDataWriterTest.java new file mode 100644 index 00000000000..341d3c144af --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/TsvDataWriterTest.java @@ -0,0 +1,33 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.writers.TsvDataWriter; +import org.junit.Test; + +import java.io.StringWriter; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.SequencedMap; + +import static org.junit.Assert.assertEquals; + +public class TsvDataWriterTest { + @Test + public void testComposeRow() { + StringWriter output = new StringWriter(); + + SequencedMap row1 = new LinkedHashMap<>(); + row1.put("1", "a"); + row1.put("2", null); + row1.put("3", "c"); + SequencedMap row2 = new LinkedHashMap<>(); + row2.put("1", "\t"); + row2.put("2", "d"); + row2.put("3", ""); + + var rows = List.of(row1, row2).iterator(); + + new TsvDataWriter(output).write(rows); + + assertEquals("a\t\tc\n\\t\td\t\n", output.toString()); + } +} From 643f14cf6e1ac1ad1984d5dd34c840875d074115 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 09:04:18 +0200 Subject: [PATCH 13/69] Make test to pass --- .../application/file/export/ExportConfig.java | 1 + .../export/CancerStudyMetadataMapper.xml | 3 +- .../export/ClinicalAttributeDataMapper.xml | 140 +- .../case_lists/cases_all.txt | 5 + .../case_lists/cases_cna.txt | 5 + .../case_lists/cases_cnaseq.txt | 5 + .../case_lists/cases_custom.txt | 5 + .../case_lists/cases_sequenced.txt | 2 +- .../case_lists/cases_testprofiled.txt | 5 + .../data_clinical_patient_attributes.txt | 846 +++++++++++ ...xt => data_clinical_sample_attributes.txt} | 1287 +++++++++++------ ... data_mutation_extended_maf_mutations.txt} | 54 +- .../meta_clinical_patient_attributes.txt | 4 + ...xt => meta_clinical_sample_attributes.txt} | 2 +- ... meta_mutation_extended_maf_mutations.txt} | 3 +- .../study_es_0_import_export/meta_study.txt | 3 +- 16 files changed, 1812 insertions(+), 558 deletions(-) create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_all.txt create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_cna.txt create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_cnaseq.txt create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_custom.txt create mode 100644 test/test_data/study_es_0_import_export/case_lists/cases_testprofiled.txt create mode 100644 test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt rename test/test_data/study_es_0_import_export/{data_clinical_samples.txt => data_clinical_sample_attributes.txt} (67%) rename test/test_data/study_es_0_import_export/{data_mutations.txt => data_mutation_extended_maf_mutations.txt} (98%) create mode 100644 test/test_data/study_es_0_import_export/meta_clinical_patient_attributes.txt rename test/test_data/study_es_0_import_export/{meta_clinical_samples.txt => meta_clinical_sample_attributes.txt} (68%) rename test/test_data/study_es_0_import_export/{meta_mutations.txt => meta_mutation_extended_maf_mutations.txt} (76%) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 261aeeef7ec..ab6bd0ac77f 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -30,6 +30,7 @@ //Have Table(inherits closable iterator of sequence map) interface that explains what it promises. Ensure it in the code? //Ensure flow of data is ordered correctly (patient id, sample id, etc) //Make export request return 404 if no study found +//catch exceptions in the exporters and return them as README.ERRORS.txt @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") diff --git a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml index 31c6c18dba7..a84b47cf2e5 100644 --- a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml +++ b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml @@ -11,8 +11,7 @@ cs.CITATION AS citation, cs.PMID AS pmid, cs.`GROUPS` AS `groups`, - rg.NAME AS referenceGenome, - 0 AS addGlobalCaseList + rg.NAME AS referenceGenome FROM cancer_study cs JOIN reference_genome rg ON rg.REFERENCE_GENOME_ID = cs.REFERENCE_GENOME_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index 8a18d5b21ee..24b4fbb2395 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -1,75 +1,127 @@ + + + + + 'MUTATION_COUNT', 'FRACTION_GENOME_ALTERED' + + + + + 'SAMPLE_COUNT' + \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_all.txt b/test/test_data/study_es_0_import_export/case_lists/cases_all.txt new file mode 100644 index 00000000000..3f6cb0b00e7 --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_all.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_all +case_list_name: All cases in study +case_list_description: All cases in study +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SF-01 TCGA-A1-A0SG-01 TCGA-A1-A0SH-01 TCGA-A1-A0SI-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SN-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A1-A0SQ-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0CY-01 TCGA-A2-A0CZ-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A2-A1FV-01 TCGA-A2-A1FW-01 TCGA-A2-A1FX-01 TCGA-A2-A1FZ-01 TCGA-A2-A1G0-01 TCGA-A2-A1G1-01 TCGA-A2-A1G4-01 TCGA-A2-A1G6-01 TCGA-A2-A259-01 TCGA-A2-A25A-01 TCGA-A2-A25B-01 TCGA-A2-A25C-01 TCGA-A2-A25D-01 TCGA-A2-A25E-01 TCGA-A2-A25F-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A0DC-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A7-A13G-01 TCGA-A7-A26E-01 TCGA-A7-A26F-01 TCGA-A7-A26G-01 TCGA-A7-A26H-01 TCGA-A7-A26I-01 TCGA-A7-A26J-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07C-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09K-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0G0-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XP-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12C-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AO-A1KO-01 TCGA-AO-A1KP-01 TCGA-AO-A1KQ-01 TCGA-AO-A1KR-01 TCGA-AO-A1KS-01 TCGA-AO-A1KT-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AQ-A0Y5-01 TCGA-AQ-A1H2-01 TCGA-AQ-A1H3-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TU-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AT-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-AR-A24H-01 TCGA-AR-A24K-01 TCGA-AR-A24L-01 TCGA-AR-A24M-01 TCGA-AR-A24N-01 TCGA-AR-A24O-01 TCGA-AR-A24P-01 TCGA-AR-A24Q-01 TCGA-AR-A24R-01 TCGA-AR-A24S-01 TCGA-AR-A24T-01 TCGA-AR-A24U-01 TCGA-AR-A24V-01 TCGA-AR-A24W-01 TCGA-AR-A24X-01 TCGA-AR-A24Z-01 TCGA-AR-A250-01 TCGA-AR-A251-01 TCGA-AR-A252-01 TCGA-AR-A254-01 TCGA-AR-A255-01 TCGA-AR-A256-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I6-01 TCGA-B6-A0I8-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IG-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-B6-A1KC-01 TCGA-B6-A1KF-01 TCGA-B6-A1KI-01 TCGA-B6-A1KN-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B1-01 TCGA-BH-A0B2-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B8-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DV-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HF-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HL-01 TCGA-BH-A0HN-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HQ-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0HY-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EN-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1EX-01 TCGA-BH-A1EY-01 TCGA-BH-A1F0-01 TCGA-BH-A1F2-01 TCGA-BH-A1F5-01 TCGA-BH-A1F6-01 TCGA-BH-A1F8-01 TCGA-BH-A1FB-01 TCGA-BH-A1FC-01 TCGA-BH-A1FD-01 TCGA-BH-A1FE-01 TCGA-BH-A1FG-01 TCGA-BH-A1FH-01 TCGA-BH-A1FJ-01 TCGA-BH-A1FL-01 TCGA-BH-A1FM-01 TCGA-BH-A1FN-01 TCGA-BH-A1FR-01 TCGA-BH-A1FU-01 TCGA-BH-A201-01 TCGA-BH-A202-01 TCGA-BH-A203-01 TCGA-BH-A204-01 TCGA-BH-A208-01 TCGA-BH-A209-01 TCGA-BH-A28Q-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12O-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HE-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HJ-01 TCGA-C8-A1HK-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-C8-A1HO-01 TCGA-C8-A26V-01 TCGA-C8-A26W-01 TCGA-C8-A26X-01 TCGA-C8-A26Y-01 TCGA-C8-A26Z-01 TCGA-C8-A273-01 TCGA-C8-A274-01 TCGA-C8-A275-01 TCGA-C8-A278-01 TCGA-C8-A27A-01 TCGA-C8-A27B-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A140-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-D8-A1J8-01 TCGA-D8-A1J9-01 TCGA-D8-A1JA-01 TCGA-D8-A1JB-01 TCGA-D8-A1JC-01 TCGA-D8-A1JD-01 TCGA-D8-A1JE-01 TCGA-D8-A1JF-01 TCGA-D8-A1JG-01 TCGA-D8-A1JH-01 TCGA-D8-A1JI-01 TCGA-D8-A1JJ-01 TCGA-D8-A1JK-01 TCGA-D8-A1JL-01 TCGA-D8-A1JM-01 TCGA-D8-A1JN-01 TCGA-D8-A1JP-01 TCGA-D8-A1JS-01 TCGA-D8-A1JT-01 TCGA-D8-A1JU-01 TCGA-D8-A1X5-01 TCGA-D8-A1X6-01 TCGA-D8-A1X7-01 TCGA-D8-A1X8-01 TCGA-D8-A1X9-01 TCGA-D8-A1XA-01 TCGA-D8-A1XB-01 TCGA-D8-A1XC-01 TCGA-D8-A1XD-01 TCGA-D8-A1XF-01 TCGA-D8-A1XG-01 TCGA-D8-A1XJ-01 TCGA-D8-A1XK-01 TCGA-D8-A1XL-01 TCGA-D8-A1XM-01 TCGA-D8-A1XO-01 TCGA-D8-A1XQ-01 TCGA-D8-A1XR-01 TCGA-D8-A1XS-01 TCGA-D8-A1XT-01 TCGA-D8-A1XU-01 TCGA-D8-A1XV-01 TCGA-D8-A1XW-01 TCGA-D8-A1XY-01 TCGA-D8-A1XZ-01 TCGA-D8-A1Y0-01 TCGA-D8-A1Y1-01 TCGA-D8-A1Y2-01 TCGA-D8-A1Y3-01 TCGA-D8-A27E-01 TCGA-D8-A27F-01 TCGA-D8-A27G-01 TCGA-D8-A27H-01 TCGA-D8-A27I-01 TCGA-D8-A27K-01 TCGA-D8-A27L-01 TCGA-D8-A27M-01 TCGA-D8-A27N-01 TCGA-D8-A27P-01 TCGA-D8-A27R-01 TCGA-D8-A27T-01 TCGA-D8-A27V-01 TCGA-D8-A27W-01 TCGA-E2-A105-01 TCGA-E2-A106-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14T-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15A-01 TCGA-E2-A15C-01 TCGA-E2-A15D-01 TCGA-E2-A15E-01 TCGA-E2-A15E-06 TCGA-E2-A15F-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15K-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A15S-01 TCGA-E2-A15T-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 TCGA-E2-A1IE-01 TCGA-E2-A1IF-01 TCGA-E2-A1IG-01 TCGA-E2-A1IH-01 TCGA-E2-A1II-01 TCGA-E2-A1IJ-01 TCGA-E2-A1IK-01 TCGA-E2-A1IL-01 TCGA-E2-A1IN-01 TCGA-E2-A1IO-01 TCGA-E2-A1IP-01 TCGA-E2-A1IU-01 TCGA-E2-A1L6-01 TCGA-E2-A1L7-01 TCGA-E2-A1L8-01 TCGA-E2-A1L9-01 TCGA-E2-A1LA-01 TCGA-E2-A1LB-01 TCGA-E2-A1LG-01 TCGA-E2-A1LH-01 TCGA-E2-A1LI-01 TCGA-E2-A1LK-01 TCGA-E2-A1LL-01 TCGA-E2-A1LS-01 TCGA-E9-A1N3-01 TCGA-E9-A1N4-01 TCGA-E9-A1N5-01 TCGA-E9-A1N6-01 TCGA-E9-A1N8-01 TCGA-E9-A1N9-01 TCGA-E9-A1NA-01 TCGA-E9-A1NC-01 TCGA-E9-A1ND-01 TCGA-E9-A1NE-01 TCGA-E9-A1NF-01 TCGA-E9-A1NG-01 TCGA-E9-A1NH-01 TCGA-E9-A1NI-01 TCGA-E9-A1QZ-01 TCGA-E9-A1R0-01 TCGA-E9-A1R2-01 TCGA-E9-A1R3-01 TCGA-E9-A1R4-01 TCGA-E9-A1R5-01 TCGA-E9-A1R6-01 TCGA-E9-A1R7-01 TCGA-E9-A1RA-01 TCGA-E9-A1RB-01 TCGA-E9-A1RC-01 TCGA-E9-A1RD-01 TCGA-E9-A1RE-01 TCGA-E9-A1RF-01 TCGA-E9-A1RG-01 TCGA-E9-A1RH-01 TCGA-E9-A1RI-01 TCGA-E9-A226-01 TCGA-E9-A227-01 TCGA-E9-A228-01 TCGA-E9-A229-01 TCGA-E9-A22A-01 TCGA-E9-A22B-01 TCGA-E9-A22D-01 TCGA-E9-A22E-01 TCGA-E9-A22G-01 TCGA-E9-A22H-01 TCGA-E9-A243-01 TCGA-E9-A244-01 TCGA-E9-A245-01 TCGA-E9-A247-01 TCGA-E9-A248-01 TCGA-E9-A249-01 TCGA-E9-A24A-01 TCGA-E9-A295-01 TCGA-EW-A1IW-01 TCGA-EW-A1IX-01 TCGA-EW-A1IY-01 TCGA-EW-A1IZ-01 TCGA-EW-A1J1-01 TCGA-EW-A1J2-01 TCGA-EW-A1J3-01 TCGA-EW-A1J5-01 TCGA-EW-A1J6-01 TCGA-EW-A1OV-01 TCGA-EW-A1OW-01 TCGA-EW-A1OX-01 TCGA-EW-A1OY-01 TCGA-EW-A1OZ-01 TCGA-EW-A1P0-01 TCGA-EW-A1P1-01 TCGA-EW-A1P3-01 TCGA-EW-A1P4-01 TCGA-EW-A1P5-01 TCGA-EW-A1P6-01 TCGA-EW-A1P7-01 TCGA-EW-A1P8-01 TCGA-EW-A1PA-01 TCGA-EW-A1PB-01 TCGA-EW-A1PD-01 TCGA-EW-A1PE-01 TCGA-EW-A1PF-01 TCGA-EW-A1PG-01 TCGA-EW-A1PH-01 TCGA-EW-A2FS-01 TCGA-EW-A2FV-01 TCGA-EW-A2FW-01 TCGA-GI-A2C8-01 TCGA-GM-A2D9-01 TCGA-GM-A2DA-01 TCGA-GM-A2DB-01 TCGA-GM-A2DC-01 TCGA-GM-A2DD-01 TCGA-GM-A2DF-01 TCGA-GM-A2DH-01 TCGA-GM-A2DI-01 TCGA-GM-A2DK-01 TCGA-GM-A2DL-01 TCGA-GM-A2DM-01 TCGA-GM-A2DN-01 TCGA-GM-A2DO-01 TEST-A23C-01 TEST-A23E-01 TEST-A23H-01 TEST-A2B8-01 TEST-A2FB-01 TEST-A2FF-01 TEST-A2FG-01 TEST_SAMPLE_1 TEST_SAMPLE_10 TEST_SAMPLE_11 TEST_SAMPLE_12 TEST_SAMPLE_13 TEST_SAMPLE_14 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_5 TEST_SAMPLE_6 TEST_SAMPLE_7 TEST_SAMPLE_8 TEST_SAMPLE_9 TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_SAMPLE_SOMATIC_HOMOZYGOUS TEST_SAMPLE_SOMATIC_UNDEFINED diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_cna.txt b/test/test_data/study_es_0_import_export/case_lists/cases_cna.txt new file mode 100644 index 00000000000..442ef86c921 --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_cna.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_cna +case_list_name: Samples profiled for mutations +case_list_description: This is this case list that contains all samples that are profiled for mutations. +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SF-01 TCGA-A1-A0SG-01 TCGA-A1-A0SH-01 TCGA-A1-A0SI-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SN-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A1-A0SQ-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A2-A1FV-01 TCGA-A2-A1FW-01 TCGA-A2-A1FX-01 TCGA-A2-A1FZ-01 TCGA-A2-A1G0-01 TCGA-A2-A1G1-01 TCGA-A2-A1G4-01 TCGA-A2-A1G6-01 TCGA-A2-A259-01 TCGA-A2-A25A-01 TCGA-A2-A25B-01 TCGA-A2-A25C-01 TCGA-A2-A25D-01 TCGA-A2-A25E-01 TCGA-A2-A25F-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A7-A13G-01 TCGA-A7-A26E-01 TCGA-A7-A26F-01 TCGA-A7-A26G-01 TCGA-A7-A26H-01 TCGA-A7-A26I-01 TCGA-A7-A26J-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AO-A1KO-01 TCGA-AO-A1KP-01 TCGA-AO-A1KQ-01 TCGA-AO-A1KR-01 TCGA-AO-A1KS-01 TCGA-AO-A1KT-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AQ-A0Y5-01 TCGA-AQ-A1H2-01 TCGA-AQ-A1H3-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-AR-A24H-01 TCGA-AR-A24K-01 TCGA-AR-A24L-01 TCGA-AR-A24M-01 TCGA-AR-A24N-01 TCGA-AR-A24O-01 TCGA-AR-A24P-01 TCGA-AR-A24Q-01 TCGA-AR-A24R-01 TCGA-AR-A24S-01 TCGA-AR-A24T-01 TCGA-AR-A24U-01 TCGA-AR-A24V-01 TCGA-AR-A24W-01 TCGA-AR-A24X-01 TCGA-AR-A24Z-01 TCGA-AR-A250-01 TCGA-AR-A251-01 TCGA-AR-A252-01 TCGA-AR-A254-01 TCGA-AR-A255-01 TCGA-AR-A256-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-B6-A1KC-01 TCGA-B6-A1KF-01 TCGA-B6-A1KI-01 TCGA-B6-A1KN-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DV-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EN-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1EX-01 TCGA-BH-A1EY-01 TCGA-BH-A1F0-01 TCGA-BH-A1F2-01 TCGA-BH-A1F5-01 TCGA-BH-A1F6-01 TCGA-BH-A1F8-01 TCGA-BH-A1FB-01 TCGA-BH-A1FC-01 TCGA-BH-A1FD-01 TCGA-BH-A1FE-01 TCGA-BH-A1FG-01 TCGA-BH-A1FH-01 TCGA-BH-A1FJ-01 TCGA-BH-A1FL-01 TCGA-BH-A1FM-01 TCGA-BH-A1FN-01 TCGA-BH-A1FR-01 TCGA-BH-A1FU-01 TCGA-BH-A201-01 TCGA-BH-A202-01 TCGA-BH-A203-01 TCGA-BH-A204-01 TCGA-BH-A208-01 TCGA-BH-A209-01 TCGA-BH-A28Q-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HE-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HJ-01 TCGA-C8-A1HK-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-C8-A1HO-01 TCGA-C8-A26V-01 TCGA-C8-A26W-01 TCGA-C8-A26X-01 TCGA-C8-A26Y-01 TCGA-C8-A26Z-01 TCGA-C8-A273-01 TCGA-C8-A274-01 TCGA-C8-A275-01 TCGA-C8-A278-01 TCGA-C8-A27A-01 TCGA-C8-A27B-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-D8-A1J8-01 TCGA-D8-A1J9-01 TCGA-D8-A1JA-01 TCGA-D8-A1JB-01 TCGA-D8-A1JC-01 TCGA-D8-A1JD-01 TCGA-D8-A1JE-01 TCGA-D8-A1JF-01 TCGA-D8-A1JG-01 TCGA-D8-A1JH-01 TCGA-D8-A1JI-01 TCGA-D8-A1JJ-01 TCGA-D8-A1JK-01 TCGA-D8-A1JL-01 TCGA-D8-A1JM-01 TCGA-D8-A1JN-01 TCGA-D8-A1JP-01 TCGA-D8-A1JS-01 TCGA-D8-A1JT-01 TCGA-D8-A1JU-01 TCGA-D8-A1X5-01 TCGA-D8-A1X6-01 TCGA-D8-A1X7-01 TCGA-D8-A1X8-01 TCGA-D8-A1X9-01 TCGA-D8-A1XA-01 TCGA-D8-A1XB-01 TCGA-D8-A1XC-01 TCGA-D8-A1XD-01 TCGA-D8-A1XF-01 TCGA-D8-A1XG-01 TCGA-D8-A1XJ-01 TCGA-D8-A1XK-01 TCGA-D8-A1XL-01 TCGA-D8-A1XM-01 TCGA-D8-A1XO-01 TCGA-D8-A1XQ-01 TCGA-D8-A1XR-01 TCGA-D8-A1XS-01 TCGA-D8-A1XT-01 TCGA-D8-A1XU-01 TCGA-D8-A1XV-01 TCGA-D8-A1XW-01 TCGA-D8-A1XY-01 TCGA-D8-A1XZ-01 TCGA-D8-A1Y0-01 TCGA-D8-A1Y1-01 TCGA-D8-A1Y2-01 TCGA-D8-A1Y3-01 TCGA-D8-A27E-01 TCGA-D8-A27F-01 TCGA-D8-A27G-01 TCGA-D8-A27H-01 TCGA-D8-A27I-01 TCGA-D8-A27K-01 TCGA-D8-A27L-01 TCGA-D8-A27M-01 TCGA-D8-A27N-01 TCGA-D8-A27P-01 TCGA-D8-A27R-01 TCGA-D8-A27T-01 TCGA-D8-A27V-01 TCGA-D8-A27W-01 TCGA-E2-A105-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15C-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 TCGA-E2-A1IE-01 TCGA-E2-A1IF-01 TCGA-E2-A1IG-01 TCGA-E2-A1IH-01 TCGA-E2-A1II-01 TCGA-E2-A1IJ-01 TCGA-E2-A1IK-01 TCGA-E2-A1IL-01 TCGA-E2-A1IN-01 TCGA-E2-A1IO-01 TCGA-E2-A1IU-01 TCGA-E2-A1L6-01 TCGA-E2-A1L7-01 TCGA-E2-A1L8-01 TCGA-E2-A1L9-01 TCGA-E2-A1LA-01 TCGA-E2-A1LB-01 TCGA-E2-A1LG-01 TCGA-E2-A1LH-01 TCGA-E2-A1LI-01 TCGA-E2-A1LK-01 TCGA-E2-A1LL-01 TCGA-E9-A1N3-01 TCGA-E9-A1N4-01 TCGA-E9-A1N5-01 TCGA-E9-A1N6-01 TCGA-E9-A1N8-01 TCGA-E9-A1N9-01 TCGA-E9-A1NA-01 TCGA-E9-A1NC-01 TCGA-E9-A1ND-01 TCGA-E9-A1NE-01 TCGA-E9-A1NF-01 TCGA-E9-A1NG-01 TCGA-E9-A1NH-01 TCGA-E9-A1NI-01 TCGA-E9-A1QZ-01 TCGA-E9-A1R0-01 TCGA-E9-A1R2-01 TCGA-E9-A1R3-01 TCGA-E9-A1R4-01 TCGA-E9-A1R5-01 TCGA-E9-A1R6-01 TCGA-E9-A1R7-01 TCGA-E9-A1RA-01 TCGA-E9-A1RB-01 TCGA-E9-A1RC-01 TCGA-E9-A1RD-01 TCGA-E9-A1RE-01 TCGA-E9-A1RF-01 TCGA-E9-A1RG-01 TCGA-E9-A1RH-01 TCGA-E9-A1RI-01 TCGA-E9-A226-01 TCGA-E9-A227-01 TCGA-E9-A228-01 TCGA-E9-A229-01 TCGA-E9-A22A-01 TCGA-E9-A22B-01 TCGA-E9-A22D-01 TCGA-E9-A22E-01 TCGA-E9-A22G-01 TCGA-E9-A22H-01 TCGA-E9-A243-01 TCGA-E9-A244-01 TCGA-E9-A245-01 TCGA-E9-A247-01 TCGA-E9-A248-01 TCGA-E9-A249-01 TCGA-E9-A24A-01 TCGA-E9-A295-01 TCGA-EW-A1IW-01 TCGA-EW-A1IX-01 TCGA-EW-A1IY-01 TCGA-EW-A1IZ-01 TCGA-EW-A1J1-01 TCGA-EW-A1J2-01 TCGA-EW-A1J3-01 TCGA-EW-A1J5-01 TCGA-EW-A1J6-01 TCGA-EW-A1OV-01 TCGA-EW-A1OW-01 TCGA-EW-A1OX-01 TCGA-EW-A1OY-01 TCGA-EW-A1OZ-01 TCGA-EW-A1P0-01 TCGA-EW-A1P1-01 TCGA-EW-A1P3-01 TCGA-EW-A1P4-01 TCGA-EW-A1P5-01 TCGA-EW-A1P6-01 TCGA-EW-A1P7-01 TCGA-EW-A1P8-01 TCGA-EW-A1PA-01 TCGA-EW-A1PB-01 TCGA-EW-A1PD-01 TCGA-EW-A1PE-01 TCGA-EW-A1PF-01 TCGA-EW-A1PG-01 TCGA-EW-A1PH-01 TCGA-EW-A2FS-01 TCGA-EW-A2FV-01 TCGA-EW-A2FW-01 TCGA-GI-A2C8-01 TEST-A23C-01 TEST-A23E-01 TEST-A23H-01 TEST-A2B8-01 TEST-A2FB-01 TEST-A2FF-01 TEST-A2FG-01 TEST_SAMPLE_1 TEST_SAMPLE_12 TEST_SAMPLE_13 TEST_SAMPLE_14 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_7 TEST_SAMPLE_8 diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_cnaseq.txt b/test/test_data/study_es_0_import_export/case_lists/cases_cnaseq.txt new file mode 100644 index 00000000000..735ee0e9cb3 --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_cnaseq.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_cnaseq +case_list_name: Samples profiled for mutations and CNA +case_list_description: This is this case list that contains all samples that are profiled for mutations and CNA. +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SF-01 TCGA-A1-A0SG-01 TCGA-A1-A0SH-01 TCGA-A1-A0SI-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SN-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A1-A0SQ-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A2-A1FV-01 TCGA-A2-A1FW-01 TCGA-A2-A1FX-01 TCGA-A2-A1FZ-01 TCGA-A2-A1G0-01 TCGA-A2-A1G1-01 TCGA-A2-A1G4-01 TCGA-A2-A1G6-01 TCGA-A2-A259-01 TCGA-A2-A25A-01 TCGA-A2-A25B-01 TCGA-A2-A25C-01 TCGA-A2-A25D-01 TCGA-A2-A25E-01 TCGA-A2-A25F-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A7-A13G-01 TCGA-A7-A26E-01 TCGA-A7-A26F-01 TCGA-A7-A26G-01 TCGA-A7-A26H-01 TCGA-A7-A26I-01 TCGA-A7-A26J-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AO-A1KO-01 TCGA-AO-A1KP-01 TCGA-AO-A1KQ-01 TCGA-AO-A1KR-01 TCGA-AO-A1KS-01 TCGA-AO-A1KT-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AQ-A0Y5-01 TCGA-AQ-A1H2-01 TCGA-AQ-A1H3-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-AR-A24H-01 TCGA-AR-A24K-01 TCGA-AR-A24L-01 TCGA-AR-A24M-01 TCGA-AR-A24N-01 TCGA-AR-A24O-01 TCGA-AR-A24P-01 TCGA-AR-A24Q-01 TCGA-AR-A24R-01 TCGA-AR-A24S-01 TCGA-AR-A24T-01 TCGA-AR-A24U-01 TCGA-AR-A24V-01 TCGA-AR-A24W-01 TCGA-AR-A24X-01 TCGA-AR-A24Z-01 TCGA-AR-A250-01 TCGA-AR-A251-01 TCGA-AR-A252-01 TCGA-AR-A254-01 TCGA-AR-A255-01 TCGA-AR-A256-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I6-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-B6-A1KC-01 TCGA-B6-A1KF-01 TCGA-B6-A1KI-01 TCGA-B6-A1KN-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DV-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HL-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EN-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1EX-01 TCGA-BH-A1EY-01 TCGA-BH-A1F0-01 TCGA-BH-A1F2-01 TCGA-BH-A1F5-01 TCGA-BH-A1F6-01 TCGA-BH-A1F8-01 TCGA-BH-A1FB-01 TCGA-BH-A1FC-01 TCGA-BH-A1FD-01 TCGA-BH-A1FE-01 TCGA-BH-A1FG-01 TCGA-BH-A1FH-01 TCGA-BH-A1FJ-01 TCGA-BH-A1FL-01 TCGA-BH-A1FM-01 TCGA-BH-A1FN-01 TCGA-BH-A1FR-01 TCGA-BH-A1FU-01 TCGA-BH-A201-01 TCGA-BH-A202-01 TCGA-BH-A203-01 TCGA-BH-A204-01 TCGA-BH-A208-01 TCGA-BH-A209-01 TCGA-BH-A28Q-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HE-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HJ-01 TCGA-C8-A1HK-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-C8-A1HO-01 TCGA-C8-A26V-01 TCGA-C8-A26W-01 TCGA-C8-A26X-01 TCGA-C8-A26Y-01 TCGA-C8-A26Z-01 TCGA-C8-A273-01 TCGA-C8-A274-01 TCGA-C8-A275-01 TCGA-C8-A278-01 TCGA-C8-A27A-01 TCGA-C8-A27B-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-D8-A1J8-01 TCGA-D8-A1J9-01 TCGA-D8-A1JA-01 TCGA-D8-A1JB-01 TCGA-D8-A1JC-01 TCGA-D8-A1JD-01 TCGA-D8-A1JE-01 TCGA-D8-A1JF-01 TCGA-D8-A1JG-01 TCGA-D8-A1JH-01 TCGA-D8-A1JI-01 TCGA-D8-A1JJ-01 TCGA-D8-A1JK-01 TCGA-D8-A1JL-01 TCGA-D8-A1JM-01 TCGA-D8-A1JN-01 TCGA-D8-A1JP-01 TCGA-D8-A1JS-01 TCGA-D8-A1JT-01 TCGA-D8-A1JU-01 TCGA-D8-A1X5-01 TCGA-D8-A1X6-01 TCGA-D8-A1X7-01 TCGA-D8-A1X8-01 TCGA-D8-A1X9-01 TCGA-D8-A1XA-01 TCGA-D8-A1XB-01 TCGA-D8-A1XC-01 TCGA-D8-A1XD-01 TCGA-D8-A1XF-01 TCGA-D8-A1XG-01 TCGA-D8-A1XJ-01 TCGA-D8-A1XK-01 TCGA-D8-A1XL-01 TCGA-D8-A1XM-01 TCGA-D8-A1XO-01 TCGA-D8-A1XQ-01 TCGA-D8-A1XR-01 TCGA-D8-A1XS-01 TCGA-D8-A1XT-01 TCGA-D8-A1XU-01 TCGA-D8-A1XV-01 TCGA-D8-A1XW-01 TCGA-D8-A1XY-01 TCGA-D8-A1XZ-01 TCGA-D8-A1Y0-01 TCGA-D8-A1Y1-01 TCGA-D8-A1Y2-01 TCGA-D8-A1Y3-01 TCGA-D8-A27E-01 TCGA-D8-A27F-01 TCGA-D8-A27G-01 TCGA-D8-A27H-01 TCGA-D8-A27I-01 TCGA-D8-A27K-01 TCGA-D8-A27L-01 TCGA-D8-A27M-01 TCGA-D8-A27N-01 TCGA-D8-A27P-01 TCGA-D8-A27R-01 TCGA-D8-A27T-01 TCGA-D8-A27V-01 TCGA-D8-A27W-01 TCGA-E2-A105-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15C-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 TCGA-E2-A1IE-01 TCGA-E2-A1IF-01 TCGA-E2-A1IG-01 TCGA-E2-A1IH-01 TCGA-E2-A1II-01 TCGA-E2-A1IJ-01 TCGA-E2-A1IK-01 TCGA-E2-A1IL-01 TCGA-E2-A1IN-01 TCGA-E2-A1IO-01 TCGA-E2-A1IU-01 TCGA-E2-A1L6-01 TCGA-E2-A1L7-01 TCGA-E2-A1L8-01 TCGA-E2-A1L9-01 TCGA-E2-A1LA-01 TCGA-E2-A1LB-01 TCGA-E2-A1LG-01 TCGA-E2-A1LH-01 TCGA-E2-A1LI-01 TCGA-E2-A1LK-01 TCGA-E2-A1LL-01 TCGA-E9-A1N3-01 TCGA-E9-A1N4-01 TCGA-E9-A1N5-01 TCGA-E9-A1N6-01 TCGA-E9-A1N8-01 TCGA-E9-A1N9-01 TCGA-E9-A1NA-01 TCGA-E9-A1NC-01 TCGA-E9-A1ND-01 TCGA-E9-A1NE-01 TCGA-E9-A1NF-01 TCGA-E9-A1NG-01 TCGA-E9-A1NH-01 TCGA-E9-A1NI-01 TCGA-E9-A1QZ-01 TCGA-E9-A1R0-01 TCGA-E9-A1R2-01 TCGA-E9-A1R3-01 TCGA-E9-A1R4-01 TCGA-E9-A1R5-01 TCGA-E9-A1R6-01 TCGA-E9-A1R7-01 TCGA-E9-A1RA-01 TCGA-E9-A1RB-01 TCGA-E9-A1RC-01 TCGA-E9-A1RD-01 TCGA-E9-A1RE-01 TCGA-E9-A1RF-01 TCGA-E9-A1RG-01 TCGA-E9-A1RH-01 TCGA-E9-A1RI-01 TCGA-E9-A226-01 TCGA-E9-A227-01 TCGA-E9-A228-01 TCGA-E9-A229-01 TCGA-E9-A22A-01 TCGA-E9-A22B-01 TCGA-E9-A22D-01 TCGA-E9-A22E-01 TCGA-E9-A22G-01 TCGA-E9-A22H-01 TCGA-E9-A243-01 TCGA-E9-A244-01 TCGA-E9-A245-01 TCGA-E9-A247-01 TCGA-E9-A248-01 TCGA-E9-A249-01 TCGA-E9-A24A-01 TCGA-E9-A295-01 TCGA-EW-A1IW-01 TCGA-EW-A1IX-01 TCGA-EW-A1IY-01 TCGA-EW-A1IZ-01 TCGA-EW-A1J1-01 TCGA-EW-A1J2-01 TCGA-EW-A1J3-01 TCGA-EW-A1J5-01 TCGA-EW-A1J6-01 TCGA-EW-A1OV-01 TCGA-EW-A1OW-01 TCGA-EW-A1OX-01 TCGA-EW-A1OY-01 TCGA-EW-A1OZ-01 TCGA-EW-A1P0-01 TCGA-EW-A1P1-01 TCGA-EW-A1P3-01 TCGA-EW-A1P4-01 TCGA-EW-A1P5-01 TCGA-EW-A1P6-01 TCGA-EW-A1P7-01 TCGA-EW-A1P8-01 TCGA-EW-A1PA-01 TCGA-EW-A1PB-01 TCGA-EW-A1PD-01 TCGA-EW-A1PE-01 TCGA-EW-A1PF-01 TCGA-EW-A1PG-01 TCGA-EW-A1PH-01 TCGA-EW-A2FS-01 TCGA-EW-A2FV-01 TCGA-EW-A2FW-01 TCGA-GI-A2C8-01 TEST-A23C-01 TEST-A23E-01 TEST-A23H-01 TEST-A2B8-01 TEST-A2FB-01 TEST-A2FF-01 TEST-A2FG-01 TEST_SAMPLE_1 TEST_SAMPLE_12 TEST_SAMPLE_13 TEST_SAMPLE_14 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_custom.txt b/test/test_data/study_es_0_import_export/case_lists/cases_custom.txt new file mode 100644 index 00000000000..c6cac3aa45e --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_custom.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_custom +case_list_name: this is an optional custom case list +case_list_description: this is an optional custom case list +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SF-01 TCGA-A1-A0SG-01 TCGA-A1-A0SH-01 TCGA-A1-A0SI-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SN-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A1-A0SQ-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A2-A1FV-01 TCGA-A2-A1FW-01 TCGA-A2-A1FX-01 TCGA-A2-A1FZ-01 TCGA-A2-A1G0-01 TCGA-A2-A1G1-01 TCGA-A2-A1G4-01 TCGA-A2-A1G6-01 TCGA-A2-A259-01 TCGA-A2-A25A-01 TCGA-A2-A25B-01 TCGA-A2-A25C-01 TCGA-A2-A25D-01 TCGA-A2-A25E-01 TCGA-A2-A25F-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A7-A13G-01 TCGA-A7-A26E-01 TCGA-A7-A26F-01 TCGA-A7-A26G-01 TCGA-A7-A26H-01 TCGA-A7-A26I-01 TCGA-A7-A26J-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AO-A1KO-01 TCGA-AO-A1KP-01 TCGA-AO-A1KQ-01 TCGA-AO-A1KR-01 TCGA-AO-A1KS-01 TCGA-AO-A1KT-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AQ-A0Y5-01 TCGA-AQ-A1H2-01 TCGA-AQ-A1H3-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-AR-A24H-01 TCGA-AR-A24K-01 TCGA-AR-A24L-01 TCGA-AR-A24M-01 TCGA-AR-A24N-01 TCGA-AR-A24O-01 TCGA-AR-A24P-01 TCGA-AR-A24Q-01 TCGA-AR-A24R-01 TCGA-AR-A24S-01 TCGA-AR-A24T-01 TCGA-AR-A24U-01 TCGA-AR-A24V-01 TCGA-AR-A24W-01 TCGA-AR-A24X-01 TCGA-AR-A24Z-01 TCGA-AR-A250-01 TCGA-AR-A251-01 TCGA-AR-A252-01 TCGA-AR-A254-01 TCGA-AR-A255-01 TCGA-AR-A256-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-B6-A1KC-01 TCGA-B6-A1KF-01 TCGA-B6-A1KI-01 TCGA-B6-A1KN-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DV-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EN-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1EX-01 TCGA-BH-A1EY-01 TCGA-BH-A1F0-01 TCGA-BH-A1F2-01 TCGA-BH-A1F5-01 TCGA-BH-A1F6-01 TCGA-BH-A1F8-01 TCGA-BH-A1FB-01 TCGA-BH-A1FC-01 TCGA-BH-A1FD-01 TCGA-BH-A1FE-01 TCGA-BH-A1FG-01 TCGA-BH-A1FH-01 TCGA-BH-A1FJ-01 TCGA-BH-A1FL-01 TCGA-BH-A1FM-01 TCGA-BH-A1FN-01 TCGA-BH-A1FR-01 TCGA-BH-A1FU-01 TCGA-BH-A201-01 TCGA-BH-A202-01 TCGA-BH-A203-01 TCGA-BH-A204-01 TCGA-BH-A208-01 TCGA-BH-A209-01 TCGA-BH-A28Q-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HE-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HJ-01 TCGA-C8-A1HK-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-C8-A1HO-01 TCGA-C8-A26V-01 TCGA-C8-A26W-01 TCGA-C8-A26X-01 TCGA-C8-A26Y-01 TCGA-C8-A26Z-01 TCGA-C8-A273-01 TCGA-C8-A274-01 TCGA-C8-A275-01 TCGA-C8-A278-01 TCGA-C8-A27A-01 TCGA-C8-A27B-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-D8-A1J8-01 TCGA-D8-A1J9-01 TCGA-D8-A1JA-01 TCGA-D8-A1JB-01 TCGA-D8-A1JC-01 TCGA-D8-A1JD-01 TCGA-D8-A1JE-01 TCGA-D8-A1JF-01 TCGA-D8-A1JG-01 TCGA-D8-A1JH-01 TCGA-D8-A1JI-01 TCGA-D8-A1JJ-01 TCGA-D8-A1JK-01 TCGA-D8-A1JL-01 TCGA-D8-A1JM-01 TCGA-D8-A1JN-01 TCGA-D8-A1JP-01 TCGA-D8-A1JS-01 TCGA-D8-A1JT-01 TCGA-D8-A1JU-01 TCGA-D8-A1X5-01 TCGA-D8-A1X6-01 TCGA-D8-A1X7-01 TCGA-D8-A1X8-01 TCGA-D8-A1X9-01 TCGA-D8-A1XA-01 TCGA-D8-A1XB-01 TCGA-D8-A1XC-01 TCGA-D8-A1XD-01 TCGA-D8-A1XF-01 TCGA-D8-A1XG-01 TCGA-D8-A1XJ-01 TCGA-D8-A1XK-01 TCGA-D8-A1XL-01 TCGA-D8-A1XM-01 TCGA-D8-A1XO-01 TCGA-D8-A1XQ-01 TCGA-D8-A1XR-01 TCGA-D8-A1XS-01 TCGA-D8-A1XT-01 TCGA-D8-A1XU-01 TCGA-D8-A1XV-01 TCGA-D8-A1XW-01 TCGA-D8-A1XY-01 TCGA-D8-A1XZ-01 TCGA-D8-A1Y0-01 TCGA-D8-A1Y1-01 TCGA-D8-A1Y2-01 TCGA-D8-A1Y3-01 TCGA-D8-A27E-01 TCGA-D8-A27F-01 TCGA-D8-A27G-01 TCGA-D8-A27H-01 TCGA-D8-A27I-01 TCGA-D8-A27K-01 TCGA-D8-A27L-01 TCGA-D8-A27M-01 TCGA-D8-A27N-01 TCGA-D8-A27P-01 TCGA-D8-A27R-01 TCGA-D8-A27T-01 TCGA-D8-A27V-01 TCGA-D8-A27W-01 TCGA-E2-A105-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15C-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 TCGA-E2-A1IE-01 TCGA-E2-A1IF-01 TCGA-E2-A1IG-01 TCGA-E2-A1IH-01 TCGA-E2-A1II-01 TCGA-E2-A1IJ-01 TCGA-E2-A1IK-01 TCGA-E2-A1IL-01 TCGA-E2-A1IN-01 TCGA-E2-A1IO-01 TCGA-E2-A1IU-01 TCGA-E2-A1L6-01 TCGA-E2-A1L7-01 TCGA-E2-A1L8-01 TCGA-E2-A1L9-01 TCGA-E2-A1LA-01 TCGA-E2-A1LB-01 TCGA-E2-A1LG-01 TCGA-E2-A1LH-01 TCGA-E2-A1LI-01 TCGA-E2-A1LK-01 TCGA-E2-A1LL-01 TCGA-E9-A1N3-01 TCGA-E9-A1N4-01 TCGA-E9-A1N5-01 TCGA-E9-A1N6-01 TCGA-E9-A1N8-01 TCGA-E9-A1N9-01 TCGA-E9-A1NA-01 TCGA-E9-A1NC-01 TCGA-E9-A1ND-01 TCGA-E9-A1NE-01 TCGA-E9-A1NF-01 TCGA-E9-A1NG-01 TCGA-E9-A1NH-01 TCGA-E9-A1NI-01 TCGA-E9-A1QZ-01 TCGA-E9-A1R0-01 TCGA-E9-A1R2-01 TCGA-E9-A1R3-01 TCGA-E9-A1R4-01 TCGA-E9-A1R5-01 TCGA-E9-A1R6-01 TCGA-E9-A1R7-01 TCGA-E9-A1RA-01 TCGA-E9-A1RB-01 TCGA-E9-A1RC-01 TCGA-E9-A1RD-01 TCGA-E9-A1RE-01 TCGA-E9-A1RF-01 TCGA-E9-A1RG-01 TCGA-E9-A1RH-01 TCGA-E9-A1RI-01 TCGA-E9-A226-01 TCGA-E9-A227-01 TCGA-E9-A228-01 TCGA-E9-A229-01 TCGA-E9-A22A-01 TCGA-E9-A22B-01 TCGA-E9-A22D-01 TCGA-E9-A22E-01 TCGA-E9-A22G-01 TCGA-E9-A22H-01 TCGA-E9-A243-01 TCGA-E9-A244-01 TCGA-E9-A245-01 TCGA-E9-A247-01 TCGA-E9-A248-01 TCGA-E9-A249-01 TCGA-E9-A24A-01 TCGA-E9-A295-01 TCGA-EW-A1IW-01 TCGA-EW-A1IX-01 TCGA-EW-A1IY-01 TCGA-EW-A1IZ-01 TCGA-EW-A1J1-01 TCGA-EW-A1J2-01 TCGA-EW-A1J3-01 TCGA-EW-A1J5-01 TCGA-EW-A1J6-01 TCGA-EW-A1OV-01 TCGA-EW-A1OW-01 TCGA-EW-A1OX-01 TCGA-EW-A1OY-01 TCGA-EW-A1OZ-01 TCGA-EW-A1P0-01 TCGA-EW-A1P1-01 TCGA-EW-A1P3-01 TCGA-EW-A1P4-01 TCGA-EW-A1P5-01 TCGA-EW-A1P6-01 TCGA-EW-A1P7-01 TCGA-EW-A1P8-01 TCGA-EW-A1PA-01 TCGA-EW-A1PB-01 TCGA-EW-A1PD-01 TCGA-EW-A1PE-01 TCGA-EW-A1PF-01 TCGA-EW-A1PG-01 TCGA-EW-A1PH-01 TCGA-EW-A2FS-01 TCGA-EW-A2FV-01 TCGA-EW-A2FW-01 TCGA-GI-A2C8-01 TEST-A23C-01 TEST-A23E-01 TEST-A23H-01 TEST-A2B8-01 TEST-A2FB-01 TEST-A2FF-01 TEST-A2FG-01 diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt b/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt index fc201f74db1..b2d143907c3 100644 --- a/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt +++ b/test/test_data/study_es_0_import_export/case_lists/cases_sequenced.txt @@ -2,4 +2,4 @@ cancer_study_identifier: study_es_0_import_export stable_id: study_es_0_import_export_sequenced case_list_name: Samples profiled for mutations case_list_description: This is this case list that contains all samples that are profiled for mutations. -case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SK-01 TCGA-A2-A04P-01 TCGA-A2-A0CM-01 TCGA-AR-A1AR-01 TCGA-B6-A0I6-01 TCGA-B6-A0WX-01 TCGA-BH-A0E0-01 TCGA-BH-A0HL-01 TCGA-BH-A18K-01 TCGA-BH-A18V-01 TCGA-BH-A1F0-01 TEST_SAMPLE_1 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_SAMPLE_SOMATIC_HOMOZYGOUS TEST_SAMPLE_SOMATIC_UNDEFINED +case_list_ids: TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SK-01 TCGA-A2-A04P-01 TCGA-A2-A0CM-01 TCGA-AR-A1AR-01 TCGA-B6-A0I6-01 TCGA-B6-A0WX-01 TCGA-BH-A0E0-01 TCGA-BH-A0HL-01 TCGA-BH-A18K-01 TCGA-BH-A18V-01 TCGA-BH-A1F0-01 TCGA-GI-A2C8-01 TEST-A2B8-01 TEST-A2FF-01 TEST_SAMPLE_1 TEST_SAMPLE_10 TEST_SAMPLE_11 TEST_SAMPLE_12 TEST_SAMPLE_13 TEST_SAMPLE_14 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_5 TEST_SAMPLE_6 TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_SAMPLE_SOMATIC_HOMOZYGOUS TEST_SAMPLE_SOMATIC_UNDEFINED diff --git a/test/test_data/study_es_0_import_export/case_lists/cases_testprofiled.txt b/test/test_data/study_es_0_import_export/case_lists/cases_testprofiled.txt new file mode 100644 index 00000000000..c4b906c2c2a --- /dev/null +++ b/test/test_data/study_es_0_import_export/case_lists/cases_testprofiled.txt @@ -0,0 +1,5 @@ +cancer_study_identifier: study_es_0_import_export +stable_id: study_es_0_import_export_testprofiled +case_list_name: Test profiled samples +case_list_description: This case lists to test functionality of profiled/gene panels for mutations, fusions and CNA +case_list_ids: TEST_SAMPLE_1 TEST_SAMPLE_10 TEST_SAMPLE_11 TEST_SAMPLE_12 TEST_SAMPLE_13 TEST_SAMPLE_14 TEST_SAMPLE_15 TEST_SAMPLE_2 TEST_SAMPLE_3 TEST_SAMPLE_4 TEST_SAMPLE_5 TEST_SAMPLE_6 TEST_SAMPLE_7 TEST_SAMPLE_8 TEST_SAMPLE_9 diff --git a/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt b/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt new file mode 100644 index 00000000000..c249ac00a08 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt @@ -0,0 +1,846 @@ +#Patient Identifier Disease Free (Months) Disease Free Status Overall Survival (Months) Overall Survival Status +#Patient Identifier Disease free in months since treatment Disease free status Overall survival in months since diagnosis Overall survival status +#STRING NUMBER STRING NUMBER STRING +#1 1 1 1 1 +PATIENT_ID DFS_MONTHS DFS_STATUS OS_MONTHS OS_STATUS +TCGA-A1-A0SB 8.51 0:DiseaseFree 8.51 0:LIVING +TCGA-A1-A0SD 14.36 0:DiseaseFree 14.36 0:LIVING +TCGA-A1-A0SE 43.37 0:DiseaseFree 43.37 0:LIVING +TCGA-A1-A0SF 48.06 0:DiseaseFree 48.06 0:LIVING +TCGA-A1-A0SG 14.23 0:DiseaseFree 14.23 0:LIVING +TCGA-A1-A0SH 47.21 0:DiseaseFree 47.21 0:LIVING +TCGA-A1-A0SI 20.83 0:DiseaseFree 20.83 0:LIVING +TCGA-A1-A0SJ 14 0:DiseaseFree 14 0:LIVING +TCGA-A1-A0SK 31.77 1:DECEASED +TCGA-A1-A0SM 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-A1-A0SN 39.29 0:DiseaseFree 39.29 0:LIVING +TCGA-A1-A0SO 27.99 0:DiseaseFree 27.99 0:LIVING +TCGA-A1-A0SP 19.15 0:DiseaseFree 19.15 0:LIVING +TCGA-A1-A0SQ 18.17 0:DiseaseFree 18.17 0:LIVING +TCGA-A2-A04N 103.59 0:DiseaseFree 103.59 0:LIVING +TCGA-A2-A04P 1:Recurred/Progressed +TCGA-A2-A04Q 41.89 0:DiseaseFree 41.89 0:LIVING +TCGA-A2-A04R 77.67 0:DiseaseFree 77.67 0:LIVING +TCGA-A2-A04T 64.06 0:DiseaseFree 64.06 0:LIVING +TCGA-A2-A04U 22.01 0:DiseaseFree 22.01 0:LIVING +TCGA-A2-A04V 1:Recurred/Progressed 63.08 1:DECEASED +TCGA-A2-A04W 63.01 0:DiseaseFree 63.01 0:LIVING +TCGA-A2-A04X 44.32 0:DiseaseFree 44.32 0:LIVING +TCGA-A2-A04Y 25.07 0:DiseaseFree 25.07 0:LIVING +TCGA-A2-A0CL 60.02 0:DiseaseFree 60.02 0:LIVING +TCGA-A2-A0CM 1:Recurred/Progressed 24.77 1:DECEASED +TCGA-A2-A0CP 81.97 0:DiseaseFree 81.97 0:LIVING +TCGA-A2-A0CQ 78.59 0:DiseaseFree 78.59 0:LIVING +TCGA-A2-A0CS 75.5 0:DiseaseFree 75.5 0:LIVING +TCGA-A2-A0CT 62.98 0:DiseaseFree 62.98 0:LIVING +TCGA-A2-A0CU 4.57 0:DiseaseFree 5.16 1:DECEASED +TCGA-A2-A0CV 61.44 0:DiseaseFree 61.44 0:LIVING +TCGA-A2-A0CW 57.49 0:DiseaseFree 57.49 0:LIVING +TCGA-A2-A0CX 42.81 0:DiseaseFree 42.81 0:LIVING +TCGA-A2-A0CY 42.32 0:DiseaseFree 42.32 0:LIVING +TCGA-A2-A0CZ 43.96 0:DiseaseFree 43.96 0:LIVING +TCGA-A2-A0D0 21.12 0:DiseaseFree 21.12 0:LIVING +TCGA-A2-A0D1 25.82 0:DiseaseFree 25.82 0:LIVING +TCGA-A2-A0D2 25 0:DiseaseFree 25 0:LIVING +TCGA-A2-A0D3 24.18 0:DiseaseFree 24.18 0:LIVING +TCGA-A2-A0D4 16.3 0:DiseaseFree 16.3 0:LIVING +TCGA-A2-A0EM 90.58 0:DiseaseFree 90.58 0:LIVING +TCGA-A2-A0EN 82.63 0:DiseaseFree 82.63 0:LIVING +TCGA-A2-A0EO 71.65 0:DiseaseFree 71.65 0:LIVING +TCGA-A2-A0EQ 67.45 0:DiseaseFree 67.45 0:LIVING +TCGA-A2-A0ER 62.49 0:DiseaseFree 62.49 0:LIVING +TCGA-A2-A0ES 32.89 0:DiseaseFree 32.89 0:LIVING +TCGA-A2-A0ET 26.51 0:DiseaseFree 26.51 0:LIVING +TCGA-A2-A0EU 24.08 0:DiseaseFree 24.08 0:LIVING +TCGA-A2-A0EV 17.91 0:DiseaseFree 17.91 0:LIVING +TCGA-A2-A0EW 25.3 0:DiseaseFree 25.3 0:LIVING +TCGA-A2-A0EX 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-A2-A0EY 15.93 0:DiseaseFree 15.93 0:LIVING +TCGA-A2-A0ST 53.98 0:DiseaseFree 53.98 0:LIVING +TCGA-A2-A0SU 44.38 0:DiseaseFree 44.38 0:LIVING +TCGA-A2-A0SV 1:Recurred/Progressed 27.1 1:DECEASED +TCGA-A2-A0SW 1:Recurred/Progressed 44.81 1:DECEASED +TCGA-A2-A0SX 1:Recurred/Progressed 42.32 0:LIVING +TCGA-A2-A0SY 37.91 0:DiseaseFree 37.91 0:LIVING +TCGA-A2-A0T0 11.07 0:DiseaseFree 11.07 0:LIVING +TCGA-A2-A0T1 10.58 0:DiseaseFree 10.58 0:LIVING +TCGA-A2-A0T2 +TCGA-A2-A0T3 14.98 0:DiseaseFree 14.98 0:LIVING +TCGA-A2-A0T4 12.98 0:DiseaseFree 12.98 0:LIVING +TCGA-A2-A0T5 10.55 0:DiseaseFree 10.55 0:LIVING +TCGA-A2-A0T6 11.3 0:DiseaseFree 11.3 0:LIVING +TCGA-A2-A0T7 13.04 0:DiseaseFree 13.04 0:LIVING +TCGA-A2-A0YC 21.12 0:DiseaseFree 21.12 0:LIVING +TCGA-A2-A0YD 18.07 0:DiseaseFree 18.07 0:LIVING +TCGA-A2-A0YE 8.28 0:DiseaseFree 8.28 0:LIVING +TCGA-A2-A0YF 9.49 0:DiseaseFree 9.49 0:LIVING +TCGA-A2-A0YG 13.27 0:DiseaseFree 13.27 0:LIVING +TCGA-A2-A0YH 12.45 0:DiseaseFree 12.45 0:LIVING +TCGA-A2-A0YI 11.76 0:DiseaseFree 11.76 0:LIVING +TCGA-A2-A0YJ 10.71 0:DiseaseFree 10.71 0:LIVING +TCGA-A2-A0YK 10.97 0:DiseaseFree 10.97 0:LIVING +TCGA-A2-A0YL 8.8 0:DiseaseFree 8.8 0:LIVING +TCGA-A2-A0YM 21.72 0:DiseaseFree 21.72 0:LIVING +TCGA-A2-A0YT 21.98 0:DiseaseFree 23.75 1:DECEASED +TCGA-A2-A1FV 15.11 0:DiseaseFree 15.11 0:LIVING +TCGA-A2-A1FW 7.26 0:DiseaseFree 7.26 0:LIVING +TCGA-A2-A1FX 30.72 0:DiseaseFree 30.72 0:LIVING +TCGA-A2-A1FZ 13.44 0:DiseaseFree 13.44 0:LIVING +TCGA-A2-A1G0 12.48 0:DiseaseFree 12.48 0:LIVING +TCGA-A2-A1G1 12.19 0:DiseaseFree 12.19 0:LIVING +TCGA-A2-A1G4 12.22 0:DiseaseFree 12.22 0:LIVING +TCGA-A2-A1G6 4.34 0:DiseaseFree 4.34 0:LIVING +TCGA-A2-A259 42.22 0:DiseaseFree 42.22 0:LIVING +TCGA-A2-A25A 97.51 0:DiseaseFree 97.51 0:LIVING +TCGA-A2-A25B 8.48 0:DiseaseFree 8.48 0:LIVING +TCGA-A2-A25C 9.36 0:DiseaseFree 9.36 0:LIVING +TCGA-A2-A25D 7.98 0:DiseaseFree 7.98 0:LIVING +TCGA-A2-A25E 82.49 0:DiseaseFree 82.49 0:LIVING +TCGA-A2-A25F 3.71 0:DiseaseFree 3.71 0:LIVING +TCGA-A7-A0CD 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-A7-A0CE 8.31 0:DiseaseFree 8.31 0:LIVING +TCGA-A7-A0CG 5.45 0:DiseaseFree 5.45 0:LIVING +TCGA-A7-A0CH 5.29 0:DiseaseFree 5.29 0:LIVING +TCGA-A7-A0CJ 6.18 0:DiseaseFree 6.18 0:LIVING +TCGA-A7-A0D9 5.22 0:DiseaseFree 5.22 0:LIVING +TCGA-A7-A0DA 12.25 0:DiseaseFree 12.25 0:LIVING +TCGA-A7-A0DB 4.6 0:DiseaseFree 4.6 0:LIVING +TCGA-A7-A0DC 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-A7-A13D 8.77 0:DiseaseFree 8.77 0:LIVING +TCGA-A7-A13E 9.43 0:DiseaseFree 9.43 0:LIVING +TCGA-A7-A13F 6.44 0:DiseaseFree 6.44 0:LIVING +TCGA-A7-A13G 6.83 0:DiseaseFree 6.83 0:LIVING +TCGA-A7-A26E 13.83 0:DiseaseFree 13.83 0:LIVING +TCGA-A7-A26F 8.44 0:DiseaseFree 8.44 0:LIVING +TCGA-A7-A26G 6.87 0:DiseaseFree 6.87 0:LIVING +TCGA-A7-A26H 2.1 0:DiseaseFree 2.1 0:LIVING +TCGA-A7-A26I 4.01 0:DiseaseFree 4.01 0:LIVING +TCGA-A7-A26J 1:Recurred/Progressed 2.2 0:LIVING +TCGA-A8-A06N 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A06O 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A06P 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A06Q 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A06R 17.94 0:DiseaseFree 17.94 0:LIVING +TCGA-A8-A06T 41.03 0:DiseaseFree 41.03 0:LIVING +TCGA-A8-A06U 28.98 1:DECEASED +TCGA-A8-A06X 30.98 1:DECEASED +TCGA-A8-A06Y 25.99 0:DiseaseFree 25.99 0:LIVING +TCGA-A8-A06Z 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A075 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-A8-A076 53.91 0:DiseaseFree 53.91 0:LIVING +TCGA-A8-A079 9 0:DiseaseFree 9 0:LIVING +TCGA-A8-A07B 32.98 0:DiseaseFree 32.98 0:LIVING +TCGA-A8-A07C 19.05 0:DiseaseFree 19.05 0:LIVING +TCGA-A8-A07E 19.97 0:DiseaseFree 19.97 0:LIVING +TCGA-A8-A07F 18.92 0:DiseaseFree 18.92 0:LIVING +TCGA-A8-A07G 18.92 0:DiseaseFree 18.92 0:LIVING +TCGA-A8-A07I 14 0:DiseaseFree 14 0:LIVING +TCGA-A8-A07J 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A07L 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-A8-A07O 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A07P 10.97 0:DiseaseFree 10.97 0:LIVING +TCGA-A8-A07R 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-A8-A07S 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-A8-A07U 9.95 0:DiseaseFree 9.95 0:LIVING +TCGA-A8-A07W 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A07Z 28.02 0:DiseaseFree 28.02 0:LIVING +TCGA-A8-A081 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A082 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-A8-A083 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A084 15.05 0:DiseaseFree 15.05 0:LIVING +TCGA-A8-A085 36.93 0:DiseaseFree 36.93 0:LIVING +TCGA-A8-A086 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A08A 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-A8-A08B 23.06 0:DiseaseFree 23.06 0:LIVING +TCGA-A8-A08C 19.94 0:DiseaseFree 19.94 0:LIVING +TCGA-A8-A08F 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-A8-A08G 19.91 0:DiseaseFree 19.91 0:LIVING +TCGA-A8-A08H 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A08I 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A08J 37.03 1:DECEASED +TCGA-A8-A08L 9.99 1:DECEASED +TCGA-A8-A08O 30.95 0:DiseaseFree 30.95 0:LIVING +TCGA-A8-A08P 30.95 0:DiseaseFree 30.95 0:LIVING +TCGA-A8-A08R 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-A8-A08S 19.05 0:DiseaseFree 19.05 0:LIVING +TCGA-A8-A08T 92.97 0:DiseaseFree 92.97 0:LIVING +TCGA-A8-A08X 33.97 0:DiseaseFree 33.97 0:LIVING +TCGA-A8-A08Z 39.98 0:DiseaseFree 39.98 0:LIVING +TCGA-A8-A090 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A091 19.05 0:DiseaseFree 19.05 0:LIVING +TCGA-A8-A092 17.02 0:DiseaseFree 17.02 0:LIVING +TCGA-A8-A093 17.91 0:DiseaseFree 17.91 0:LIVING +TCGA-A8-A094 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A095 41.92 0:DiseaseFree 41.92 0:LIVING +TCGA-A8-A096 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A097 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A099 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A09A 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A09B 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A09C 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A09D 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A09E 30.95 0:DiseaseFree 30.95 0:LIVING +TCGA-A8-A09G 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A09I 33.05 0:DiseaseFree 33.05 0:LIVING +TCGA-A8-A09K 29.93 0:DiseaseFree 29.93 0:LIVING +TCGA-A8-A09M 15.01 0:DiseaseFree 15.01 0:LIVING +TCGA-A8-A09N 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A09Q 25 0:DiseaseFree 25 0:LIVING +TCGA-A8-A09R 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-A8-A09T 18.99 0:DiseaseFree 18.99 0:LIVING +TCGA-A8-A09V 15.01 0:DiseaseFree 15.01 0:LIVING +TCGA-A8-A09W 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-A8-A09X 14 1:DECEASED +TCGA-A8-A09Z 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A0A1 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A0A2 18.99 0:DiseaseFree 18.99 0:LIVING +TCGA-A8-A0A4 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A0A6 21.03 0:DiseaseFree 21.03 0:LIVING +TCGA-A8-A0A7 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-A8-A0A9 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A0AB 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-A8-A0AD 38.01 0:DiseaseFree 38.01 0:LIVING +TCGA-AN-A03X 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A03Y 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A041 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-AN-A046 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A049 0.62 0:DiseaseFree 0.62 0:LIVING +TCGA-AN-A04A 2.92 0:DiseaseFree 2.92 0:LIVING +TCGA-AN-A04C 1.77 0:DiseaseFree 1.77 0:LIVING +TCGA-AN-A04D 1.71 0:DiseaseFree 1.71 0:LIVING +TCGA-AN-A0AJ 7.98 0:DiseaseFree 7.98 0:LIVING +TCGA-AN-A0AK 7.33 0:DiseaseFree 7.33 0:LIVING +TCGA-AN-A0AL 6.47 0:DiseaseFree 6.47 0:LIVING +TCGA-AN-A0AM 0.16 0:DiseaseFree 0.16 0:LIVING +TCGA-AN-A0AR 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0AS 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0AT 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0FD 6.41 0:DiseaseFree 6.41 0:LIVING +TCGA-AN-A0FF 4.6 0:DiseaseFree 4.6 0:LIVING +TCGA-AN-A0FJ 7.92 0:DiseaseFree 7.92 0:LIVING +TCGA-AN-A0FK 6.96 0:DiseaseFree 6.96 0:LIVING +TCGA-AN-A0FL 7.56 0:DiseaseFree 7.56 0:LIVING +TCGA-AN-A0FN 7.16 0:DiseaseFree 7.16 0:LIVING +TCGA-AN-A0FS 6.27 0:DiseaseFree 6.27 0:LIVING +TCGA-AN-A0FT 6.01 0:DiseaseFree 6.01 0:LIVING +TCGA-AN-A0FV 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0FW 0.36 0:DiseaseFree 0.36 0:LIVING +TCGA-AN-A0FX 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0FY 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0FZ 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0G0 0.53 0:DiseaseFree 0.53 0:LIVING +TCGA-AN-A0XL 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XN 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XO 12.32 0:DiseaseFree 12.32 0:LIVING +TCGA-AN-A0XP 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0XR 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XS 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XT 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XU 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XV 5.32 0:DiseaseFree 5.32 0:LIVING +TCGA-AN-A0XW 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-AO-A03L 80.23 0:DiseaseFree 80.23 0:LIVING +TCGA-AO-A03M 47.8 0:DiseaseFree 47.8 0:LIVING +TCGA-AO-A03N 1:Recurred/Progressed 54.04 0:LIVING +TCGA-AO-A03O 32.62 0:DiseaseFree 81.57 1:DECEASED +TCGA-AO-A03P 1:Recurred/Progressed 84.63 0:LIVING +TCGA-AO-A03R 56.08 0:DiseaseFree 56.08 0:LIVING +TCGA-AO-A03T 39 0:DiseaseFree 39 0:LIVING +TCGA-AO-A03U 56.74 0:DiseaseFree 59 1:DECEASED +TCGA-AO-A03V 29.11 0:DiseaseFree 29.11 0:LIVING +TCGA-AO-A0J2 19.22 0:DiseaseFree 19.22 0:LIVING +TCGA-AO-A0J3 9.92 0:DiseaseFree 9.92 0:LIVING +TCGA-AO-A0J4 9.66 0:DiseaseFree 9.66 0:LIVING +TCGA-AO-A0J5 1:Recurred/Progressed 24.15 0:LIVING +TCGA-AO-A0J6 25.46 0:DiseaseFree 25.46 0:LIVING +TCGA-AO-A0J7 8.54 0:DiseaseFree 8.54 0:LIVING +TCGA-AO-A0J8 9.1 0:DiseaseFree 9.1 0:LIVING +TCGA-AO-A0J9 1:Recurred/Progressed 41.23 0:LIVING +TCGA-AO-A0JA 1:Recurred/Progressed 11.37 0:LIVING +TCGA-AO-A0JB 37.78 0:DiseaseFree 37.78 0:LIVING +TCGA-AO-A0JC 50.82 0:DiseaseFree 50.82 0:LIVING +TCGA-AO-A0JD 59.56 0:DiseaseFree 59.56 0:LIVING +TCGA-AO-A0JE 64.56 0:DiseaseFree 64.56 0:LIVING +TCGA-AO-A0JF 11.63 0:DiseaseFree 11.63 0:LIVING +TCGA-AO-A0JG 14.75 0:DiseaseFree 14.75 0:LIVING +TCGA-AO-A0JI 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-AO-A0JJ 49.67 0:DiseaseFree 49.67 0:LIVING +TCGA-AO-A0JL 43.33 0:DiseaseFree 43.33 0:LIVING +TCGA-AO-A0JM 59.99 0:DiseaseFree 59.99 0:LIVING +TCGA-AO-A124 102.47 0:DiseaseFree 102.47 0:LIVING +TCGA-AO-A125 99.15 0:DiseaseFree 99.15 0:LIVING +TCGA-AO-A126 93.63 0:DiseaseFree 93.63 0:LIVING +TCGA-AO-A128 94.52 0:DiseaseFree 94.52 0:LIVING +TCGA-AO-A129 96.03 0:DiseaseFree 96.03 0:LIVING +TCGA-AO-A12A 90.48 0:DiseaseFree 90.48 0:LIVING +TCGA-AO-A12B 77.5 0:DiseaseFree 77.5 0:LIVING +TCGA-AO-A12C 65.48 0:DiseaseFree 65.48 0:LIVING +TCGA-AO-A12D 64 0:DiseaseFree 64 0:LIVING +TCGA-AO-A12E 57.23 0:DiseaseFree 57.23 0:LIVING +TCGA-AO-A12F 48.33 0:DiseaseFree 48.33 0:LIVING +TCGA-AO-A12G 41.56 0:DiseaseFree 41.56 0:LIVING +TCGA-AO-A12H 28.32 0:DiseaseFree 28.32 0:LIVING +TCGA-AO-A1KO 14.72 0:DiseaseFree 14.72 0:LIVING +TCGA-AO-A1KP 82.56 0:DiseaseFree 82.56 0:LIVING +TCGA-AO-A1KQ 49.9 0:DiseaseFree 49.9 0:LIVING +TCGA-AO-A1KR 70.31 0:DiseaseFree 70.31 0:LIVING +TCGA-AO-A1KS 0.53 0:DiseaseFree 0.53 0:LIVING +TCGA-AO-A1KT 17.77 0:DiseaseFree 17.77 0:LIVING +TCGA-AQ-A04H 14.42 0:DiseaseFree 14.42 0:LIVING +TCGA-AQ-A04J 5.22 0:DiseaseFree 5.22 0:LIVING +TCGA-AQ-A04L 109.86 0:DiseaseFree 109.86 0:LIVING +TCGA-AQ-A0Y5 0:DiseaseFree 5.29 1:DECEASED +TCGA-AQ-A1H2 6.47 0:DiseaseFree 6.47 0:LIVING +TCGA-AQ-A1H3 4.53 0:DiseaseFree 4.53 0:LIVING +TCGA-AR-A0TP 78.59 0:DiseaseFree 78.59 0:LIVING +TCGA-AR-A0TQ 49.28 0:DiseaseFree 49.28 0:LIVING +TCGA-AR-A0TR 5.26 1:DECEASED +TCGA-AR-A0TS 37.39 0:DiseaseFree 37.39 0:LIVING +TCGA-AR-A0TT 55.16 0:DiseaseFree 55.16 0:LIVING +TCGA-AR-A0TU 11.83 0:DiseaseFree 11.83 0:LIVING +TCGA-AR-A0TV 29.7 0:DiseaseFree 29.7 0:LIVING +TCGA-AR-A0TW 24.28 0:DiseaseFree 24.28 0:LIVING +TCGA-AR-A0TX 0.49 0:DiseaseFree 0.49 0:LIVING +TCGA-AR-A0TY 55.82 1:DECEASED +TCGA-AR-A0TZ 43.14 0:DiseaseFree 43.14 0:LIVING +TCGA-AR-A0U0 0.26 0:DiseaseFree 0.26 0:LIVING +TCGA-AR-A0U1 6.08 0:DiseaseFree 6.08 0:LIVING +TCGA-AR-A0U2 1:Recurred/Progressed 83.81 1:DECEASED +TCGA-AR-A0U3 74.35 0:DiseaseFree 74.35 0:LIVING +TCGA-AR-A0U4 53.45 0:DiseaseFree 53.45 0:LIVING +TCGA-AR-A1AH 75.5 0:DiseaseFree 75.5 0:LIVING +TCGA-AR-A1AI 61.8 0:DiseaseFree 61.8 0:LIVING +TCGA-AR-A1AJ 52.7 0:DiseaseFree 52.7 0:LIVING +TCGA-AR-A1AK 51.19 0:DiseaseFree 51.19 0:LIVING +TCGA-AR-A1AL 48.79 0:DiseaseFree 48.79 0:LIVING +TCGA-AR-A1AN 43.66 0:DiseaseFree 43.66 0:LIVING +TCGA-AR-A1AO 43.5 0:DiseaseFree 43.5 0:LIVING +TCGA-AR-A1AP 39.92 0:DiseaseFree 39.92 0:LIVING +TCGA-AR-A1AQ 43.01 0:DiseaseFree 43.01 0:LIVING +TCGA-AR-A1AR 17.18 1:DECEASED +TCGA-AR-A1AS 40.8 0:DiseaseFree 40.8 0:LIVING +TCGA-AR-A1AT 41.79 1:DECEASED +TCGA-AR-A1AU 46.29 0:DiseaseFree 46.29 0:LIVING +TCGA-AR-A1AV 42.55 0:DiseaseFree 42.55 0:LIVING +TCGA-AR-A1AW 35.22 0:DiseaseFree 35.22 0:LIVING +TCGA-AR-A1AX 36.24 0:DiseaseFree 36.24 0:LIVING +TCGA-AR-A1AY 20.17 0:DiseaseFree 20.17 0:LIVING +TCGA-AR-A24H 109.5 0:DiseaseFree 109.5 0:LIVING +TCGA-AR-A24K 50.86 0:DiseaseFree 50.86 0:LIVING +TCGA-AR-A24L 72.97 0:DiseaseFree 72.97 0:LIVING +TCGA-AR-A24M 65.38 0:DiseaseFree 65.38 0:LIVING +TCGA-AR-A24N 68.14 0:DiseaseFree 68.14 0:LIVING +TCGA-AR-A24O 65.61 0:DiseaseFree 65.61 0:LIVING +TCGA-AR-A24P 0.85 0:DiseaseFree 0.85 0:LIVING +TCGA-AR-A24Q 65.97 0:DiseaseFree 65.97 0:LIVING +TCGA-AR-A24R 57.33 0:DiseaseFree 57.33 0:LIVING +TCGA-AR-A24S 62.03 0:DiseaseFree 62.03 0:LIVING +TCGA-AR-A24T 53.22 0:DiseaseFree 53.22 0:LIVING +TCGA-AR-A24U 53.32 0:DiseaseFree 53.32 0:LIVING +TCGA-AR-A24V 54.14 0:DiseaseFree 54.14 0:LIVING +TCGA-AR-A24W +TCGA-AR-A24X 48.13 0:DiseaseFree 48.13 0:LIVING +TCGA-AR-A24Z 51.71 0:DiseaseFree 51.71 0:LIVING +TCGA-AR-A250 56.08 0:DiseaseFree 56.08 0:LIVING +TCGA-AR-A251 45.11 0:DiseaseFree 45.11 0:LIVING +TCGA-AR-A252 40.61 0:DiseaseFree 40.61 0:LIVING +TCGA-AR-A254 39.82 0:DiseaseFree 39.82 0:LIVING +TCGA-AR-A255 34.76 0:DiseaseFree 34.76 0:LIVING +TCGA-AR-A256 93.76 1:DECEASED +TCGA-B6-A0I2 125.7 0:DiseaseFree 125.7 0:LIVING +TCGA-B6-A0I5 149.45 0:DiseaseFree 149.45 0:LIVING +TCGA-B6-A0I6 1:Recurred/Progressed 32.56 1:DECEASED +TCGA-B6-A0I8 1:Recurred/Progressed 24.61 1:DECEASED +TCGA-B6-A0I9 1:Recurred/Progressed 12.12 1:DECEASED +TCGA-B6-A0IA 220.71 0:DiseaseFree 220.71 0:LIVING +TCGA-B6-A0IB 1:Recurred/Progressed 129.48 1:DECEASED +TCGA-B6-A0IC 50.66 1:DECEASED +TCGA-B6-A0IE 1:Recurred/Progressed 65.64 1:DECEASED +TCGA-B6-A0IG 1:Recurred/Progressed 146.39 1:DECEASED +TCGA-B6-A0IH 112.29 1:DECEASED +TCGA-B6-A0IJ 176.85 0:DiseaseFree 176.85 0:LIVING +TCGA-B6-A0IK 1:Recurred/Progressed 18.76 1:DECEASED +TCGA-B6-A0IM 126.03 0:DiseaseFree 126.03 0:LIVING +TCGA-B6-A0IN 1:Recurred/Progressed 84.53 1:DECEASED +TCGA-B6-A0IO 110.06 0:DiseaseFree 110.06 0:LIVING +TCGA-B6-A0IP 110.85 0:DiseaseFree 110.85 0:LIVING +TCGA-B6-A0IQ 127.18 0:DiseaseFree 127.18 0:LIVING +TCGA-B6-A0RE 211.38 0:DiseaseFree 211.38 0:LIVING +TCGA-B6-A0RG 68.4 0:DiseaseFree 68.4 0:LIVING +TCGA-B6-A0RH 188.84 0:DiseaseFree 188.84 0:LIVING +TCGA-B6-A0RI 1:Recurred/Progressed 223.24 0:LIVING +TCGA-B6-A0RL 81.11 0:DiseaseFree 81.11 1:DECEASED +TCGA-B6-A0RM 77.96 0:DiseaseFree 77.96 1:DECEASED +TCGA-B6-A0RN 172.84 0:DiseaseFree 172.84 0:LIVING +TCGA-B6-A0RO 161.9 0:DiseaseFree 161.9 0:LIVING +TCGA-B6-A0RP 102.7 1:DECEASED +TCGA-B6-A0RQ 0:DiseaseFree 140.38 1:DECEASED +TCGA-B6-A0RS 1:Recurred/Progressed 100.6 1:DECEASED +TCGA-B6-A0RT 89.39 0:DiseaseFree 89.39 0:LIVING +TCGA-B6-A0RU 131.12 0:DiseaseFree 131.12 0:LIVING +TCGA-B6-A0RV 157.3 0:DiseaseFree 157.3 0:LIVING +TCGA-B6-A0WS 0:DiseaseFree 97.41 1:DECEASED +TCGA-B6-A0WT 177.28 0:DiseaseFree 177.28 0:LIVING +TCGA-B6-A0WV 79.57 0:DiseaseFree 79.57 1:DECEASED +TCGA-B6-A0WW 1:Recurred/Progressed 18.3 1:DECEASED +TCGA-B6-A0WX 1:Recurred/Progressed 21.45 1:DECEASED +TCGA-B6-A0WY 1:Recurred/Progressed 113.67 1:DECEASED +TCGA-B6-A0WZ 129.48 0:DiseaseFree 129.48 0:LIVING +TCGA-B6-A0X0 129.61 1:DECEASED +TCGA-B6-A0X1 186.31 0:DiseaseFree 186.31 0:LIVING +TCGA-B6-A0X4 1:Recurred/Progressed 28.22 1:DECEASED +TCGA-B6-A0X5 1:Recurred/Progressed 68.89 1:DECEASED +TCGA-B6-A0X7 58.84 1:DECEASED +TCGA-B6-A1KC 43.56 0:DiseaseFree 43.56 0:LIVING +TCGA-B6-A1KF 101.45 0:DiseaseFree 101.45 0:LIVING +TCGA-B6-A1KI 48.06 0:DiseaseFree 48.06 0:LIVING +TCGA-B6-A1KN 109.4 0:DiseaseFree 109.4 0:LIVING +TCGA-BH-A0AU 24.51 0:DiseaseFree 24.51 0:LIVING +TCGA-BH-A0AV 38.77 0:DiseaseFree 38.77 0:LIVING +TCGA-BH-A0AW 20.43 0:DiseaseFree 20.43 0:LIVING +TCGA-BH-A0AY 25.53 0:DiseaseFree 25.53 0:LIVING +TCGA-BH-A0AZ 28.48 0:DiseaseFree 28.48 0:LIVING +TCGA-BH-A0B0 46.88 0:DiseaseFree 46.88 0:LIVING +TCGA-BH-A0B1 37.72 0:DiseaseFree 37.72 0:LIVING +TCGA-BH-A0B2 40.8 0:DiseaseFree 40.8 0:LIVING +TCGA-BH-A0B3 39.52 0:DiseaseFree 39.52 0:LIVING +TCGA-BH-A0B4 39.13 0:DiseaseFree 39.13 0:LIVING +TCGA-BH-A0B5 48.33 0:DiseaseFree 48.33 0:LIVING +TCGA-BH-A0B7 56.93 0:DiseaseFree 56.93 0:LIVING +TCGA-BH-A0B8 51.55 0:DiseaseFree 51.55 0:LIVING +TCGA-BH-A0B9 51.65 0:DiseaseFree 51.65 0:LIVING +TCGA-BH-A0BA 37.19 0:DiseaseFree 37.19 0:LIVING +TCGA-BH-A0BC 32 0:DiseaseFree 32 0:LIVING +TCGA-BH-A0BD 18.2 0:DiseaseFree 18.2 0:LIVING +TCGA-BH-A0BF 25.66 0:DiseaseFree 25.66 0:LIVING +TCGA-BH-A0BG 24.84 0:DiseaseFree 24.84 0:LIVING +TCGA-BH-A0BJ 21.68 0:DiseaseFree 21.68 0:LIVING +TCGA-BH-A0BL 43.99 0:DiseaseFree 43.99 0:LIVING +TCGA-BH-A0BM 36.7 0:DiseaseFree 36.7 0:LIVING +TCGA-BH-A0BO 35.65 0:DiseaseFree 35.65 0:LIVING +TCGA-BH-A0BP 48.66 0:DiseaseFree 48.66 0:LIVING +TCGA-BH-A0BQ 27.14 0:DiseaseFree 27.14 0:LIVING +TCGA-BH-A0BR 53.62 0:DiseaseFree 53.62 0:LIVING +TCGA-BH-A0BS 53.88 0:DiseaseFree 53.88 0:LIVING +TCGA-BH-A0BT 45.53 0:DiseaseFree 45.53 0:LIVING +TCGA-BH-A0BV 49.9 0:DiseaseFree 49.9 0:LIVING +TCGA-BH-A0BW 11.66 0:DiseaseFree 11.66 0:LIVING +TCGA-BH-A0BZ 49.02 0:DiseaseFree 49.02 0:LIVING +TCGA-BH-A0C0 41.72 0:DiseaseFree 41.72 0:LIVING +TCGA-BH-A0C1 43.96 0:DiseaseFree 43.96 0:LIVING +TCGA-BH-A0C3 48.1 0:DiseaseFree 48.1 0:LIVING +TCGA-BH-A0C7 42.87 0:DiseaseFree 42.87 0:LIVING +TCGA-BH-A0DD 45.76 0:DiseaseFree 45.76 0:LIVING +TCGA-BH-A0DE 31.14 0:DiseaseFree 31.14 0:LIVING +TCGA-BH-A0DG 23.42 0:DiseaseFree 23.42 0:LIVING +TCGA-BH-A0DH 37.98 0:DiseaseFree 37.98 0:LIVING +TCGA-BH-A0DI 22.11 0:DiseaseFree 22.11 0:LIVING +TCGA-BH-A0DK 13.9 0:DiseaseFree 13.9 0:LIVING +TCGA-BH-A0DL 48.2 0:DiseaseFree 48.2 0:LIVING +TCGA-BH-A0DO 17.25 0:DiseaseFree 17.25 0:LIVING +TCGA-BH-A0DP 15.64 0:DiseaseFree 15.64 0:LIVING +TCGA-BH-A0DQ 3.22 0:DiseaseFree 3.22 0:LIVING +TCGA-BH-A0DS 2.53 0:DiseaseFree 2.53 0:LIVING +TCGA-BH-A0DT 38.44 0:DiseaseFree 38.44 0:LIVING +TCGA-BH-A0DV 45.14 0:DiseaseFree 45.14 0:LIVING +TCGA-BH-A0DX 47.37 0:DiseaseFree 47.37 0:LIVING +TCGA-BH-A0DZ 16.26 0:DiseaseFree 16.26 0:LIVING +TCGA-BH-A0E0 4.37 0:DiseaseFree 4.37 0:LIVING +TCGA-BH-A0E1 15.67 0:DiseaseFree 15.67 0:LIVING +TCGA-BH-A0E2 12.35 0:DiseaseFree 12.35 0:LIVING +TCGA-BH-A0E6 9.59 0:DiseaseFree 9.59 0:LIVING +TCGA-BH-A0E7 44.75 0:DiseaseFree 44.75 0:LIVING +TCGA-BH-A0E9 46.16 0:DiseaseFree 46.16 0:LIVING +TCGA-BH-A0EA 27.3 0:DiseaseFree 32.62 1:DECEASED +TCGA-BH-A0EB 24.48 0:DiseaseFree 24.48 0:LIVING +TCGA-BH-A0EE 30.98 0:DiseaseFree 30.98 0:LIVING +TCGA-BH-A0EI 24.41 0:DiseaseFree 24.41 0:LIVING +TCGA-BH-A0GY 30.13 0:DiseaseFree 30.13 0:LIVING +TCGA-BH-A0GZ 10.78 0:DiseaseFree 10.78 0:LIVING +TCGA-BH-A0H0 15.15 0:DiseaseFree 15.15 0:LIVING +TCGA-BH-A0H3 37.75 0:DiseaseFree 37.75 0:LIVING +TCGA-BH-A0H5 35.48 0:DiseaseFree 35.48 0:LIVING +TCGA-BH-A0H6 24.54 0:DiseaseFree 24.54 0:LIVING +TCGA-BH-A0H7 23.03 0:DiseaseFree 23.03 0:LIVING +TCGA-BH-A0H9 40.97 0:DiseaseFree 40.97 0:LIVING +TCGA-BH-A0HA 28.12 0:DiseaseFree 28.12 0:LIVING +TCGA-BH-A0HB 26.48 0:DiseaseFree 26.48 0:LIVING +TCGA-BH-A0HF 23.88 0:DiseaseFree 23.88 0:LIVING +TCGA-BH-A0HI 20.34 0:DiseaseFree 20.34 0:LIVING +TCGA-BH-A0HK 5.85 0:DiseaseFree 5.85 0:LIVING +TCGA-BH-A0HL 2.37 0:DiseaseFree 2.37 0:LIVING +TCGA-BH-A0HN 16.95 0:DiseaseFree 16.95 0:LIVING +TCGA-BH-A0HO 2.5 0:DiseaseFree 2.5 0:LIVING +TCGA-BH-A0HP 13.6 0:DiseaseFree 13.6 0:LIVING +TCGA-BH-A0HQ 36.83 0:DiseaseFree 36.83 0:LIVING +TCGA-BH-A0HU 12.88 0:DiseaseFree 12.88 0:LIVING +TCGA-BH-A0HW 51.25 0:DiseaseFree 51.25 0:LIVING +TCGA-BH-A0HX 27.24 0:DiseaseFree 27.24 0:LIVING +TCGA-BH-A0HY 28.48 0:DiseaseFree 28.48 0:LIVING +TCGA-BH-A0RX 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-BH-A0W3 5.91 0:DiseaseFree 5.91 0:LIVING +TCGA-BH-A0W4 5.75 0:DiseaseFree 5.75 0:LIVING +TCGA-BH-A0W5 17.84 0:DiseaseFree 17.84 0:LIVING +TCGA-BH-A0W7 18.33 0:DiseaseFree 18.33 0:LIVING +TCGA-BH-A0WA 12.22 0:DiseaseFree 12.22 0:LIVING +TCGA-BH-A18F 8.8 0:DiseaseFree 8.8 0:LIVING +TCGA-BH-A18G 2 0:DiseaseFree 2 0:LIVING +TCGA-BH-A18H 0 0:DiseaseFree 0 0:LIVING +TCGA-BH-A18I 7.23 0:DiseaseFree 7.23 0:LIVING +TCGA-BH-A18J 1:Recurred/Progressed 20.07 1:DECEASED +TCGA-BH-A18K 1:Recurred/Progressed 90.74 1:DECEASED +TCGA-BH-A18L 26.64 1:DECEASED +TCGA-BH-A18M 72.51 1:DECEASED +TCGA-BH-A18N 37.72 1:DECEASED +TCGA-BH-A18P 1:Recurred/Progressed 30.26 1:DECEASED +TCGA-BH-A18Q 55.59 1:DECEASED +TCGA-BH-A18R 36.11 0:DiseaseFree 37.49 1:DECEASED +TCGA-BH-A18S 66 0:DiseaseFree 66 1:DECEASED +TCGA-BH-A18T 1:Recurred/Progressed 7.36 1:DECEASED +TCGA-BH-A18U 43.27 0:DiseaseFree 51.35 1:DECEASED +TCGA-BH-A18V 51.09 1:DECEASED +TCGA-BH-A1EN 0:DiseaseFree 67.42 1:DECEASED +TCGA-BH-A1EO 0:DiseaseFree 91.92 1:DECEASED +TCGA-BH-A1ES 1:Recurred/Progressed 113.74 1:DECEASED +TCGA-BH-A1ET 0:DiseaseFree 82.79 1:DECEASED +TCGA-BH-A1EU 0:DiseaseFree 42.25 1:DECEASED +TCGA-BH-A1EV 1:Recurred/Progressed 11.99 1:DECEASED +TCGA-BH-A1EW 1:Recurred/Progressed 55.65 1:DECEASED +TCGA-BH-A1EX 1:Recurred/Progressed 49.54 1:DECEASED +TCGA-BH-A1EY 1:Recurred/Progressed 17.68 1:DECEASED +TCGA-BH-A1F0 1:Recurred/Progressed 25.79 1:DECEASED +TCGA-BH-A1F2 0:DiseaseFree 31.51 1:DECEASED +TCGA-BH-A1F5 0:DiseaseFree 89.1 1:DECEASED +TCGA-BH-A1F6 97.41 1:DECEASED +TCGA-BH-A1F8 1:Recurred/Progressed 24.61 1:DECEASED +TCGA-BH-A1FB 1:Recurred/Progressed 120.54 1:DECEASED +TCGA-BH-A1FC 0:DiseaseFree 114.03 1:DECEASED +TCGA-BH-A1FD 1:Recurred/Progressed 33.12 1:DECEASED +TCGA-BH-A1FE 1:Recurred/Progressed 74.68 1:DECEASED +TCGA-BH-A1FG 122.81 1:DECEASED +TCGA-BH-A1FH 1:Recurred/Progressed 36.89 1:DECEASED +TCGA-BH-A1FJ 63.31 1:DECEASED +TCGA-BH-A1FL 1:Recurred/Progressed 54.96 1:DECEASED +TCGA-BH-A1FM 45.6 1:DECEASED +TCGA-BH-A1FN 1:Recurred/Progressed 72.01 1:DECEASED +TCGA-BH-A1FR 1:Recurred/Progressed 144.49 1:DECEASED +TCGA-BH-A1FU 1:Recurred/Progressed 72.01 1:DECEASED +TCGA-BH-A201 6.87 0:DiseaseFree 6.87 0:LIVING +TCGA-BH-A202 0.72 0:DiseaseFree 0.72 0:LIVING +TCGA-BH-A203 +TCGA-BH-A204 +TCGA-BH-A208 +TCGA-BH-A209 +TCGA-BH-A28Q +TCGA-C8-A12K 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12L 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12M 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12N 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12O 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12P 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Q 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12T 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12U 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12V 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12W 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12X 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Y 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Z 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A130 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A131 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A132 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A133 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A134 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A135 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A137 0.1 0:DiseaseFree 0.1 0:LIVING +TCGA-C8-A138 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-C8-A1HE 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HF 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HG 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HI 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-C8-A1HJ 0.16 0:DiseaseFree 0.16 0:LIVING +TCGA-C8-A1HK 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-C8-A1HL 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-C8-A1HM 0.2 0:DiseaseFree 0.2 0:LIVING +TCGA-C8-A1HN 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-C8-A1HO 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A26V 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-C8-A26W 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-C8-A26X 0.36 0:DiseaseFree 0.36 0:LIVING +TCGA-C8-A26Y 0.43 0:DiseaseFree 0.43 0:LIVING +TCGA-C8-A26Z 0.13 0:DiseaseFree 0.13 0:LIVING +TCGA-C8-A273 0.2 0:DiseaseFree 0.2 0:LIVING +TCGA-C8-A274 0.03 0:DiseaseFree 0.03 0:LIVING +TCGA-C8-A275 0.03 0:DiseaseFree 0.03 0:LIVING +TCGA-C8-A278 0.03 0:DiseaseFree 0.03 0:LIVING +TCGA-C8-A27A 12.19 0:DiseaseFree 12.19 0:LIVING +TCGA-C8-A27B 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-D8-A13Y 8.67 0:DiseaseFree 8.67 0:LIVING +TCGA-D8-A13Z 6.9 0:DiseaseFree 6.9 0:LIVING +TCGA-D8-A140 0.89 0:DiseaseFree 0.89 0:LIVING +TCGA-D8-A141 3.71 0:DiseaseFree 3.71 0:LIVING +TCGA-D8-A142 2 0:DiseaseFree 2 0:LIVING +TCGA-D8-A143 5.65 0:DiseaseFree 5.65 0:LIVING +TCGA-D8-A145 1.61 0:DiseaseFree 1.61 0:LIVING +TCGA-D8-A146 11.3 0:DiseaseFree 11.3 0:LIVING +TCGA-D8-A147 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-D8-A1J8 8.41 0:DiseaseFree 8.41 0:LIVING +TCGA-D8-A1J9 8.15 0:DiseaseFree 8.15 0:LIVING +TCGA-D8-A1JA 0.59 0:DiseaseFree 0.59 0:LIVING +TCGA-D8-A1JB 0 0:DiseaseFree 0 0:LIVING +TCGA-D8-A1JC 5.85 0:DiseaseFree 5.85 0:LIVING +TCGA-D8-A1JD 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-D8-A1JE 1.87 0:DiseaseFree 1.87 0:LIVING +TCGA-D8-A1JF 3.15 0:DiseaseFree 3.15 0:LIVING +TCGA-D8-A1JG 6.14 0:DiseaseFree 6.14 0:LIVING +TCGA-D8-A1JH 9.33 0:DiseaseFree 9.33 0:LIVING +TCGA-D8-A1JI 0.69 0:DiseaseFree 0.69 0:LIVING +TCGA-D8-A1JJ 9 0:DiseaseFree 9 0:LIVING +TCGA-D8-A1JK 3.58 0:DiseaseFree 3.58 0:LIVING +TCGA-D8-A1JL 8.71 0:DiseaseFree 8.71 0:LIVING +TCGA-D8-A1JM 7.82 0:DiseaseFree 7.82 0:LIVING +TCGA-D8-A1JN 7.13 0:DiseaseFree 7.13 0:LIVING +TCGA-D8-A1JP 5.49 0:DiseaseFree 5.49 0:LIVING +TCGA-D8-A1JS 3.45 0:DiseaseFree 3.45 0:LIVING +TCGA-D8-A1JT 4.04 0:DiseaseFree 4.04 0:LIVING +TCGA-D8-A1JU 3.48 0:DiseaseFree 3.48 0:LIVING +TCGA-D8-A1X5 5.62 0:DiseaseFree 5.62 0:LIVING +TCGA-D8-A1X6 7.75 0:DiseaseFree 7.75 0:LIVING +TCGA-D8-A1X7 2.79 0:DiseaseFree 2.79 0:LIVING +TCGA-D8-A1X8 8.94 0:DiseaseFree 8.94 0:LIVING +TCGA-D8-A1X9 12.48 0:DiseaseFree 12.48 0:LIVING +TCGA-D8-A1XA 9 0:DiseaseFree 9 0:LIVING +TCGA-D8-A1XB 6.6 0:DiseaseFree 6.6 0:LIVING +TCGA-D8-A1XC 2.66 0:DiseaseFree 2.66 0:LIVING +TCGA-D8-A1XD 5.09 0:DiseaseFree 5.09 0:LIVING +TCGA-D8-A1XF 6.47 0:DiseaseFree 6.47 0:LIVING +TCGA-D8-A1XG 6.44 0:DiseaseFree 6.44 0:LIVING +TCGA-D8-A1XJ 11.56 0:DiseaseFree 11.56 0:LIVING +TCGA-D8-A1XK 10.71 0:DiseaseFree 10.71 0:LIVING +TCGA-D8-A1XL 10.48 0:DiseaseFree 10.48 0:LIVING +TCGA-D8-A1XM 7.16 0:DiseaseFree 7.16 0:LIVING +TCGA-D8-A1XO 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-D8-A1XQ 5.82 0:DiseaseFree 5.82 0:LIVING +TCGA-D8-A1XR 5.52 0:DiseaseFree 5.52 0:LIVING +TCGA-D8-A1XS 0.59 0:DiseaseFree 0.59 0:LIVING +TCGA-D8-A1XT 6.34 0:DiseaseFree 6.34 0:LIVING +TCGA-D8-A1XU 4.9 0:DiseaseFree 4.9 0:LIVING +TCGA-D8-A1XV 4.8 0:DiseaseFree 4.8 0:LIVING +TCGA-D8-A1XW 3.84 0:DiseaseFree 3.84 0:LIVING +TCGA-D8-A1XY 2.66 0:DiseaseFree 2.66 0:LIVING +TCGA-D8-A1XZ 3.94 0:DiseaseFree 3.94 0:LIVING +TCGA-D8-A1Y0 5.45 0:DiseaseFree 5.45 0:LIVING +TCGA-D8-A1Y1 3.78 0:DiseaseFree 3.78 0:LIVING +TCGA-D8-A1Y2 2.37 0:DiseaseFree 2.37 0:LIVING +TCGA-D8-A1Y3 4.07 0:DiseaseFree 4.07 0:LIVING +TCGA-D8-A27E 5.98 0:DiseaseFree 5.98 0:LIVING +TCGA-D8-A27F 7.46 0:DiseaseFree 7.46 0:LIVING +TCGA-D8-A27G 6.87 0:DiseaseFree 6.87 0:LIVING +TCGA-D8-A27H 4.6 0:DiseaseFree 4.6 0:LIVING +TCGA-D8-A27I 6.08 0:DiseaseFree 6.08 0:LIVING +TCGA-D8-A27K 3.88 0:DiseaseFree 3.88 0:LIVING +TCGA-D8-A27L 4.11 0:DiseaseFree 4.11 0:LIVING +TCGA-D8-A27M 4.73 0:DiseaseFree 4.73 0:LIVING +TCGA-D8-A27N 4.76 0:DiseaseFree 4.76 0:LIVING +TCGA-D8-A27P 0.72 0:DiseaseFree 0.72 0:LIVING +TCGA-D8-A27R 2.96 0:DiseaseFree 2.96 0:LIVING +TCGA-D8-A27T 4.44 0:DiseaseFree 4.44 0:LIVING +TCGA-D8-A27V 2.4 0:DiseaseFree 2.4 0:LIVING +TCGA-D8-A27W 0.49 0:DiseaseFree 0.49 0:LIVING +TCGA-E2-A105 38.21 0:DiseaseFree 38.21 0:LIVING +TCGA-E2-A106 51.09 0:DiseaseFree 51.09 0:LIVING +TCGA-E2-A107 1:Recurred/Progressed 25.07 0:LIVING +TCGA-E2-A108 4.07 0:DiseaseFree 4.07 0:LIVING +TCGA-E2-A109 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-E2-A10A 1:Recurred/Progressed 11.56 0:LIVING +TCGA-E2-A10B 24.57 0:DiseaseFree 24.57 0:LIVING +TCGA-E2-A10C 28.02 0:DiseaseFree 28.02 0:LIVING +TCGA-E2-A10E 13.73 0:DiseaseFree 13.73 0:LIVING +TCGA-E2-A10F 11.83 0:DiseaseFree 11.83 0:LIVING +TCGA-E2-A14N 44.35 0:DiseaseFree 44.35 0:LIVING +TCGA-E2-A14O 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-E2-A14P 16 0:DiseaseFree 16 0:LIVING +TCGA-E2-A14Q 32 0:DiseaseFree 32 0:LIVING +TCGA-E2-A14R 27.76 0:DiseaseFree 27.76 0:LIVING +TCGA-E2-A14S 27.4 0:DiseaseFree 27.4 0:LIVING +TCGA-E2-A14T 29.24 0:DiseaseFree 29.24 0:LIVING +TCGA-E2-A14V 24.57 0:DiseaseFree 24.57 0:LIVING +TCGA-E2-A14W 27.37 0:DiseaseFree 27.37 0:LIVING +TCGA-E2-A14X 22.73 0:DiseaseFree 22.73 0:LIVING +TCGA-E2-A14Y 22.6 0:DiseaseFree 22.6 0:LIVING +TCGA-E2-A14Z 1:Recurred/Progressed 17.02 0:LIVING +TCGA-E2-A150 19.42 0:DiseaseFree 19.42 0:LIVING +TCGA-E2-A152 1:Recurred/Progressed 19.32 0:LIVING +TCGA-E2-A153 19.25 0:DiseaseFree 19.25 0:LIVING +TCGA-E2-A154 10.68 0:DiseaseFree 10.68 0:LIVING +TCGA-E2-A155 18.17 0:DiseaseFree 18.17 0:LIVING +TCGA-E2-A156 15.8 0:DiseaseFree 15.8 0:LIVING +TCGA-E2-A158 14.78 0:DiseaseFree 14.78 0:LIVING +TCGA-E2-A159 16.92 0:DiseaseFree 16.92 0:LIVING +TCGA-E2-A15A 16.49 0:DiseaseFree 16.49 0:LIVING +TCGA-E2-A15C 16.3 0:DiseaseFree 16.3 0:LIVING +TCGA-E2-A15D 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15E 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-E2-A15F 15.38 0:DiseaseFree 15.38 0:LIVING +TCGA-E2-A15G 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15H 1.38 0:DiseaseFree 1.38 0:LIVING +TCGA-E2-A15I 13.5 0:DiseaseFree 13.5 0:LIVING +TCGA-E2-A15J 15.21 0:DiseaseFree 15.21 0:LIVING +TCGA-E2-A15K 1.12 0:DiseaseFree 1.12 0:LIVING +TCGA-E2-A15L 10.87 0:DiseaseFree 10.87 0:LIVING +TCGA-E2-A15M 7.69 0:DiseaseFree 7.69 0:LIVING +TCGA-E2-A15O 12.98 0:DiseaseFree 12.98 0:LIVING +TCGA-E2-A15P 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15R 10.84 0:DiseaseFree 10.84 0:LIVING +TCGA-E2-A15S 9 0:DiseaseFree 9 0:LIVING +TCGA-E2-A15T 8.77 0:DiseaseFree 8.77 0:LIVING +TCGA-E2-A1AZ 64.52 0:DiseaseFree 64.52 0:LIVING +TCGA-E2-A1B0 41.76 0:DiseaseFree 41.76 0:LIVING +TCGA-E2-A1B1 44.71 0:DiseaseFree 44.71 0:LIVING +TCGA-E2-A1B4 29.93 0:DiseaseFree 29.93 0:LIVING +TCGA-E2-A1B5 25.43 0:DiseaseFree 25.43 0:LIVING +TCGA-E2-A1B6 11.1 0:DiseaseFree 11.1 0:LIVING +TCGA-E2-A1BC 9.76 0:DiseaseFree 9.76 0:LIVING +TCGA-E2-A1BD 10.41 0:DiseaseFree 10.41 0:LIVING +TCGA-E2-A1IE 32.29 0:DiseaseFree 32.29 0:LIVING +TCGA-E2-A1IF 31.41 0:DiseaseFree 31.41 0:LIVING +TCGA-E2-A1IG 24.8 0:DiseaseFree 24.8 0:LIVING +TCGA-E2-A1IH 21.62 0:DiseaseFree 21.62 0:LIVING +TCGA-E2-A1II 27.93 0:DiseaseFree 27.93 0:LIVING +TCGA-E2-A1IJ 23.82 0:DiseaseFree 23.82 0:LIVING +TCGA-E2-A1IK 17.02 0:DiseaseFree 17.02 0:LIVING +TCGA-E2-A1IL 0.46 0:DiseaseFree 0.46 0:LIVING +TCGA-E2-A1IN 12.88 0:DiseaseFree 12.88 0:LIVING +TCGA-E2-A1IO 14.72 0:DiseaseFree 14.72 0:LIVING +TCGA-E2-A1IP 14.03 0:DiseaseFree 14.03 0:LIVING +TCGA-E2-A1IU 4.17 0:DiseaseFree 4.17 0:LIVING +TCGA-E2-A1L6 43.1 0:DiseaseFree 43.1 0:LIVING +TCGA-E2-A1L7 20.8 0:DiseaseFree 20.8 0:LIVING +TCGA-E2-A1L8 33.35 0:DiseaseFree 33.35 0:LIVING +TCGA-E2-A1L9 12.75 0:DiseaseFree 12.75 0:LIVING +TCGA-E2-A1LA 15.21 0:DiseaseFree 15.21 0:LIVING +TCGA-E2-A1LB 31.93 0:DiseaseFree 31.93 0:LIVING +TCGA-E2-A1LG 11.5 0:DiseaseFree 11.5 0:LIVING +TCGA-E2-A1LH 94.45 0:DiseaseFree 94.45 0:LIVING +TCGA-E2-A1LI 90.35 0:DiseaseFree 90.35 0:LIVING +TCGA-E2-A1LK 1:Recurred/Progressed 8.74 1:DECEASED +TCGA-E2-A1LL 33.31 0:DiseaseFree 33.31 0:LIVING +TCGA-E2-A1LS 7.85 0:DiseaseFree 7.85 0:LIVING +TCGA-E9-A1N3 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1N4 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1N5 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1N6 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1N8 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1N9 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NA 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NC 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1ND 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NE 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NF 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NG 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NH 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1NI 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1QZ 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1R0 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A1R2 0.62 0:DiseaseFree 0.62 0:LIVING +TCGA-E9-A1R3 2.1 0:DiseaseFree 2.1 0:LIVING +TCGA-E9-A1R4 0.95 0:DiseaseFree 0.95 0:LIVING +TCGA-E9-A1R5 1.38 0:DiseaseFree 1.38 0:LIVING +TCGA-E9-A1R6 2.76 0:DiseaseFree 2.76 0:LIVING +TCGA-E9-A1R7 1.12 0:DiseaseFree 1.12 0:LIVING +TCGA-E9-A1RA 0.95 0:DiseaseFree 0.95 0:LIVING +TCGA-E9-A1RB 0.69 0:DiseaseFree 0.69 0:LIVING +TCGA-E9-A1RC 40.34 0:DiseaseFree 40.34 0:LIVING +TCGA-E9-A1RD 0.66 0:DiseaseFree 0.66 0:LIVING +TCGA-E9-A1RE 1.54 0:DiseaseFree 1.54 0:LIVING +TCGA-E9-A1RF 1.25 0:DiseaseFree 1.25 0:LIVING +TCGA-E9-A1RG 1.15 0:DiseaseFree 1.15 0:LIVING +TCGA-E9-A1RH 0.46 0:DiseaseFree 0.46 0:LIVING +TCGA-E9-A1RI 1.58 0:DiseaseFree 1.58 0:LIVING +TCGA-E9-A226 0.53 0:DiseaseFree 0.53 0:LIVING +TCGA-E9-A227 0.79 0:DiseaseFree 0.79 0:LIVING +TCGA-E9-A228 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A229 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22A 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22B 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22D 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22E 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22G 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A22H 0 0:DiseaseFree 0 0:LIVING +TCGA-E9-A243 1.41 0:DiseaseFree 1.41 0:LIVING +TCGA-E9-A244 0.66 0:DiseaseFree 0.66 0:LIVING +TCGA-E9-A245 0.82 0:DiseaseFree 0.82 0:LIVING +TCGA-E9-A247 0.39 0:DiseaseFree 0.39 0:LIVING +TCGA-E9-A248 0.69 0:DiseaseFree 0.69 0:LIVING +TCGA-E9-A249 0.92 0:DiseaseFree 0.92 0:LIVING +TCGA-E9-A24A 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-E9-A295 +TCGA-EW-A1IW 8.28 0:DiseaseFree 8.28 0:LIVING +TCGA-EW-A1IX 35.55 0:DiseaseFree 35.55 0:LIVING +TCGA-EW-A1IY 8.48 0:DiseaseFree 8.48 0:LIVING +TCGA-EW-A1IZ 8.54 0:DiseaseFree 8.54 0:LIVING +TCGA-EW-A1J1 9.26 0:DiseaseFree 9.26 0:LIVING +TCGA-EW-A1J2 4.57 0:DiseaseFree 4.57 0:LIVING +TCGA-EW-A1J3 8.28 0:DiseaseFree 8.28 0:LIVING +TCGA-EW-A1J5 7.46 0:DiseaseFree 7.46 0:LIVING +TCGA-EW-A1J6 19.55 0:DiseaseFree 19.55 0:LIVING +TCGA-EW-A1OV 17.15 0:DiseaseFree 17.15 0:LIVING +TCGA-EW-A1OW 15.21 0:DiseaseFree 15.21 0:LIVING +TCGA-EW-A1OX 18.46 0:DiseaseFree 18.46 0:LIVING +TCGA-EW-A1OY 19.48 0:DiseaseFree 19.48 0:LIVING +TCGA-EW-A1OZ 30.91 0:DiseaseFree 30.91 0:LIVING +TCGA-EW-A1P0 1:Recurred/Progressed 36.83 0:LIVING +TCGA-EW-A1P1 1:Recurred/Progressed 30.19 0:LIVING +TCGA-EW-A1P3 32.43 0:DiseaseFree 32.43 0:LIVING +TCGA-EW-A1P4 16.46 0:DiseaseFree 16.46 0:LIVING +TCGA-EW-A1P5 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-EW-A1P6 10.25 0:DiseaseFree 10.25 0:LIVING +TCGA-EW-A1P7 20.86 0:DiseaseFree 20.86 0:LIVING +TCGA-EW-A1P8 1:Recurred/Progressed 7.85 1:DECEASED +TCGA-EW-A1PA 8.77 0:DiseaseFree 8.77 0:LIVING +TCGA-EW-A1PB 19.97 0:DiseaseFree 19.97 0:LIVING +TCGA-EW-A1PD 5.72 0:DiseaseFree 5.72 0:LIVING +TCGA-EW-A1PE 4.57 0:DiseaseFree 4.57 0:LIVING +TCGA-EW-A1PF 4.57 0:DiseaseFree 4.57 0:LIVING +TCGA-EW-A1PG 28.75 0:DiseaseFree 28.75 0:LIVING +TCGA-EW-A1PH 4.57 0:DiseaseFree 4.57 0:LIVING +TCGA-EW-A2FS +TCGA-EW-A2FV +TCGA-EW-A2FW +TCGA-GI-A2C8 +TCGA-GM-A2D9 1:Recurred/Progressed 59.53 1:DECEASED +TCGA-GM-A2DA 1:Recurred/Progressed 194.13 0:LIVING +TCGA-GM-A2DB 53.06 0:DiseaseFree 53.06 0:LIVING +TCGA-GM-A2DC 53.49 0:DiseaseFree 53.49 0:LIVING +TCGA-GM-A2DD 43.01 0:DiseaseFree 43.01 0:LIVING +TCGA-GM-A2DF 42.68 0:DiseaseFree 42.68 0:LIVING +TCGA-GM-A2DH 42.25 0:DiseaseFree 42.25 0:LIVING +TCGA-GM-A2DI 61.86 0:DiseaseFree 61.86 0:LIVING +TCGA-GM-A2DK 62.29 0:DiseaseFree 62.29 0:LIVING +TCGA-GM-A2DL 90.74 0:DiseaseFree 90.74 0:LIVING +TCGA-GM-A2DM 76.58 0:DiseaseFree 76.58 0:LIVING +TCGA-GM-A2DN 77.27 0:DiseaseFree 77.27 0:LIVING +TCGA-GM-A2DO 53.29 0:DiseaseFree 53.29 0:LIVING +TEST_PATIENT_1 +TEST_PATIENT_10 +TEST_PATIENT_11 +TEST_PATIENT_12 +TEST_PATIENT_13 +TEST_PATIENT_14 +TEST_PATIENT_15 +TEST_PATIENT_2 +TEST_PATIENT_3 +TEST_PATIENT_4 +TEST_PATIENT_5 +TEST_PATIENT_6 +TEST_PATIENT_7 +TEST_PATIENT_8 +TEST_PATIENT_9 +TEST_PATIENT_NAMESPACE +TEST-A23C 0.95 0:DiseaseFree 0.95 0:LIVING +TEST-A23E 2.37 0:DiseaseFree 2.37 0:LIVING +TEST-A23H 2.66 0:DiseaseFree 2.66 0:LIVING +TEST-A2B8 +TEST-A2FB +TEST-A2FF +TEST-A2FG diff --git a/test/test_data/study_es_0_import_export/data_clinical_samples.txt b/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt similarity index 67% rename from test/test_data/study_es_0_import_export/data_clinical_samples.txt rename to test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt index fd22eb7b077..4451faa17f2 100644 --- a/test/test_data/study_es_0_import_export/data_clinical_samples.txt +++ b/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt @@ -3,521 +3,848 @@ #STRING STRING STRING #1 1 1 PATIENT_ID SAMPLE_ID SUBTYPE -TCGA-A2-A0EQ TCGA-A2-A0EQ-01 Her2 enriched -TCGA-BH-A18R TCGA-BH-A18R-01 Her2 enriched -TCGA-BH-A0B8 TCGA-BH-A0B8-01 Luminal A -TCGA-BH-A0AW TCGA-BH-A0AW-01 Her2 enriched -TCGA-AO-A03M TCGA-AO-A03M-01 Luminal A -TCGA-A8-A06T TCGA-A8-A06T-01 Luminal A -TCGA-A8-A075 TCGA-A8-A075-01 Her2 enriched -TCGA-E2-A10B TCGA-E2-A10B-01 Luminal A +TCGA-A1-A0SB TCGA-A1-A0SB-01 +TCGA-A1-A0SB TCGA-A1-A0SB-02 +TCGA-A1-A0SD TCGA-A1-A0SD-01 Luminal A +TCGA-A1-A0SE TCGA-A1-A0SE-01 Luminal A +TCGA-A1-A0SF TCGA-A1-A0SF-01 +TCGA-A1-A0SG TCGA-A1-A0SG-01 +TCGA-A1-A0SH TCGA-A1-A0SH-01 Luminal A +TCGA-A1-A0SI TCGA-A1-A0SI-01 +TCGA-A1-A0SJ TCGA-A1-A0SJ-01 Luminal A +TCGA-A1-A0SK TCGA-A1-A0SK-01 basal-like +TCGA-A1-A0SM TCGA-A1-A0SM-01 Luminal B +TCGA-A1-A0SN TCGA-A1-A0SN-01 +TCGA-A1-A0SO TCGA-A1-A0SO-01 basal-like +TCGA-A1-A0SP TCGA-A1-A0SP-01 +TCGA-A1-A0SQ TCGA-A1-A0SQ-01 +TCGA-A2-A04N TCGA-A2-A04N-01 Luminal A +TCGA-A2-A04P TCGA-A2-A04P-01 basal-like +TCGA-A2-A04Q TCGA-A2-A04Q-01 basal-like +TCGA-A2-A04R TCGA-A2-A04R-01 Luminal B +TCGA-A2-A04T TCGA-A2-A04T-01 +TCGA-A2-A04U TCGA-A2-A04U-01 +TCGA-A2-A04V TCGA-A2-A04V-01 Luminal A +TCGA-A2-A04W TCGA-A2-A04W-01 Her2 enriched +TCGA-A2-A04X TCGA-A2-A04X-01 Her2 enriched +TCGA-A2-A04Y TCGA-A2-A04Y-01 Luminal A +TCGA-A2-A0CL TCGA-A2-A0CL-01 Her2 enriched +TCGA-A2-A0CM TCGA-A2-A0CM-01 basal-like +TCGA-A2-A0CP TCGA-A2-A0CP-01 Luminal A +TCGA-A2-A0CQ TCGA-A2-A0CQ-01 Luminal A +TCGA-A2-A0CS TCGA-A2-A0CS-01 Luminal A +TCGA-A2-A0CT TCGA-A2-A0CT-01 Luminal B +TCGA-A2-A0CU TCGA-A2-A0CU-01 Luminal A TCGA-A2-A0CV TCGA-A2-A0CV-01 Luminal A +TCGA-A2-A0CW TCGA-A2-A0CW-01 Luminal B +TCGA-A2-A0CX TCGA-A2-A0CX-01 Her2 enriched +TCGA-A2-A0CY TCGA-A2-A0CY-01 Her2 enriched +TCGA-A2-A0CZ TCGA-A2-A0CZ-01 Luminal A +TCGA-A2-A0D0 TCGA-A2-A0D0-01 basal-like +TCGA-A2-A0D1 TCGA-A2-A0D1-01 Her2 enriched +TCGA-A2-A0D2 TCGA-A2-A0D2-01 basal-like +TCGA-A2-A0D3 TCGA-A2-A0D3-01 Luminal A +TCGA-A2-A0D4 TCGA-A2-A0D4-01 Luminal B +TCGA-A2-A0EM TCGA-A2-A0EM-01 Luminal A +TCGA-A2-A0EN TCGA-A2-A0EN-01 Luminal A +TCGA-A2-A0EO TCGA-A2-A0EO-01 Luminal A +TCGA-A2-A0EQ TCGA-A2-A0EQ-01 Her2 enriched +TCGA-A2-A0ER TCGA-A2-A0ER-01 Luminal B +TCGA-A2-A0ES TCGA-A2-A0ES-01 Luminal A +TCGA-A2-A0ET TCGA-A2-A0ET-01 Luminal A +TCGA-A2-A0EU TCGA-A2-A0EU-01 Luminal A +TCGA-A2-A0EV TCGA-A2-A0EV-01 Luminal A +TCGA-A2-A0EW TCGA-A2-A0EW-01 Luminal A +TCGA-A2-A0EX TCGA-A2-A0EX-01 Luminal A TCGA-A2-A0EY TCGA-A2-A0EY-01 Luminal B -TCGA-BH-A18J TCGA-BH-A18J-01 Luminal B -TCGA-B6-A0IK TCGA-B6-A0IK-01 Her2 enriched -TCGA-AQ-A04J TCGA-AQ-A04J-01 basal-like -TCGA-E2-A15J TCGA-E2-A15J-01 Luminal A -TCGA-BH-A0DT TCGA-BH-A0DT-01 Luminal A -TCGA-A2-A04V TCGA-A2-A04V-01 Luminal A -TCGA-BH-A1EW TCGA-BH-A1EW-01 Luminal B -TCGA-A8-A09Q TCGA-A8-A09Q-01 Luminal B +TCGA-A2-A0ST TCGA-A2-A0ST-01 basal-like +TCGA-A2-A0SU TCGA-A2-A0SU-01 Luminal A +TCGA-A2-A0SV TCGA-A2-A0SV-01 Luminal B +TCGA-A2-A0SW TCGA-A2-A0SW-01 Luminal B +TCGA-A2-A0SX TCGA-A2-A0SX-01 basal-like +TCGA-A2-A0SY TCGA-A2-A0SY-01 Luminal A TCGA-A2-A0T0 TCGA-A2-A0T0-01 basal-like -TCGA-AO-A124 TCGA-AO-A124-01 basal-like +TCGA-A2-A0T1 TCGA-A2-A0T1-01 Her2 enriched +TCGA-A2-A0T2 TCGA-A2-A0T2-01 +TCGA-A2-A0T3 TCGA-A2-A0T3-01 Luminal B +TCGA-A2-A0T4 TCGA-A2-A0T4-01 Luminal B +TCGA-A2-A0T5 TCGA-A2-A0T5-01 Luminal A +TCGA-A2-A0T6 TCGA-A2-A0T6-01 Luminal A +TCGA-A2-A0T7 TCGA-A2-A0T7-01 Luminal A +TCGA-A2-A0YC TCGA-A2-A0YC-01 Luminal A +TCGA-A2-A0YD TCGA-A2-A0YD-01 Luminal A +TCGA-A2-A0YE TCGA-A2-A0YE-01 +TCGA-A2-A0YF TCGA-A2-A0YF-01 Luminal A +TCGA-A2-A0YG TCGA-A2-A0YG-01 Luminal B +TCGA-A2-A0YH TCGA-A2-A0YH-01 Luminal B TCGA-A2-A0YI TCGA-A2-A0YI-01 Luminal A -TCGA-B6-A0IC TCGA-B6-A0IC-01 Luminal B -TCGA-AN-A0XR TCGA-AN-A0XR-01 Luminal B -TCGA-E2-A15R TCGA-E2-A15R-01 Luminal A -TCGA-A2-A04N TCGA-A2-A04N-01 Luminal A +TCGA-A2-A0YJ TCGA-A2-A0YJ-01 +TCGA-A2-A0YK TCGA-A2-A0YK-01 +TCGA-A2-A0YL TCGA-A2-A0YL-01 Luminal A +TCGA-A2-A0YM TCGA-A2-A0YM-01 basal-like +TCGA-A2-A0YT TCGA-A2-A0YT-01 Luminal B +TCGA-A2-A1FV TCGA-A2-A1FV-01 +TCGA-A2-A1FW TCGA-A2-A1FW-01 +TCGA-A2-A1FX TCGA-A2-A1FX-01 +TCGA-A2-A1FZ TCGA-A2-A1FZ-01 +TCGA-A2-A1G0 TCGA-A2-A1G0-01 +TCGA-A2-A1G1 TCGA-A2-A1G1-01 +TCGA-A2-A1G4 TCGA-A2-A1G4-01 +TCGA-A2-A1G6 TCGA-A2-A1G6-01 +TCGA-A2-A259 TCGA-A2-A259-01 +TCGA-A2-A25A TCGA-A2-A25A-01 +TCGA-A2-A25B TCGA-A2-A25B-01 +TCGA-A2-A25C TCGA-A2-A25C-01 +TCGA-A2-A25D TCGA-A2-A25D-01 +TCGA-A2-A25E TCGA-A2-A25E-01 +TCGA-A2-A25F TCGA-A2-A25F-01 +TCGA-A7-A0CD TCGA-A7-A0CD-01 Luminal A +TCGA-A7-A0CE TCGA-A7-A0CE-01 basal-like +TCGA-A7-A0CG TCGA-A7-A0CG-01 Luminal A +TCGA-A7-A0CH TCGA-A7-A0CH-01 Luminal A +TCGA-A7-A0CJ TCGA-A7-A0CJ-01 Luminal B +TCGA-A7-A0D9 TCGA-A7-A0D9-01 Luminal A +TCGA-A7-A0DA TCGA-A7-A0DA-01 basal-like +TCGA-A7-A0DB TCGA-A7-A0DB-01 Luminal A +TCGA-A7-A0DC TCGA-A7-A0DC-01 Luminal A +TCGA-A7-A13D TCGA-A7-A13D-01 basal-like +TCGA-A7-A13E TCGA-A7-A13E-01 +TCGA-A7-A13F TCGA-A7-A13F-01 Luminal B +TCGA-A7-A13G TCGA-A7-A13G-01 +TCGA-A7-A26E TCGA-A7-A26E-01 +TCGA-A7-A26F TCGA-A7-A26F-01 +TCGA-A7-A26G TCGA-A7-A26G-01 +TCGA-A7-A26H TCGA-A7-A26H-01 +TCGA-A7-A26I TCGA-A7-A26I-01 +TCGA-A7-A26J TCGA-A7-A26J-01 +TCGA-A8-A06N TCGA-A8-A06N-01 Luminal B +TCGA-A8-A06O TCGA-A8-A06O-01 Luminal B +TCGA-A8-A06P TCGA-A8-A06P-01 Luminal A +TCGA-A8-A06Q TCGA-A8-A06Q-01 Luminal B +TCGA-A8-A06R TCGA-A8-A06R-01 Luminal B +TCGA-A8-A06T TCGA-A8-A06T-01 Luminal A +TCGA-A8-A06U TCGA-A8-A06U-01 Luminal A +TCGA-A8-A06X TCGA-A8-A06X-01 Luminal B +TCGA-A8-A06Y TCGA-A8-A06Y-01 Luminal A +TCGA-A8-A06Z TCGA-A8-A06Z-01 Luminal B +TCGA-A8-A075 TCGA-A8-A075-01 Her2 enriched +TCGA-A8-A076 TCGA-A8-A076-01 Her2 enriched +TCGA-A8-A079 TCGA-A8-A079-01 Luminal B +TCGA-A8-A07B TCGA-A8-A07B-01 Her2 enriched +TCGA-A8-A07C TCGA-A8-A07C-01 basal-like TCGA-A8-A07E TCGA-A8-A07E-01 Luminal A -TCGA-BH-A1EO TCGA-BH-A1EO-01 Luminal A -TCGA-BH-A1F0 TCGA-BH-A1F0-01 basal-like -TCGA-AR-A0U4 TCGA-AR-A0U4-01 basal-like -TCGA-AR-A0TS TCGA-AR-A0TS-01 basal-like -TCGA-B6-A0I2 TCGA-B6-A0I2-01 basal-like -TCGA-BH-A0B0 TCGA-BH-A0B0-01 Luminal A -TCGA-E2-A1B6 TCGA-E2-A1B6-01 Luminal A -TCGA-AO-A0JI TCGA-AO-A0JI-01 Luminal B -TCGA-B6-A0WZ TCGA-B6-A0WZ-01 Luminal A -TCGA-BH-A0C1 TCGA-BH-A0C1-01 Luminal A -TCGA-BH-A0BP TCGA-BH-A0BP-01 Luminal A -TCGA-A2-A0SX TCGA-A2-A0SX-01 basal-like -TCGA-A8-A09I TCGA-A8-A09I-01 Luminal B -TCGA-BH-A0DK TCGA-BH-A0DK-01 Luminal A -TCGA-A8-A086 TCGA-A8-A086-01 Luminal A +TCGA-A8-A07F TCGA-A8-A07F-01 Luminal A +TCGA-A8-A07G TCGA-A8-A07G-01 Luminal A +TCGA-A8-A07I TCGA-A8-A07I-01 Her2 enriched +TCGA-A8-A07J TCGA-A8-A07J-01 Luminal A +TCGA-A8-A07L TCGA-A8-A07L-01 Luminal B +TCGA-A8-A07O TCGA-A8-A07O-01 basal-like +TCGA-A8-A07P TCGA-A8-A07P-01 Luminal A +TCGA-A8-A07R TCGA-A8-A07R-01 basal-like +TCGA-A8-A07S TCGA-A8-A07S-01 Luminal B TCGA-A8-A07U TCGA-A8-A07U-01 basal-like -TCGA-AO-A12E TCGA-AO-A12E-01 Luminal A -TCGA-A8-A09A TCGA-A8-A09A-01 Luminal A -TCGA-B6-A0RQ TCGA-B6-A0RQ-01 Luminal A -TCGA-A7-A0CJ TCGA-A7-A0CJ-01 Luminal B -TCGA-A8-A099 TCGA-A8-A099-01 Luminal A -TCGA-C8-A12P TCGA-C8-A12P-01 Her2 enriched -TCGA-A8-A08X TCGA-A8-A08X-01 Her2 enriched -TCGA-C8-A131 TCGA-C8-A131-01 basal-like -TCGA-D8-A146 TCGA-D8-A146-01 Luminal A -TCGA-AR-A1AW TCGA-AR-A1AW-01 Luminal A -TCGA-E2-A14Y TCGA-E2-A14Y-01 basal-like -TCGA-B6-A0RI TCGA-B6-A0RI-01 Luminal A -TCGA-AO-A0JA TCGA-AO-A0JA-01 Luminal A -TCGA-C8-A12X TCGA-C8-A12X-01 Luminal B +TCGA-A8-A07W TCGA-A8-A07W-01 Luminal B +TCGA-A8-A07Z TCGA-A8-A07Z-01 Luminal B +TCGA-A8-A081 TCGA-A8-A081-01 Her2 enriched +TCGA-A8-A082 TCGA-A8-A082-01 Luminal B +TCGA-A8-A083 TCGA-A8-A083-01 Luminal A +TCGA-A8-A084 TCGA-A8-A084-01 Luminal B +TCGA-A8-A085 TCGA-A8-A085-01 Luminal B +TCGA-A8-A086 TCGA-A8-A086-01 Luminal A +TCGA-A8-A08A TCGA-A8-A08A-01 Luminal A +TCGA-A8-A08B TCGA-A8-A08B-01 Her2 enriched +TCGA-A8-A08C TCGA-A8-A08C-01 Luminal A +TCGA-A8-A08F TCGA-A8-A08F-01 Luminal B +TCGA-A8-A08G TCGA-A8-A08G-01 Luminal B +TCGA-A8-A08H TCGA-A8-A08H-01 basal-like +TCGA-A8-A08I TCGA-A8-A08I-01 Luminal B +TCGA-A8-A08J TCGA-A8-A08J-01 Her2 enriched +TCGA-A8-A08L TCGA-A8-A08L-01 Her2 enriched +TCGA-A8-A08O TCGA-A8-A08O-01 Luminal A TCGA-A8-A08P TCGA-A8-A08P-01 Luminal B +TCGA-A8-A08R TCGA-A8-A08R-01 basal-like +TCGA-A8-A08S TCGA-A8-A08S-01 Luminal B +TCGA-A8-A08T TCGA-A8-A08T-01 Luminal A +TCGA-A8-A08X TCGA-A8-A08X-01 Her2 enriched +TCGA-A8-A08Z TCGA-A8-A08Z-01 Luminal A +TCGA-A8-A090 TCGA-A8-A090-01 Luminal A TCGA-A8-A091 TCGA-A8-A091-01 Luminal A -TCGA-BH-A0GY TCGA-BH-A0GY-01 Luminal A -TCGA-BH-A0HB TCGA-BH-A0HB-01 Luminal A -TCGA-A8-A08F TCGA-A8-A08F-01 Luminal B -TCGA-E2-A14Q TCGA-E2-A14Q-01 Luminal A -TCGA-E2-A152 TCGA-E2-A152-01 Her2 enriched -TCGA-AO-A0J9 TCGA-AO-A0J9-01 Luminal A -TCGA-AR-A1AO TCGA-AR-A1AO-01 Claudin low -TCGA-A2-A0ER TCGA-A2-A0ER-01 Luminal B -TCGA-E2-A15A TCGA-E2-A15A-01 Luminal B -TCGA-A2-A04W TCGA-A2-A04W-01 Her2 enriched -TCGA-BH-A18S TCGA-BH-A18S-01 Luminal A -TCGA-AO-A03N TCGA-AO-A03N-01 Her2 enriched -TCGA-A8-A06U TCGA-A8-A06U-01 Luminal A -TCGA-A8-A076 TCGA-A8-A076-01 Her2 enriched -TCGA-A2-A0CW TCGA-A2-A0CW-01 Luminal B -TCGA-BH-A0B7 TCGA-BH-A0B7-01 Her2 enriched -TCGA-BH-A0AV TCGA-BH-A0AV-01 basal-like -TCGA-E2-A10C TCGA-E2-A10C-01 Luminal B +TCGA-A8-A092 TCGA-A8-A092-01 Her2 enriched +TCGA-A8-A093 TCGA-A8-A093-01 Luminal A +TCGA-A8-A094 TCGA-A8-A094-01 Her2 enriched +TCGA-A8-A095 TCGA-A8-A095-01 Luminal B +TCGA-A8-A096 TCGA-A8-A096-01 Luminal B +TCGA-A8-A097 TCGA-A8-A097-01 Luminal B +TCGA-A8-A099 TCGA-A8-A099-01 Luminal A +TCGA-A8-A09A TCGA-A8-A09A-01 Luminal A +TCGA-A8-A09B TCGA-A8-A09B-01 Luminal A +TCGA-A8-A09C TCGA-A8-A09C-01 Luminal B +TCGA-A8-A09D TCGA-A8-A09D-01 Luminal B +TCGA-A8-A09E TCGA-A8-A09E-01 Luminal B +TCGA-A8-A09G TCGA-A8-A09G-01 Her2 enriched +TCGA-A8-A09I TCGA-A8-A09I-01 Luminal B +TCGA-A8-A09K TCGA-A8-A09K-01 Luminal B +TCGA-A8-A09M TCGA-A8-A09M-01 Luminal B +TCGA-A8-A09N TCGA-A8-A09N-01 Luminal B +TCGA-A8-A09Q TCGA-A8-A09Q-01 Luminal B +TCGA-A8-A09R TCGA-A8-A09R-01 Luminal B +TCGA-A8-A09T TCGA-A8-A09T-01 Luminal A +TCGA-A8-A09V TCGA-A8-A09V-01 Luminal A +TCGA-A8-A09W TCGA-A8-A09W-01 Luminal B +TCGA-A8-A09X TCGA-A8-A09X-01 Her2 enriched +TCGA-A8-A09Z TCGA-A8-A09Z-01 Luminal B +TCGA-A8-A0A1 TCGA-A8-A0A1-01 Luminal A +TCGA-A8-A0A2 TCGA-A8-A0A2-01 Luminal A TCGA-A8-A0A4 TCGA-A8-A0A4-01 Luminal A -TCGA-BH-A0HK TCGA-BH-A0HK-01 Luminal A -TCGA-E2-A15I TCGA-E2-A15I-01 Luminal A -TCGA-A7-A0DC TCGA-A7-A0DC-01 Luminal A -TCGA-AO-A03V TCGA-AO-A03V-01 Luminal A -TCGA-BH-A1EV TCGA-BH-A1EV-01 Her2 enriched -TCGA-BH-A18K TCGA-BH-A18K-01 basal-like -TCGA-BH-A0E6 TCGA-BH-A0E6-01 basal-like -TCGA-A2-A0D0 TCGA-A2-A0D0-01 basal-like +TCGA-A8-A0A6 TCGA-A8-A0A6-01 Luminal A +TCGA-A8-A0A7 TCGA-A8-A0A7-01 Her2 enriched +TCGA-A8-A0A9 TCGA-A8-A0A9-01 Luminal B +TCGA-A8-A0AB TCGA-A8-A0AB-01 Luminal B TCGA-A8-A0AD TCGA-A8-A0AD-01 Luminal A -TCGA-AR-A0TT TCGA-AR-A0TT-01 Luminal B -TCGA-AN-A0FL TCGA-AN-A0FL-01 basal-like -TCGA-A8-A07F TCGA-A8-A07F-01 Luminal A -TCGA-A8-A09X TCGA-A8-A09X-01 Her2 enriched +TCGA-AN-A03X TCGA-AN-A03X-01 Luminal A +TCGA-AN-A03Y TCGA-AN-A03Y-01 Luminal B +TCGA-AN-A041 TCGA-AN-A041-01 Luminal B +TCGA-AN-A046 TCGA-AN-A046-01 Luminal A +TCGA-AN-A049 TCGA-AN-A049-01 Luminal B +TCGA-AN-A04A TCGA-AN-A04A-01 Luminal A +TCGA-AN-A04C TCGA-AN-A04C-01 Her2 enriched +TCGA-AN-A04D TCGA-AN-A04D-01 basal-like +TCGA-AN-A0AJ TCGA-AN-A0AJ-01 Luminal B +TCGA-AN-A0AK TCGA-AN-A0AK-01 Luminal B +TCGA-AN-A0AL TCGA-AN-A0AL-01 basal-like +TCGA-AN-A0AM TCGA-AN-A0AM-01 Luminal B +TCGA-AN-A0AR TCGA-AN-A0AR-01 basal-like +TCGA-AN-A0AS TCGA-AN-A0AS-01 Luminal B +TCGA-AN-A0AT TCGA-AN-A0AT-01 TCGA-AN-A0FD TCGA-AN-A0FD-01 Luminal A -TCGA-BH-A0C0 TCGA-BH-A0C0-01 Luminal B -TCGA-BH-A0BO TCGA-BH-A0BO-01 Luminal A -TCGA-BH-A0H3 TCGA-BH-A0H3-01 Luminal A +TCGA-AN-A0FF TCGA-AN-A0FF-01 Luminal B +TCGA-AN-A0FJ TCGA-AN-A0FJ-01 basal-like +TCGA-AN-A0FK TCGA-AN-A0FK-01 Luminal B +TCGA-AN-A0FL TCGA-AN-A0FL-01 basal-like +TCGA-AN-A0FN TCGA-AN-A0FN-01 Luminal A +TCGA-AN-A0FS TCGA-AN-A0FS-01 Luminal A TCGA-AN-A0FT TCGA-AN-A0FT-01 Luminal A -TCGA-BH-A0W3 TCGA-BH-A0W3-01 Luminal B -TCGA-A2-A0SY TCGA-A2-A0SY-01 Luminal A -TCGA-BH-A0BG TCGA-BH-A0BG-01 basal-like -TCGA-B6-A0RP TCGA-B6-A0RP-01 Luminal A -TCGA-AO-A12D TCGA-AO-A12D-01 Her2 enriched -TCGA-AO-A0JJ TCGA-AO-A0JJ-01 Luminal A -TCGA-AN-A0AM TCGA-AN-A0AM-01 Luminal B -TCGA-C8-A132 TCGA-C8-A132-01 Luminal A -TCGA-C8-A12Q TCGA-C8-A12Q-01 Her2 enriched -TCGA-D8-A147 TCGA-D8-A147-01 basal-like -TCGA-BH-A0GZ TCGA-BH-A0GZ-01 Luminal A -TCGA-AR-A1AX TCGA-AR-A1AX-01 Luminal A -TCGA-B6-A0WS TCGA-B6-A0WS-01 Luminal A -TCGA-B6-A0X4 TCGA-B6-A0X4-01 Luminal A -TCGA-B6-A0RH TCGA-B6-A0RH-01 Her2 enriched -TCGA-E2-A159 TCGA-E2-A159-01 basal-like -TCGA-E2-A14X TCGA-E2-A14X-01 basal-like -TCGA-C8-A12Y TCGA-C8-A12Y-01 Luminal A -TCGA-A8-A090 TCGA-A8-A090-01 Luminal A -TCGA-A8-A08O TCGA-A8-A08O-01 Luminal A -TCGA-AO-A0J2 TCGA-AO-A0J2-01 Her2 enriched -TCGA-AR-A1AP TCGA-AR-A1AP-01 Luminal A -TCGA-E2-A14P TCGA-E2-A14P-01 Her2 enriched -TCGA-A1-A0SH TCGA-A1-A0SH-01 Luminal A -TCGA-A8-A08G TCGA-A8-A08G-01 Luminal B -TCGA-BH-A0BW TCGA-BH-A0BW-01 basal-like -TCGA-A2-A04X TCGA-A2-A04X-01 Her2 enriched -TCGA-AO-A03O TCGA-AO-A03O-01 Luminal B -TCGA-BH-A0B2 TCGA-BH-A0B2-01 Luminal A +TCGA-AN-A0FV TCGA-AN-A0FV-01 Her2 enriched +TCGA-AN-A0FW TCGA-AN-A0FW-01 Luminal A +TCGA-AN-A0FX TCGA-AN-A0FX-01 basal-like +TCGA-AN-A0FY TCGA-AN-A0FY-01 Luminal B +TCGA-AN-A0FZ TCGA-AN-A0FZ-01 Luminal A +TCGA-AN-A0G0 TCGA-AN-A0G0-01 TCGA-AN-A0XL TCGA-AN-A0XL-01 Luminal A -TCGA-BH-A18T TCGA-BH-A18T-01 Luminal A -TCGA-AR-A1AH TCGA-AR-A1AH-01 basal-like -TCGA-A2-A0EW TCGA-A2-A0EW-01 Luminal A -TCGA-A8-A06R TCGA-A8-A06R-01 Luminal B -TCGA-AQ-A04L TCGA-AQ-A04L-01 Luminal A -TCGA-B6-A0IM TCGA-B6-A0IM-01 Luminal B -TCGA-BH-A0AY TCGA-BH-A0AY-01 Luminal B -TCGA-A2-A04P TCGA-A2-A04P-01 basal-like -TCGA-BH-A0HP TCGA-BH-A0HP-01 Luminal A -TCGA-BH-A0DZ TCGA-BH-A0DZ-01 Her2 enriched -TCGA-E2-A15D TCGA-E2-A15D-01 Luminal A -TCGA-BH-A18L TCGA-BH-A18L-01 Luminal B -TCGA-BH-A0HX TCGA-BH-A0HX-01 Luminal A -TEST_PATIENT_1 TEST_SAMPLE_1 +TCGA-AN-A0XN TCGA-AN-A0XN-01 Luminal A +TCGA-AN-A0XO TCGA-AN-A0XO-01 Luminal A +TCGA-AN-A0XP TCGA-AN-A0XP-01 Luminal A +TCGA-AN-A0XR TCGA-AN-A0XR-01 Luminal B +TCGA-AN-A0XS TCGA-AN-A0XS-01 Luminal A TCGA-AN-A0XT TCGA-AN-A0XT-01 Luminal A -TCGA-A8-A07C TCGA-A8-A07C-01 basal-like -TCGA-E2-A15L TCGA-E2-A15L-01 Luminal B -TCGA-AN-A03Y TCGA-AN-A03Y-01 Luminal B -TCGA-A2-A0CT TCGA-A2-A0CT-01 Luminal B -TCGA-AR-A0TY TCGA-AR-A0TY-01 Luminal B -TCGA-A8-A09W TCGA-A8-A09W-01 Luminal B -TCGA-AN-A0FK TCGA-AN-A0FK-01 Luminal B -TCGA-A8-A06Z TCGA-A8-A06Z-01 Luminal B -TCGA-E2-A15T TCGA-E2-A15T-01 Luminal B +TCGA-AN-A0XU TCGA-AN-A0XU-01 basal-like +TCGA-AN-A0XV TCGA-AN-A0XV-01 Luminal A +TCGA-AN-A0XW TCGA-AN-A0XW-01 Luminal B +TCGA-AO-A03L TCGA-AO-A03L-01 Her2 enriched +TCGA-AO-A03M TCGA-AO-A03M-01 Luminal A +TCGA-AO-A03N TCGA-AO-A03N-01 Her2 enriched +TCGA-AO-A03O TCGA-AO-A03O-01 Luminal B +TCGA-AO-A03P TCGA-AO-A03P-01 Luminal B +TCGA-AO-A03R TCGA-AO-A03R-01 +TCGA-AO-A03T TCGA-AO-A03T-01 +TCGA-AO-A03U TCGA-AO-A03U-01 +TCGA-AO-A03V TCGA-AO-A03V-01 Luminal A +TCGA-AO-A0J2 TCGA-AO-A0J2-01 Her2 enriched +TCGA-AO-A0J3 TCGA-AO-A0J3-01 Luminal B +TCGA-AO-A0J4 TCGA-AO-A0J4-01 basal-like +TCGA-AO-A0J5 TCGA-AO-A0J5-01 Luminal A +TCGA-AO-A0J6 TCGA-AO-A0J6-01 basal-like +TCGA-AO-A0J7 TCGA-AO-A0J7-01 Luminal B +TCGA-AO-A0J8 TCGA-AO-A0J8-01 Luminal A +TCGA-AO-A0J9 TCGA-AO-A0J9-01 Luminal A +TCGA-AO-A0JA TCGA-AO-A0JA-01 Luminal A +TCGA-AO-A0JB TCGA-AO-A0JB-01 +TCGA-AO-A0JC TCGA-AO-A0JC-01 Luminal B +TCGA-AO-A0JD TCGA-AO-A0JD-01 Luminal B +TCGA-AO-A0JE TCGA-AO-A0JE-01 Her2 enriched +TCGA-AO-A0JF TCGA-AO-A0JF-01 Luminal A +TCGA-AO-A0JG TCGA-AO-A0JG-01 Luminal A +TCGA-AO-A0JI TCGA-AO-A0JI-01 Luminal B +TCGA-AO-A0JJ TCGA-AO-A0JJ-01 Luminal A +TCGA-AO-A0JL TCGA-AO-A0JL-01 basal-like +TCGA-AO-A0JM TCGA-AO-A0JM-01 Luminal B +TCGA-AO-A124 TCGA-AO-A124-01 basal-like +TCGA-AO-A125 TCGA-AO-A125-01 Luminal A +TCGA-AO-A126 TCGA-AO-A126-01 Luminal A +TCGA-AO-A128 TCGA-AO-A128-01 +TCGA-AO-A129 TCGA-AO-A129-01 basal-like +TCGA-AO-A12A TCGA-AO-A12A-01 Luminal A +TCGA-AO-A12B TCGA-AO-A12B-01 Luminal B +TCGA-AO-A12C TCGA-AO-A12C-01 Luminal A +TCGA-AO-A12D TCGA-AO-A12D-01 Her2 enriched +TCGA-AO-A12E TCGA-AO-A12E-01 Luminal A +TCGA-AO-A12F TCGA-AO-A12F-01 basal-like +TCGA-AO-A12G TCGA-AO-A12G-01 Luminal A +TCGA-AO-A12H TCGA-AO-A12H-01 Luminal A +TCGA-AO-A1KO TCGA-AO-A1KO-01 +TCGA-AO-A1KP TCGA-AO-A1KP-01 +TCGA-AO-A1KQ TCGA-AO-A1KQ-01 +TCGA-AO-A1KR TCGA-AO-A1KR-01 +TCGA-AO-A1KS TCGA-AO-A1KS-01 +TCGA-AO-A1KT TCGA-AO-A1KT-01 +TCGA-AQ-A04H TCGA-AQ-A04H-01 Luminal B +TCGA-AQ-A04J TCGA-AQ-A04J-01 basal-like +TCGA-AQ-A04L TCGA-AQ-A04L-01 Luminal A +TCGA-AQ-A0Y5 TCGA-AQ-A0Y5-01 +TCGA-AQ-A1H2 TCGA-AQ-A1H2-01 +TCGA-AQ-A1H3 TCGA-AQ-A1H3-01 +TCGA-AR-A0TP TCGA-AR-A0TP-01 basal-like TCGA-AR-A0TQ TCGA-AR-A0TQ-01 Luminal B +TCGA-AR-A0TR TCGA-AR-A0TR-01 Luminal A +TCGA-AR-A0TS TCGA-AR-A0TS-01 basal-like +TCGA-AR-A0TT TCGA-AR-A0TT-01 Luminal B +TCGA-AR-A0TU TCGA-AR-A0TU-01 +TCGA-AR-A0TV TCGA-AR-A0TV-01 Luminal B +TCGA-AR-A0TW TCGA-AR-A0TW-01 Luminal A +TCGA-AR-A0TX TCGA-AR-A0TX-01 Her2 enriched +TCGA-AR-A0TY TCGA-AR-A0TY-01 Luminal B +TCGA-AR-A0TZ TCGA-AR-A0TZ-01 Luminal B +TCGA-AR-A0U0 TCGA-AR-A0U0-01 +TCGA-AR-A0U1 TCGA-AR-A0U1-01 basal-like TCGA-AR-A0U2 TCGA-AR-A0U2-01 Luminal B -TCGA-BH-A0DE TCGA-BH-A0DE-01 Luminal A -TCGA-E2-A1B4 TCGA-E2-A1B4-01 Luminal A -TCGA-BH-A0W4 TCGA-BH-A0W4-01 Luminal A -TCGA-BH-A0H0 TCGA-BH-A0H0-01 Luminal B -TCGA-AO-A0JG TCGA-AO-A0JG-01 Luminal A -TCGA-AN-A0FS TCGA-AN-A0FS-01 Luminal A -TCGA-A8-A09G TCGA-A8-A09G-01 Her2 enriched +TCGA-AR-A0U3 TCGA-AR-A0U3-01 Luminal B +TCGA-AR-A0U4 TCGA-AR-A0U4-01 basal-like +TCGA-AR-A1AH TCGA-AR-A1AH-01 basal-like +TCGA-AR-A1AI TCGA-AR-A1AI-01 basal-like +TCGA-AR-A1AJ TCGA-AR-A1AJ-01 basal-like +TCGA-AR-A1AK TCGA-AR-A1AK-01 Luminal A +TCGA-AR-A1AL TCGA-AR-A1AL-01 Luminal A +TCGA-AR-A1AN TCGA-AR-A1AN-01 Luminal A +TCGA-AR-A1AO TCGA-AR-A1AO-01 Claudin low +TCGA-AR-A1AP TCGA-AR-A1AP-01 Luminal A +TCGA-AR-A1AQ TCGA-AR-A1AQ-01 basal-like +TCGA-AR-A1AR TCGA-AR-A1AR-01 basal-like +TCGA-AR-A1AS TCGA-AR-A1AS-01 Luminal A +TCGA-AR-A1AT TCGA-AR-A1AT-01 Her2 enriched +TCGA-AR-A1AU TCGA-AR-A1AU-01 Luminal A +TCGA-AR-A1AV TCGA-AR-A1AV-01 Luminal B +TCGA-AR-A1AW TCGA-AR-A1AW-01 Luminal A +TCGA-AR-A1AX TCGA-AR-A1AX-01 Luminal A +TCGA-AR-A1AY TCGA-AR-A1AY-01 basal-like +TCGA-AR-A24H TCGA-AR-A24H-01 +TCGA-AR-A24K TCGA-AR-A24K-01 +TCGA-AR-A24L TCGA-AR-A24L-01 +TCGA-AR-A24M TCGA-AR-A24M-01 +TCGA-AR-A24N TCGA-AR-A24N-01 +TCGA-AR-A24O TCGA-AR-A24O-01 +TCGA-AR-A24P TCGA-AR-A24P-01 +TCGA-AR-A24Q TCGA-AR-A24Q-01 +TCGA-AR-A24R TCGA-AR-A24R-01 +TCGA-AR-A24S TCGA-AR-A24S-01 +TCGA-AR-A24T TCGA-AR-A24T-01 +TCGA-AR-A24U TCGA-AR-A24U-01 +TCGA-AR-A24V TCGA-AR-A24V-01 +TCGA-AR-A24W TCGA-AR-A24W-01 +TCGA-AR-A24X TCGA-AR-A24X-01 +TCGA-AR-A24Z TCGA-AR-A24Z-01 +TCGA-AR-A250 TCGA-AR-A250-01 +TCGA-AR-A251 TCGA-AR-A251-01 +TCGA-AR-A252 TCGA-AR-A252-01 +TCGA-AR-A254 TCGA-AR-A254-01 +TCGA-AR-A255 TCGA-AR-A255-01 +TCGA-AR-A256 TCGA-AR-A256-01 +TCGA-B6-A0I2 TCGA-B6-A0I2-01 basal-like +TCGA-B6-A0I5 TCGA-B6-A0I5-01 Luminal A +TCGA-B6-A0I6 TCGA-B6-A0I6-01 +TCGA-B6-A0I8 TCGA-B6-A0I8-01 Luminal A +TCGA-B6-A0I9 TCGA-B6-A0I9-01 Her2 enriched +TCGA-B6-A0IA TCGA-B6-A0IA-01 Luminal A +TCGA-B6-A0IB TCGA-B6-A0IB-01 Luminal B +TCGA-B6-A0IC TCGA-B6-A0IC-01 Luminal B +TCGA-B6-A0IE TCGA-B6-A0IE-01 +TCGA-B6-A0IG TCGA-B6-A0IG-01 Luminal A +TCGA-B6-A0IH TCGA-B6-A0IH-01 Luminal A +TCGA-B6-A0IJ TCGA-B6-A0IJ-01 basal-like +TCGA-B6-A0IK TCGA-B6-A0IK-01 Her2 enriched +TCGA-B6-A0IM TCGA-B6-A0IM-01 Luminal B +TCGA-B6-A0IN TCGA-B6-A0IN-01 Luminal A +TCGA-B6-A0IO TCGA-B6-A0IO-01 Luminal A +TCGA-B6-A0IP TCGA-B6-A0IP-01 Luminal A +TCGA-B6-A0IQ TCGA-B6-A0IQ-01 basal-like +TCGA-B6-A0RE TCGA-B6-A0RE-01 basal-like +TCGA-B6-A0RG TCGA-B6-A0RG-01 Luminal A +TCGA-B6-A0RH TCGA-B6-A0RH-01 Her2 enriched +TCGA-B6-A0RI TCGA-B6-A0RI-01 Luminal A +TCGA-B6-A0RL TCGA-B6-A0RL-01 Luminal B +TCGA-B6-A0RM TCGA-B6-A0RM-01 Luminal A +TCGA-B6-A0RN TCGA-B6-A0RN-01 Luminal A +TCGA-B6-A0RO TCGA-B6-A0RO-01 Luminal A +TCGA-B6-A0RP TCGA-B6-A0RP-01 Luminal A +TCGA-B6-A0RQ TCGA-B6-A0RQ-01 Luminal A +TCGA-B6-A0RS TCGA-B6-A0RS-01 Her2 enriched +TCGA-B6-A0RT TCGA-B6-A0RT-01 basal-like +TCGA-B6-A0RU TCGA-B6-A0RU-01 basal-like +TCGA-B6-A0RV TCGA-B6-A0RV-01 Luminal A +TCGA-B6-A0WS TCGA-B6-A0WS-01 Luminal A +TCGA-B6-A0WT TCGA-B6-A0WT-01 Luminal A +TCGA-B6-A0WV TCGA-B6-A0WV-01 Luminal B +TCGA-B6-A0WW TCGA-B6-A0WW-01 Luminal B TCGA-B6-A0WX TCGA-B6-A0WX-01 basal-like +TCGA-B6-A0WY TCGA-B6-A0WY-01 Luminal A +TCGA-B6-A0WZ TCGA-B6-A0WZ-01 Luminal A +TCGA-B6-A0X0 TCGA-B6-A0X0-01 Luminal A +TCGA-B6-A0X1 TCGA-B6-A0X1-01 +TCGA-B6-A0X4 TCGA-B6-A0X4-01 Luminal A +TCGA-B6-A0X5 TCGA-B6-A0X5-01 Luminal B +TCGA-B6-A0X7 TCGA-B6-A0X7-01 Luminal A +TCGA-B6-A1KC TCGA-B6-A1KC-01 +TCGA-B6-A1KF TCGA-B6-A1KF-01 +TCGA-B6-A1KI TCGA-B6-A1KI-01 +TCGA-B6-A1KN TCGA-B6-A1KN-01 +TCGA-BH-A0AU TCGA-BH-A0AU-01 Luminal B +TCGA-BH-A0AV TCGA-BH-A0AV-01 basal-like +TCGA-BH-A0AW TCGA-BH-A0AW-01 Her2 enriched +TCGA-BH-A0AY TCGA-BH-A0AY-01 Luminal B +TCGA-BH-A0AZ TCGA-BH-A0AZ-01 Luminal A +TCGA-BH-A0B0 TCGA-BH-A0B0-01 Luminal A +TCGA-BH-A0B1 TCGA-BH-A0B1-01 Luminal A +TCGA-BH-A0B2 TCGA-BH-A0B2-01 Luminal A +TCGA-BH-A0B3 TCGA-BH-A0B3-01 basal-like +TCGA-BH-A0B4 TCGA-BH-A0B4-01 Luminal A +TCGA-BH-A0B5 TCGA-BH-A0B5-01 Luminal B +TCGA-BH-A0B7 TCGA-BH-A0B7-01 Her2 enriched +TCGA-BH-A0B8 TCGA-BH-A0B8-01 Luminal A +TCGA-BH-A0B9 TCGA-BH-A0B9-01 basal-like +TCGA-BH-A0BA TCGA-BH-A0BA-01 Luminal A +TCGA-BH-A0BC TCGA-BH-A0BC-01 Luminal A +TCGA-BH-A0BD TCGA-BH-A0BD-01 Luminal B +TCGA-BH-A0BF TCGA-BH-A0BF-01 Luminal B +TCGA-BH-A0BG TCGA-BH-A0BG-01 basal-like TCGA-BH-A0BJ TCGA-BH-A0BJ-01 Luminal A -TCGA-B6-A0RS TCGA-B6-A0RS-01 Her2 enriched -TCGA-C8-A12N TCGA-C8-A12N-01 Luminal A -TCGA-A2-A0T3 TCGA-A2-A0T3-01 Luminal B -TCGA-AO-A12C TCGA-AO-A12C-01 Luminal A -TCGA-AN-A0AL TCGA-AN-A0AL-01 basal-like -TCGA-A8-A084 TCGA-A8-A084-01 Luminal B -TCGA-A8-A07S TCGA-A8-A07S-01 Luminal B -TCGA-A2-A0CL TCGA-A2-A0CL-01 Her2 enriched -TCGA-A8-A097 TCGA-A8-A097-01 Luminal B -TCGA-E2-A14S TCGA-E2-A14S-01 Luminal B +TCGA-BH-A0BL TCGA-BH-A0BL-01 basal-like +TCGA-BH-A0BM TCGA-BH-A0BM-01 Luminal A +TCGA-BH-A0BO TCGA-BH-A0BO-01 Luminal A +TCGA-BH-A0BP TCGA-BH-A0BP-01 Luminal A +TCGA-BH-A0BQ TCGA-BH-A0BQ-01 Luminal A +TCGA-BH-A0BR TCGA-BH-A0BR-01 Luminal A +TCGA-BH-A0BS TCGA-BH-A0BS-01 Luminal A +TCGA-BH-A0BT TCGA-BH-A0BT-01 Luminal A +TCGA-BH-A0BV TCGA-BH-A0BV-01 Luminal A +TCGA-BH-A0BW TCGA-BH-A0BW-01 basal-like TCGA-BH-A0BZ TCGA-BH-A0BZ-01 Luminal B -TCGA-E2-A154 TCGA-E2-A154-01 Luminal A -TCGA-C8-A137 TCGA-C8-A137-01 Her2 enriched -TCGA-C8-A12V TCGA-C8-A12V-01 basal-like -TCGA-E2-A1BD TCGA-E2-A1BD-01 Luminal A -TCGA-A1-A0SK TCGA-A1-A0SK-01 basal-like -TCGA-A7-A0CD TCGA-A7-A0CD-01 Luminal A -TCGA-AR-A1AY TCGA-AR-A1AY-01 basal-like +TCGA-BH-A0C0 TCGA-BH-A0C0-01 Luminal B +TCGA-BH-A0C1 TCGA-BH-A0C1-01 Luminal A TCGA-BH-A0C3 TCGA-BH-A0C3-01 Luminal B -TCGA-BH-A0BR TCGA-BH-A0BR-01 Luminal A -TCGA-BH-A0RX TCGA-BH-A0RX-01 basal-like -TCGA-A2-A0EO TCGA-A2-A0EO-01 Luminal A -TCGA-AO-A0J7 TCGA-AO-A0J7-01 Luminal B -TCGA-AR-A1AQ TCGA-AR-A1AQ-01 basal-like -TCGA-C8-A1HL TCGA-C8-A1HL-01 Luminal B -TCGA-A2-A04Y TCGA-A2-A04Y-01 Luminal A -TCGA-AO-A03P TCGA-AO-A03P-01 Luminal B -TCGA-A2-A0YT TCGA-A2-A0YT-01 Luminal B -TCGA-A8-A0A2 TCGA-A8-A0A2-01 Luminal A -TCGA-BH-A0HI TCGA-BH-A0HI-01 Luminal A -TCGA-BH-A0B9 TCGA-BH-A0B9-01 basal-like -TCGA-AR-A1AI TCGA-AR-A1AI-01 basal-like -TCGA-E2-A10E TCGA-E2-A10E-01 Luminal A -TCGA-BH-A18U TCGA-BH-A18U-01 Luminal B -TCGA-E2-A14Z TCGA-E2-A14Z-01 Luminal A -TCGA-A2-A0CU TCGA-A2-A0CU-01 Luminal A -TCGA-A2-A04Q TCGA-A2-A04Q-01 basal-like -TCGA-A2-A0EX TCGA-A2-A0EX-01 Luminal A -TCGA-BH-A0HQ TCGA-BH-A0HQ-01 Luminal A -TCGA-B6-A0IN TCGA-B6-A0IN-01 Luminal A -TEST_PATIENT_15 TEST_SAMPLE_15 -TCGA-BH-A18M TCGA-BH-A18M-01 Luminal A -TCGA-E2-A15C TCGA-E2-A15C-01 Luminal A -TCGA-BH-A0BA TCGA-BH-A0BA-01 Luminal A -TCGA-BH-A0HY TCGA-BH-A0HY-01 Her2 enriched -TCGA-BH-A0DS TCGA-BH-A0DS-01 Luminal A -TCGA-AN-A0XS TCGA-AN-A0XS-01 Luminal A -TCGA-A8-A0AB TCGA-A8-A0AB-01 Luminal B -TCGA-A8-A09N TCGA-A8-A09N-01 Luminal B -TCGA-AN-A049 TCGA-AN-A049-01 Luminal B -TCGA-AN-A03X TCGA-AN-A03X-01 Luminal A -TCGA-E2-A15K TCGA-E2-A15K-01 Luminal B -TCGA-AR-A0TZ TCGA-AR-A0TZ-01 Luminal B -TCGA-A2-A0YD TCGA-A2-A0YD-01 Luminal A -TCGA-AN-A041 TCGA-AN-A041-01 Luminal B -TCGA-AN-A0FJ TCGA-AN-A0FJ-01 basal-like -TCGA-A8-A09V TCGA-A8-A09V-01 Luminal A -TCGA-E2-A15S TCGA-E2-A15S-01 Luminal B -TCGA-BH-A0B1 TCGA-BH-A0B1-01 Luminal A -TCGA-B6-A0I5 TCGA-B6-A0I5-01 Luminal A -TCGA-AR-A0U3 TCGA-AR-A0U3-01 Luminal B -TCGA-AR-A0TR TCGA-AR-A0TR-01 Luminal A -TCGA-A2-A0YL TCGA-A2-A0YL-01 Luminal A -TCGA-BH-A0W5 TCGA-BH-A0W5-01 Luminal A -TCGA-A8-A07L TCGA-A8-A07L-01 Luminal B +TCGA-BH-A0C7 TCGA-BH-A0C7-01 Luminal B TCGA-BH-A0DD TCGA-BH-A0DD-01 Luminal B -TCGA-AN-A0AS TCGA-AN-A0AS-01 Luminal B -TCGA-BH-A0BQ TCGA-BH-A0BQ-01 Luminal A -TCGA-B6-A0WY TCGA-B6-A0WY-01 Luminal A -TCGA-E2-A1B5 TCGA-E2-A1B5-01 basal-like -TCGA-A2-A0YC TCGA-A2-A0YC-01 Luminal A -TCGA-A8-A085 TCGA-A8-A085-01 Luminal B +TCGA-BH-A0DE TCGA-BH-A0DE-01 Luminal A +TCGA-BH-A0DG TCGA-BH-A0DG-01 Luminal A +TCGA-BH-A0DH TCGA-BH-A0DH-01 Luminal A +TCGA-BH-A0DI TCGA-BH-A0DI-01 Luminal A +TCGA-BH-A0DK TCGA-BH-A0DK-01 Luminal A TCGA-BH-A0DL TCGA-BH-A0DL-01 basal-like -TCGA-AN-A0AK TCGA-AN-A0AK-01 Luminal B -TCGA-AN-A0FZ TCGA-AN-A0FZ-01 Luminal A -TCGA-A2-A0T4 TCGA-A2-A0T4-01 Luminal B -TCGA-C8-A12O TCGA-C8-A12O-01 Luminal A -TCGA-C8-A130 TCGA-C8-A130-01 Her2 enriched -TCGA-AN-A04A TCGA-AN-A04A-01 Luminal A -TCGA-A2-A0CM TCGA-A2-A0CM-01 basal-like -TCGA-AO-A12B TCGA-AO-A12B-01 Luminal B -TCGA-A8-A096 TCGA-A8-A096-01 Luminal B -TCGA-E2-A153 TCGA-E2-A153-01 Luminal A -TCGA-D8-A145 TCGA-D8-A145-01 Luminal A -TCGA-E2-A14R TCGA-E2-A14R-01 basal-like -TCGA-C8-A12W TCGA-C8-A12W-01 Luminal B -TCGA-C8-A138 TCGA-C8-A138-01 Her2 enriched -TCGA-A8-A0A1 TCGA-A8-A0A1-01 Luminal A -TCGA-BH-A0H9 TCGA-BH-A0H9-01 Luminal A -TCGA-BH-A0EE TCGA-BH-A0EE-01 Her2 enriched -TCGA-A1-A0SJ TCGA-A1-A0SJ-01 Luminal A -TCGA-AO-A0J8 TCGA-AO-A0J8-01 Luminal A -TCGA-A1-A0SB TCGA-A1-A0SB-01 -TCGA-A1-A0SB TCGA-A1-A0SB-02 -TCGA-C8-A1HM TCGA-C8-A1HM-01 Luminal B -TCGA-AR-A1AR TCGA-AR-A1AR-01 basal-like -TCGA-BH-A0HA TCGA-BH-A0HA-01 Luminal A -TCGA-BH-A0B4 TCGA-BH-A0B4-01 Luminal A -TCGA-A2-A0CZ TCGA-A2-A0CZ-01 Luminal A -TCGA-A8-A0A9 TCGA-A8-A0A9-01 Luminal B -TCGA-A2-A0EU TCGA-A2-A0EU-01 Luminal A -TCGA-B6-A0IO TCGA-B6-A0IO-01 Luminal A -TCGA-AR-A1AJ TCGA-AR-A1AJ-01 basal-like -TCGA-A8-A06P TCGA-A8-A06P-01 Luminal A -TCGA-BH-A0EA TCGA-BH-A0EA-01 Luminal A -TCGA-AN-A0XN TCGA-AN-A0XN-01 Luminal A -TCGA-BH-A18V TCGA-BH-A18V-01 basal-like -TCGA-BH-A0E9 TCGA-BH-A0E9-01 Luminal A +TCGA-BH-A0DO TCGA-BH-A0DO-01 Luminal A +TCGA-BH-A0DP TCGA-BH-A0DP-01 Luminal A +TCGA-BH-A0DQ TCGA-BH-A0DQ-01 Luminal A +TCGA-BH-A0DS TCGA-BH-A0DS-01 Luminal A +TCGA-BH-A0DT TCGA-BH-A0DT-01 Luminal A +TCGA-BH-A0DV TCGA-BH-A0DV-01 TCGA-BH-A0DX TCGA-BH-A0DX-01 Luminal A -TCGA-A2-A04R TCGA-A2-A04R-01 Luminal B -TCGA-E2-A15F TCGA-E2-A15F-01 Luminal A -TCGA-E2-A106 TCGA-E2-A106-01 Luminal A -TCGA-BH-A18N TCGA-BH-A18N-01 Luminal A -TCGA-B6-A0IG TCGA-B6-A0IG-01 Luminal A -TCGA-AN-A0XV TCGA-AN-A0XV-01 Luminal A -TCGA-BH-A1ES TCGA-BH-A1ES-01 Luminal A +TCGA-BH-A0DZ TCGA-BH-A0DZ-01 Her2 enriched +TCGA-BH-A0E0 TCGA-BH-A0E0-01 basal-like TCGA-BH-A0E1 TCGA-BH-A0E1-01 Luminal A -TCGA-BH-A0DP TCGA-BH-A0DP-01 Luminal A -TCGA-BH-A18F TCGA-BH-A18F-01 Luminal B -TCGA-AR-A0TW TCGA-AR-A0TW-01 Luminal A -TCGA-A2-A0D3 TCGA-A2-A0D3-01 Luminal A -TCGA-E2-A10F TCGA-E2-A10F-01 Luminal A -TCGA-A8-A079 TCGA-A8-A079-01 Luminal B -TCGA-A8-A06X TCGA-A8-A06X-01 Luminal B -TCGA-A8-A09M TCGA-A8-A09M-01 Luminal B -TCGA-B6-A0I6 TCGA-B6-A0I6-01 -TCGA-A2-A0YM TCGA-A2-A0YM-01 basal-like -TCGA-A8-A09E TCGA-A8-A09E-01 Luminal B -TCGA-AN-A04D TCGA-AN-A04D-01 basal-like -TCGA-BH-A0DG TCGA-BH-A0DG-01 Luminal A -TCGA-AN-A0AR TCGA-AN-A0AR-01 basal-like -TCGA-AO-A0JE TCGA-AO-A0JE-01 Her2 enriched -TCGA-BH-A0BL TCGA-BH-A0BL-01 basal-like -TCGA-B6-A0WV TCGA-B6-A0WV-01 Luminal B -TCGA-B6-A0X7 TCGA-B6-A0X7-01 Luminal A -TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HETEROZYGOUS -TCGA-A1-A0SM TCGA-A1-A0SM-01 Luminal B -TCGA-A8-A07I TCGA-A8-A07I-01 Her2 enriched +TCGA-BH-A0E2 TCGA-BH-A0E2-01 Luminal A +TCGA-BH-A0E6 TCGA-BH-A0E6-01 basal-like +TCGA-BH-A0E7 TCGA-BH-A0E7-01 Luminal A +TCGA-BH-A0E9 TCGA-BH-A0E9-01 Luminal A +TCGA-BH-A0EA TCGA-BH-A0EA-01 Luminal A +TCGA-BH-A0EB TCGA-BH-A0EB-01 Luminal A +TCGA-BH-A0EE TCGA-BH-A0EE-01 Her2 enriched +TCGA-BH-A0EI TCGA-BH-A0EI-01 Luminal A +TCGA-BH-A0GY TCGA-BH-A0GY-01 Luminal A +TCGA-BH-A0GZ TCGA-BH-A0GZ-01 Luminal A +TCGA-BH-A0H0 TCGA-BH-A0H0-01 Luminal B +TCGA-BH-A0H3 TCGA-BH-A0H3-01 Luminal A +TCGA-BH-A0H5 TCGA-BH-A0H5-01 Luminal A TCGA-BH-A0H6 TCGA-BH-A0H6-01 Luminal A -TCGA-C8-A12L TCGA-C8-A12L-01 Her2 enriched -TCGA-AO-A129 TCGA-AO-A129-01 basal-like -TCGA-AN-A0FY TCGA-AN-A0FY-01 Luminal B -TCGA-AN-A0AJ TCGA-AN-A0AJ-01 Luminal B -TCGA-A2-A0T5 TCGA-A2-A0T5-01 Luminal A -TCGA-A2-A0ST TCGA-A2-A0ST-01 basal-like -TCGA-A8-A082 TCGA-A8-A082-01 Luminal B -TCGA-AO-A0JM TCGA-AO-A0JM-01 Luminal B -TCGA-B6-A0RU TCGA-B6-A0RU-01 basal-like -TCGA-AO-A12A TCGA-AO-A12A-01 Luminal A -TCGA-C8-A1HN TCGA-C8-A1HN-01 Luminal B -TCGA-B6-A0RM TCGA-B6-A0RM-01 Luminal A -TCGA-AR-A1AS TCGA-AR-A1AS-01 Luminal A -TCGA-E2-A156 TCGA-E2-A156-01 Luminal A -TCGA-BH-A0BD TCGA-BH-A0BD-01 Luminal B -TCGA-E2-A105 TCGA-E2-A105-01 Luminal A -TCGA-A8-A095 TCGA-A8-A095-01 Luminal B -TCGA-A8-A08T TCGA-A8-A08T-01 Luminal A -TCGA-C8-A135 TCGA-C8-A135-01 Her2 enriched -TCGA-C8-A12T TCGA-C8-A12T-01 Her2 enriched -TCGA-D8-A142 TCGA-D8-A142-01 basal-like -TCGA-A8-A08B TCGA-A8-A08B-01 Her2 enriched -TCGA-AO-A0J5 TCGA-AO-A0J5-01 Luminal A -TCGA-AR-A1AK TCGA-AR-A1AK-01 Luminal A -TCGA-C8-A1HF TCGA-C8-A1HF-01 Her2 enriched -TCGA-B6-A0RE TCGA-B6-A0RE-01 basal-like +TCGA-BH-A0H7 TCGA-BH-A0H7-01 Luminal A +TCGA-BH-A0H9 TCGA-BH-A0H9-01 Luminal A +TCGA-BH-A0HA TCGA-BH-A0HA-01 Luminal A +TCGA-BH-A0HB TCGA-BH-A0HB-01 Luminal A TCGA-BH-A0HF TCGA-BH-A0HF-01 Luminal A -TCGA-A8-A08L TCGA-A8-A08L-01 Her2 enriched -TCGA-D8-A13Y TCGA-D8-A13Y-01 Luminal B -TCGA-BH-A0BT TCGA-BH-A0BT-01 Luminal A -TCGA-A2-A0EM TCGA-A2-A0EM-01 Luminal A -TCGA-A1-A0SE TCGA-A1-A0SE-01 Luminal A -TEST_PATIENT_4 TEST_SAMPLE_4 +TCGA-BH-A0HI TCGA-BH-A0HI-01 Luminal A +TCGA-BH-A0HK TCGA-BH-A0HK-01 Luminal A +TCGA-BH-A0HL TCGA-BH-A0HL-01 +TCGA-BH-A0HN TCGA-BH-A0HN-01 TCGA-BH-A0HO TCGA-BH-A0HO-01 Luminal A -TCGA-B6-A0IP TCGA-B6-A0IP-01 Luminal A -TCGA-BH-A0B3 TCGA-BH-A0B3-01 basal-like -TCGA-A8-A06Q TCGA-A8-A06Q-01 Luminal B -TCGA-BH-A0EB TCGA-BH-A0EB-01 Luminal A -TCGA-A2-A0EV TCGA-A2-A0EV-01 Luminal A -TCGA-BH-A0AZ TCGA-BH-A0AZ-01 Luminal A -TCGA-B6-A0IH TCGA-B6-A0IH-01 Luminal A -TCGA-E2-A15E TCGA-E2-A15E-01 Luminal A -TCGA-E2-A107 TCGA-E2-A107-01 Luminal B +TCGA-BH-A0HP TCGA-BH-A0HP-01 Luminal A +TCGA-BH-A0HQ TCGA-BH-A0HQ-01 Luminal A +TCGA-BH-A0HU TCGA-BH-A0HU-01 Luminal B TCGA-BH-A0HW TCGA-BH-A0HW-01 Luminal B -TCGA-AN-A0XU TCGA-AN-A0XU-01 basal-like -TCGA-A8-A07B TCGA-A8-A07B-01 Her2 enriched -TCGA-BH-A0E2 TCGA-BH-A0E2-01 Luminal A -TCGA-BH-A0DQ TCGA-BH-A0DQ-01 Luminal A -TCGA-AR-A0TX TCGA-AR-A0TX-01 Her2 enriched -TCGA-A2-A0D4 TCGA-A2-A0D4-01 Luminal B -TCGA-A2-A0CS TCGA-A2-A0CS-01 Luminal A -TCGA-E2-A15M TCGA-E2-A15M-01 Luminal B -TCGA-A8-A06Y TCGA-A8-A06Y-01 Luminal A -TCGA-A7-A13F TCGA-A7-A13F-01 Luminal B -TCGA-A2-A0YF TCGA-A2-A0YF-01 Luminal A -TCGA-A8-A09T TCGA-A8-A09T-01 Luminal A -TCGA-BH-A0W7 TCGA-BH-A0W7-01 Luminal A -TCGA-AR-A0U1 TCGA-AR-A0U1-01 basal-like -TCGA-AR-A0TP TCGA-AR-A0TP-01 basal-like -TCGA-B6-A0I8 TCGA-B6-A0I8-01 Luminal A -TCGA-A8-A09D TCGA-A8-A09D-01 Luminal B -TCGA-AN-A04C TCGA-AN-A04C-01 Her2 enriched -TEST_PATIENT_2 TEST_SAMPLE_2 -TCGA-AO-A0JF TCGA-AO-A0JF-01 Luminal A -TCGA-B6-A0WW TCGA-B6-A0WW-01 Luminal B -TCGA-A8-A07J TCGA-A8-A07J-01 Luminal A -TCGA-BH-A0H7 TCGA-BH-A0H7-01 Luminal A -TCGA-A2-A0SU TCGA-A2-A0SU-01 Luminal A -TCGA-A2-A0T6 TCGA-A2-A0T6-01 Luminal A +TCGA-BH-A0HX TCGA-BH-A0HX-01 Luminal A +TCGA-BH-A0HY TCGA-BH-A0HY-01 Her2 enriched +TCGA-BH-A0RX TCGA-BH-A0RX-01 basal-like +TCGA-BH-A0W3 TCGA-BH-A0W3-01 Luminal B +TCGA-BH-A0W4 TCGA-BH-A0W4-01 Luminal A +TCGA-BH-A0W5 TCGA-BH-A0W5-01 Luminal A +TCGA-BH-A0W7 TCGA-BH-A0W7-01 Luminal A +TCGA-BH-A0WA TCGA-BH-A0WA-01 basal-like +TCGA-BH-A18F TCGA-BH-A18F-01 Luminal B +TCGA-BH-A18G TCGA-BH-A18G-01 +TCGA-BH-A18H TCGA-BH-A18H-01 Luminal A +TCGA-BH-A18I TCGA-BH-A18I-01 Luminal A +TCGA-BH-A18J TCGA-BH-A18J-01 Luminal B +TCGA-BH-A18K TCGA-BH-A18K-01 basal-like +TCGA-BH-A18L TCGA-BH-A18L-01 Luminal B +TCGA-BH-A18M TCGA-BH-A18M-01 Luminal A +TCGA-BH-A18N TCGA-BH-A18N-01 Luminal A +TCGA-BH-A18P TCGA-BH-A18P-01 Her2 enriched +TCGA-BH-A18Q TCGA-BH-A18Q-01 basal-like +TCGA-BH-A18R TCGA-BH-A18R-01 Her2 enriched +TCGA-BH-A18S TCGA-BH-A18S-01 Luminal A +TCGA-BH-A18T TCGA-BH-A18T-01 Luminal A +TCGA-BH-A18U TCGA-BH-A18U-01 Luminal B +TCGA-BH-A18V TCGA-BH-A18V-01 basal-like +TCGA-BH-A1EN TCGA-BH-A1EN-01 +TCGA-BH-A1EO TCGA-BH-A1EO-01 Luminal A +TCGA-BH-A1ES TCGA-BH-A1ES-01 Luminal A +TCGA-BH-A1ET TCGA-BH-A1ET-01 Luminal A +TCGA-BH-A1EU TCGA-BH-A1EU-01 Luminal A +TCGA-BH-A1EV TCGA-BH-A1EV-01 Her2 enriched +TCGA-BH-A1EW TCGA-BH-A1EW-01 Luminal B +TCGA-BH-A1EX TCGA-BH-A1EX-01 +TCGA-BH-A1EY TCGA-BH-A1EY-01 +TCGA-BH-A1F0 TCGA-BH-A1F0-01 basal-like +TCGA-BH-A1F2 TCGA-BH-A1F2-01 +TCGA-BH-A1F5 TCGA-BH-A1F5-01 +TCGA-BH-A1F6 TCGA-BH-A1F6-01 +TCGA-BH-A1F8 TCGA-BH-A1F8-01 +TCGA-BH-A1FB TCGA-BH-A1FB-01 +TCGA-BH-A1FC TCGA-BH-A1FC-01 +TCGA-BH-A1FD TCGA-BH-A1FD-01 +TCGA-BH-A1FE TCGA-BH-A1FE-01 +TCGA-BH-A1FG TCGA-BH-A1FG-01 +TCGA-BH-A1FH TCGA-BH-A1FH-01 +TCGA-BH-A1FJ TCGA-BH-A1FJ-01 +TCGA-BH-A1FL TCGA-BH-A1FL-01 +TCGA-BH-A1FM TCGA-BH-A1FM-01 +TCGA-BH-A1FN TCGA-BH-A1FN-01 +TCGA-BH-A1FR TCGA-BH-A1FR-01 +TCGA-BH-A1FU TCGA-BH-A1FU-01 +TCGA-BH-A201 TCGA-BH-A201-01 +TCGA-BH-A202 TCGA-BH-A202-01 +TCGA-BH-A203 TCGA-BH-A203-01 +TCGA-BH-A204 TCGA-BH-A204-01 +TCGA-BH-A208 TCGA-BH-A208-01 +TCGA-BH-A209 TCGA-BH-A209-01 +TCGA-BH-A28Q TCGA-BH-A28Q-01 +TCGA-C8-A12K TCGA-C8-A12K-01 basal-like +TCGA-C8-A12L TCGA-C8-A12L-01 Her2 enriched TCGA-C8-A12M TCGA-C8-A12M-01 Luminal B -TCGA-AO-A12H TCGA-AO-A12H-01 Luminal A -TCGA-AN-A0FX TCGA-AN-A0FX-01 basal-like -TCGA-B6-A0RT TCGA-B6-A0RT-01 basal-like -TCGA-A8-A083 TCGA-A8-A083-01 Luminal A -TCGA-A8-A07R TCGA-A8-A07R-01 basal-like -TCGA-E2-A155 TCGA-E2-A155-01 Luminal B -TCGA-E2-A1BC TCGA-E2-A1BC-01 Luminal A -TCGA-E2-A14T TCGA-E2-A14T-01 Luminal A -TCGA-AR-A1AT TCGA-AR-A1AT-01 Her2 enriched -TCGA-A8-A07Z TCGA-A8-A07Z-01 Luminal B -TCGA-B6-A0RL TCGA-B6-A0RL-01 Luminal B -TCGA-BH-A0BC TCGA-BH-A0BC-01 Luminal A -TEST_PATIENT_3 TEST_SAMPLE_3 -TCGA-B6-A0X0 TCGA-B6-A0X0-01 Luminal A -TCGA-A8-A08S TCGA-A8-A08S-01 Luminal B +TCGA-C8-A12N TCGA-C8-A12N-01 Luminal A +TCGA-C8-A12O TCGA-C8-A12O-01 Luminal A +TCGA-C8-A12P TCGA-C8-A12P-01 Her2 enriched +TCGA-C8-A12Q TCGA-C8-A12Q-01 Her2 enriched +TCGA-C8-A12T TCGA-C8-A12T-01 Her2 enriched TCGA-C8-A12U TCGA-C8-A12U-01 Luminal B -TCGA-A8-A094 TCGA-A8-A094-01 Her2 enriched -TCGA-A7-A0CE TCGA-A7-A0CE-01 basal-like +TCGA-C8-A12V TCGA-C8-A12V-01 basal-like +TCGA-C8-A12W TCGA-C8-A12W-01 Luminal B +TCGA-C8-A12X TCGA-C8-A12X-01 Luminal B +TCGA-C8-A12Y TCGA-C8-A12Y-01 Luminal A +TCGA-C8-A12Z TCGA-C8-A12Z-01 Her2 enriched +TCGA-C8-A130 TCGA-C8-A130-01 Her2 enriched +TCGA-C8-A131 TCGA-C8-A131-01 basal-like +TCGA-C8-A132 TCGA-C8-A132-01 Luminal A +TCGA-C8-A133 TCGA-C8-A133-01 Luminal A +TCGA-C8-A134 TCGA-C8-A134-01 basal-like +TCGA-C8-A135 TCGA-C8-A135-01 Her2 enriched +TCGA-C8-A137 TCGA-C8-A137-01 Her2 enriched +TCGA-C8-A138 TCGA-C8-A138-01 Her2 enriched +TCGA-C8-A1HE TCGA-C8-A1HE-01 +TCGA-C8-A1HF TCGA-C8-A1HF-01 Her2 enriched TCGA-C8-A1HG TCGA-C8-A1HG-01 Luminal B -TCGA-AR-A1AL TCGA-AR-A1AL-01 Luminal A -TCGA-A8-A08C TCGA-A8-A08C-01 Luminal A -TCGA-BH-A0BS TCGA-BH-A0BS-01 Luminal A -TCGA-A2-A0EN TCGA-A2-A0EN-01 Luminal A -TCGA-AO-A0J6 TCGA-AO-A0J6-01 basal-like -TCGA-A1-A0SD TCGA-A1-A0SD-01 Luminal A +TCGA-C8-A1HI TCGA-C8-A1HI-01 Luminal A +TCGA-C8-A1HJ TCGA-C8-A1HJ-01 +TCGA-C8-A1HK TCGA-C8-A1HK-01 +TCGA-C8-A1HL TCGA-C8-A1HL-01 Luminal B +TCGA-C8-A1HM TCGA-C8-A1HM-01 Luminal B +TCGA-C8-A1HN TCGA-C8-A1HN-01 Luminal B +TCGA-C8-A1HO TCGA-C8-A1HO-01 +TCGA-C8-A26V TCGA-C8-A26V-01 +TCGA-C8-A26W TCGA-C8-A26W-01 +TCGA-C8-A26X TCGA-C8-A26X-01 +TCGA-C8-A26Y TCGA-C8-A26Y-01 +TCGA-C8-A26Z TCGA-C8-A26Z-01 +TCGA-C8-A273 TCGA-C8-A273-01 +TCGA-C8-A274 TCGA-C8-A274-01 +TCGA-C8-A275 TCGA-C8-A275-01 +TCGA-C8-A278 TCGA-C8-A278-01 +TCGA-C8-A27A TCGA-C8-A27A-01 +TCGA-C8-A27B TCGA-C8-A27B-01 +TCGA-D8-A13Y TCGA-D8-A13Y-01 Luminal B TCGA-D8-A13Z TCGA-D8-A13Z-01 Her2 enriched -TCGA-A8-A08I TCGA-A8-A08I-01 Luminal B -TCGA-BH-A18P TCGA-BH-A18P-01 Her2 enriched -TCGA-BH-A0HL TCGA-BH-A0HL-01 -TCGA-A8-A0A7 TCGA-A8-A0A7-01 Her2 enriched -TCGA-B6-A0IQ TCGA-B6-A0IQ-01 basal-like -TCGA-A2-A0ES TCGA-A2-A0ES-01 Luminal A -TCGA-A2-A0CX TCGA-A2-A0CX-01 Her2 enriched -TCGA-BH-A0AU TCGA-BH-A0AU-01 Luminal B -TCGA-E2-A15H TCGA-E2-A15H-01 Luminal A -TCGA-A8-A06N TCGA-A8-A06N-01 Luminal B -TCGA-BH-A18H TCGA-BH-A18H-01 Luminal A -TCGA-A7-A0DB TCGA-A7-A0DB-01 Luminal A -TCGA-AQ-A04H TCGA-AQ-A04H-01 Luminal B -TCGA-BH-A1EU TCGA-BH-A1EU-01 Luminal A -TCGA-E2-A108 TCGA-E2-A108-01 Claudin low -TCGA-BH-A0E7 TCGA-BH-A0E7-01 Luminal A -TCGA-AN-A046 TCGA-AN-A046-01 Luminal A -TCGA-A2-A0CP TCGA-A2-A0CP-01 Luminal A -TCGA-A2-A0D1 TCGA-A2-A0D1-01 Her2 enriched -TCGA-A2-A0YG TCGA-A2-A0YG-01 Luminal B -TCGA-AO-A126 TCGA-AO-A126-01 Luminal A -TCGA-B6-A0IA TCGA-B6-A0IA-01 Luminal A -TCGA-E2-A15P TCGA-E2-A15P-01 Luminal A -TCGA-AN-A0XP TCGA-AN-A0XP-01 Luminal A -TCGA-A8-A07G TCGA-A8-A07G-01 Luminal A -TCGA-A8-A09K TCGA-A8-A09K-01 Luminal B -TCGA-A8-A07O TCGA-A8-A07O-01 basal-like -TCGA-A8-A09C TCGA-A8-A09C-01 Luminal B -TCGA-B6-A0I9 TCGA-B6-A0I9-01 Her2 enriched -TCGA-BH-A0DI TCGA-BH-A0DI-01 Luminal A -TCGA-AO-A0JC TCGA-AO-A0JC-01 Luminal B -TCGA-A2-A0SV TCGA-A2-A0SV-01 Luminal B -TCGA-A2-A0T7 TCGA-A2-A0T7-01 Luminal A -TCGA-A1-A0SO TCGA-A1-A0SO-01 basal-like -TCGA-E2-A1B0 TCGA-E2-A1B0-01 Her2 enriched TCGA-D8-A140 TCGA-D8-A140-01 Luminal B -TCGA-BH-A0BF TCGA-BH-A0BF-01 Luminal B -TCGA-AO-A12G TCGA-AO-A12G-01 Luminal A -TCGA-A8-A07W TCGA-A8-A07W-01 Luminal B -TCGA-A8-A08Z TCGA-A8-A08Z-01 Luminal A -TCGA-AN-A0FW TCGA-AN-A0FW-01 Luminal A -TCGA-C8-A133 TCGA-C8-A133-01 Luminal A -TCGA-AR-A1AU TCGA-AR-A1AU-01 Luminal A -TCGA-B6-A0RO TCGA-B6-A0RO-01 Luminal A -TCGA-E2-A14W TCGA-E2-A14W-01 Luminal B -TCGA-E2-A158 TCGA-E2-A158-01 basal-like -TCGA-B6-A0X5 TCGA-B6-A0X5-01 Luminal B -TCGA-A8-A093 TCGA-A8-A093-01 Luminal A -TCGA-B6-A0WT TCGA-B6-A0WT-01 Luminal A -TCGA-A8-A08R TCGA-A8-A08R-01 basal-like -TCGA-BH-A0C7 TCGA-BH-A0C7-01 Luminal B -TCGA-BH-A0BV TCGA-BH-A0BV-01 Luminal A -TCGA-B6-A0RG TCGA-B6-A0RG-01 Luminal A -TCGA-AO-A0J3 TCGA-AO-A0J3-01 Luminal B -TCGA-C8-A12Z TCGA-C8-A12Z-01 Her2 enriched -TCGA-A7-A0CH TCGA-A7-A0CH-01 Luminal A -TCGA-A8-A08J TCGA-A8-A08J-01 Her2 enriched +TCGA-D8-A141 TCGA-D8-A141-01 Luminal A +TCGA-D8-A142 TCGA-D8-A142-01 basal-like +TCGA-D8-A143 TCGA-D8-A143-01 +TCGA-D8-A145 TCGA-D8-A145-01 Luminal A +TCGA-D8-A146 TCGA-D8-A146-01 Luminal A +TCGA-D8-A147 TCGA-D8-A147-01 basal-like +TCGA-D8-A1J8 TCGA-D8-A1J8-01 +TCGA-D8-A1J9 TCGA-D8-A1J9-01 +TCGA-D8-A1JA TCGA-D8-A1JA-01 +TCGA-D8-A1JB TCGA-D8-A1JB-01 +TCGA-D8-A1JC TCGA-D8-A1JC-01 +TCGA-D8-A1JD TCGA-D8-A1JD-01 +TCGA-D8-A1JE TCGA-D8-A1JE-01 +TCGA-D8-A1JF TCGA-D8-A1JF-01 +TCGA-D8-A1JG TCGA-D8-A1JG-01 +TCGA-D8-A1JH TCGA-D8-A1JH-01 +TCGA-D8-A1JI TCGA-D8-A1JI-01 +TCGA-D8-A1JJ TCGA-D8-A1JJ-01 +TCGA-D8-A1JK TCGA-D8-A1JK-01 +TCGA-D8-A1JL TCGA-D8-A1JL-01 +TCGA-D8-A1JM TCGA-D8-A1JM-01 +TCGA-D8-A1JN TCGA-D8-A1JN-01 +TCGA-D8-A1JP TCGA-D8-A1JP-01 +TCGA-D8-A1JS TCGA-D8-A1JS-01 +TCGA-D8-A1JT TCGA-D8-A1JT-01 +TCGA-D8-A1JU TCGA-D8-A1JU-01 +TCGA-D8-A1X5 TCGA-D8-A1X5-01 +TCGA-D8-A1X6 TCGA-D8-A1X6-01 +TCGA-D8-A1X7 TCGA-D8-A1X7-01 +TCGA-D8-A1X8 TCGA-D8-A1X8-01 +TCGA-D8-A1X9 TCGA-D8-A1X9-01 +TCGA-D8-A1XA TCGA-D8-A1XA-01 +TCGA-D8-A1XB TCGA-D8-A1XB-01 +TCGA-D8-A1XC TCGA-D8-A1XC-01 +TCGA-D8-A1XD TCGA-D8-A1XD-01 +TCGA-D8-A1XF TCGA-D8-A1XF-01 +TCGA-D8-A1XG TCGA-D8-A1XG-01 +TCGA-D8-A1XJ TCGA-D8-A1XJ-01 +TCGA-D8-A1XK TCGA-D8-A1XK-01 +TCGA-D8-A1XL TCGA-D8-A1XL-01 +TCGA-D8-A1XM TCGA-D8-A1XM-01 +TCGA-D8-A1XO TCGA-D8-A1XO-01 +TCGA-D8-A1XQ TCGA-D8-A1XQ-01 +TCGA-D8-A1XR TCGA-D8-A1XR-01 +TCGA-D8-A1XS TCGA-D8-A1XS-01 +TCGA-D8-A1XT TCGA-D8-A1XT-01 +TCGA-D8-A1XU TCGA-D8-A1XU-01 +TCGA-D8-A1XV TCGA-D8-A1XV-01 +TCGA-D8-A1XW TCGA-D8-A1XW-01 +TCGA-D8-A1XY TCGA-D8-A1XY-01 +TCGA-D8-A1XZ TCGA-D8-A1XZ-01 +TCGA-D8-A1Y0 TCGA-D8-A1Y0-01 +TCGA-D8-A1Y1 TCGA-D8-A1Y1-01 +TCGA-D8-A1Y2 TCGA-D8-A1Y2-01 +TCGA-D8-A1Y3 TCGA-D8-A1Y3-01 +TCGA-D8-A27E TCGA-D8-A27E-01 +TCGA-D8-A27F TCGA-D8-A27F-01 +TCGA-D8-A27G TCGA-D8-A27G-01 +TCGA-D8-A27H TCGA-D8-A27H-01 +TCGA-D8-A27I TCGA-D8-A27I-01 +TCGA-D8-A27K TCGA-D8-A27K-01 +TCGA-D8-A27L TCGA-D8-A27L-01 +TCGA-D8-A27M TCGA-D8-A27M-01 +TCGA-D8-A27N TCGA-D8-A27N-01 +TCGA-D8-A27P TCGA-D8-A27P-01 +TCGA-D8-A27R TCGA-D8-A27R-01 +TCGA-D8-A27T TCGA-D8-A27T-01 +TCGA-D8-A27V TCGA-D8-A27V-01 +TCGA-D8-A27W TCGA-D8-A27W-01 +TCGA-E2-A105 TCGA-E2-A105-01 Luminal A +TCGA-E2-A106 TCGA-E2-A106-01 Luminal A +TCGA-E2-A107 TCGA-E2-A107-01 Luminal B +TCGA-E2-A108 TCGA-E2-A108-01 Claudin low +TCGA-E2-A109 TCGA-E2-A109-01 Luminal B +TCGA-E2-A10A TCGA-E2-A10A-01 Luminal B +TCGA-E2-A10B TCGA-E2-A10B-01 Luminal A +TCGA-E2-A10C TCGA-E2-A10C-01 Luminal B +TCGA-E2-A10E TCGA-E2-A10E-01 Luminal A +TCGA-E2-A10F TCGA-E2-A10F-01 Luminal A +TCGA-E2-A14N TCGA-E2-A14N-01 basal-like TCGA-E2-A14O TCGA-E2-A14O-01 Luminal B +TCGA-E2-A14P TCGA-E2-A14P-01 Her2 enriched +TCGA-E2-A14Q TCGA-E2-A14Q-01 Luminal A +TCGA-E2-A14R TCGA-E2-A14R-01 basal-like +TCGA-E2-A14S TCGA-E2-A14S-01 Luminal B +TCGA-E2-A14T TCGA-E2-A14T-01 Luminal A +TCGA-E2-A14V TCGA-E2-A14V-01 Her2 enriched +TCGA-E2-A14W TCGA-E2-A14W-01 Luminal B +TCGA-E2-A14X TCGA-E2-A14X-01 basal-like +TCGA-E2-A14Y TCGA-E2-A14Y-01 basal-like +TCGA-E2-A14Z TCGA-E2-A14Z-01 Luminal A TCGA-E2-A150 TCGA-E2-A150-01 basal-like -TCGA-A8-A08H TCGA-A8-A08H-01 basal-like -TCGA-BH-A0B5 TCGA-BH-A0B5-01 Luminal B -TCGA-E2-A10A TCGA-E2-A10A-01 Luminal B -TCGA-A7-A0D9 TCGA-A7-A0D9-01 Luminal A -TCGA-A8-A0A6 TCGA-A8-A0A6-01 Luminal A -TCGA-BH-A18Q TCGA-BH-A18Q-01 basal-like -TCGA-A8-A06O TCGA-A8-A06O-01 Luminal B -TCGA-A2-A0ET TCGA-A2-A0ET-01 Luminal A -TCGA-A2-A0CY TCGA-A2-A0CY-01 Her2 enriched -TCGA-A8-A09Z TCGA-A8-A09Z-01 Luminal B -TCGA-BH-A18I TCGA-BH-A18I-01 Luminal A +TCGA-E2-A152 TCGA-E2-A152-01 Her2 enriched +TCGA-E2-A153 TCGA-E2-A153-01 Luminal A +TCGA-E2-A154 TCGA-E2-A154-01 Luminal A +TCGA-E2-A155 TCGA-E2-A155-01 Luminal B +TCGA-E2-A156 TCGA-E2-A156-01 Luminal A +TCGA-E2-A158 TCGA-E2-A158-01 basal-like +TCGA-E2-A159 TCGA-E2-A159-01 basal-like +TCGA-E2-A15A TCGA-E2-A15A-01 Luminal B +TCGA-E2-A15C TCGA-E2-A15C-01 Luminal A +TCGA-E2-A15D TCGA-E2-A15D-01 Luminal A +TCGA-E2-A15E TCGA-E2-A15E-01 Luminal A +TCGA-E2-A15E TCGA-E2-A15E-06 +TCGA-E2-A15F TCGA-E2-A15F-01 Luminal A TCGA-E2-A15G TCGA-E2-A15G-01 Luminal A -TCGA-AO-A03L TCGA-AO-A03L-01 Her2 enriched -TCGA-BH-A0HU TCGA-BH-A0HU-01 Luminal B -TCGA-BH-A1ET TCGA-BH-A1ET-01 Luminal A -TCGA-B6-A0IJ TCGA-B6-A0IJ-01 basal-like -TCGA-A7-A0DA TCGA-A7-A0DA-01 basal-like -TCGA-E2-A109 TCGA-E2-A109-01 Luminal B +TCGA-E2-A15H TCGA-E2-A15H-01 Luminal A +TCGA-E2-A15I TCGA-E2-A15I-01 Luminal A +TCGA-E2-A15J TCGA-E2-A15J-01 Luminal A +TCGA-E2-A15K TCGA-E2-A15K-01 Luminal B +TCGA-E2-A15L TCGA-E2-A15L-01 Luminal B +TCGA-E2-A15M TCGA-E2-A15M-01 Luminal B TCGA-E2-A15O TCGA-E2-A15O-01 Luminal A -TCGA-AN-A0FF TCGA-AN-A0FF-01 Luminal B -TCGA-A2-A0T1 TCGA-A2-A0T1-01 Her2 enriched -TCGA-A2-A0YH TCGA-A2-A0YH-01 Luminal B -TCGA-A2-A0CQ TCGA-A2-A0CQ-01 Luminal A -TCGA-A2-A0D2 TCGA-A2-A0D2-01 basal-like -TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_UNDEFINED -TCGA-BH-A0DO TCGA-BH-A0DO-01 Luminal A -TCGA-BH-A0E0 TCGA-BH-A0E0-01 basal-like -TCGA-B6-A0IB TCGA-B6-A0IB-01 Luminal B -TCGA-AO-A125 TCGA-AO-A125-01 Luminal A -TCGA-BH-A0WA TCGA-BH-A0WA-01 basal-like -TCGA-AN-A0XO TCGA-AN-A0XO-01 Luminal A -TCGA-AR-A0TV TCGA-AR-A0TV-01 Luminal B -TCGA-AN-A0XW TCGA-AN-A0XW-01 Luminal B -TCGA-A7-A13D TCGA-A7-A13D-01 basal-like -TCGA-A8-A09R TCGA-A8-A09R-01 Luminal B -TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HOMOZYGOUS -TCGA-A8-A09B TCGA-A8-A09B-01 Luminal A -TCGA-BH-A0H5 TCGA-BH-A0H5-01 Luminal A -TCGA-AO-A0JD TCGA-AO-A0JD-01 Luminal B -TCGA-BH-A0BM TCGA-BH-A0BM-01 Luminal A -TCGA-BH-A0DH TCGA-BH-A0DH-01 Luminal A +TCGA-E2-A15P TCGA-E2-A15P-01 Luminal A +TCGA-E2-A15R TCGA-E2-A15R-01 Luminal A +TCGA-E2-A15S TCGA-E2-A15S-01 Luminal B +TCGA-E2-A15T TCGA-E2-A15T-01 Luminal B +TCGA-E2-A1AZ TCGA-E2-A1AZ-01 +TCGA-E2-A1B0 TCGA-E2-A1B0-01 Her2 enriched TCGA-E2-A1B1 TCGA-E2-A1B1-01 Luminal A -TCGA-A2-A0SW TCGA-A2-A0SW-01 Luminal B -TCGA-AN-A0FN TCGA-AN-A0FN-01 Luminal A -TCGA-AO-A12F TCGA-AO-A12F-01 basal-like -TCGA-AN-A0FV TCGA-AN-A0FV-01 Her2 enriched -TCGA-A8-A07P TCGA-A8-A07P-01 Luminal A -TCGA-A8-A081 TCGA-A8-A081-01 Her2 enriched -TCGA-B6-A0RV TCGA-B6-A0RV-01 Luminal A -TCGA-C8-A12K TCGA-C8-A12K-01 basal-like -TCGA-AO-A0JL TCGA-AO-A0JL-01 basal-like -TCGA-C8-A134 TCGA-C8-A134-01 basal-like -TCGA-AR-A1AV TCGA-AR-A1AV-01 Luminal B -TCGA-B6-A0RN TCGA-B6-A0RN-01 Luminal A -TCGA-E2-A14V TCGA-E2-A14V-01 Her2 enriched -TCGA-A8-A092 TCGA-A8-A092-01 Her2 enriched -TCGA-D8-A141 TCGA-D8-A141-01 Luminal A -TCGA-C8-A1HI TCGA-C8-A1HI-01 Luminal A -TCGA-AR-A1AN TCGA-AR-A1AN-01 Luminal A -TCGA-AO-A0J4 TCGA-AO-A0J4-01 basal-like -TCGA-A8-A08A TCGA-A8-A08A-01 Luminal A -TCGA-A7-A0CG TCGA-A7-A0CG-01 Luminal A -TCGA-BH-A0EI TCGA-BH-A0EI-01 Luminal A -TCGA-E2-A14N TCGA-E2-A14N-01 basal-like +TCGA-E2-A1B4 TCGA-E2-A1B4-01 Luminal A +TCGA-E2-A1B5 TCGA-E2-A1B5-01 basal-like +TCGA-E2-A1B6 TCGA-E2-A1B6-01 Luminal A +TCGA-E2-A1BC TCGA-E2-A1BC-01 Luminal A +TCGA-E2-A1BD TCGA-E2-A1BD-01 Luminal A +TCGA-E2-A1IE TCGA-E2-A1IE-01 +TCGA-E2-A1IF TCGA-E2-A1IF-01 +TCGA-E2-A1IG TCGA-E2-A1IG-01 +TCGA-E2-A1IH TCGA-E2-A1IH-01 +TCGA-E2-A1II TCGA-E2-A1II-01 +TCGA-E2-A1IJ TCGA-E2-A1IJ-01 +TCGA-E2-A1IK TCGA-E2-A1IK-01 +TCGA-E2-A1IL TCGA-E2-A1IL-01 +TCGA-E2-A1IN TCGA-E2-A1IN-01 +TCGA-E2-A1IO TCGA-E2-A1IO-01 +TCGA-E2-A1IP TCGA-E2-A1IP-01 +TCGA-E2-A1IU TCGA-E2-A1IU-01 +TCGA-E2-A1L6 TCGA-E2-A1L6-01 +TCGA-E2-A1L7 TCGA-E2-A1L7-01 +TCGA-E2-A1L8 TCGA-E2-A1L8-01 +TCGA-E2-A1L9 TCGA-E2-A1L9-01 +TCGA-E2-A1LA TCGA-E2-A1LA-01 +TCGA-E2-A1LB TCGA-E2-A1LB-01 +TCGA-E2-A1LG TCGA-E2-A1LG-01 +TCGA-E2-A1LH TCGA-E2-A1LH-01 +TCGA-E2-A1LI TCGA-E2-A1LI-01 +TCGA-E2-A1LK TCGA-E2-A1LK-01 +TCGA-E2-A1LL TCGA-E2-A1LL-01 +TCGA-E2-A1LS TCGA-E2-A1LS-01 +TCGA-E9-A1N3 TCGA-E9-A1N3-01 +TCGA-E9-A1N4 TCGA-E9-A1N4-01 +TCGA-E9-A1N5 TCGA-E9-A1N5-01 +TCGA-E9-A1N6 TCGA-E9-A1N6-01 +TCGA-E9-A1N8 TCGA-E9-A1N8-01 +TCGA-E9-A1N9 TCGA-E9-A1N9-01 +TCGA-E9-A1NA TCGA-E9-A1NA-01 +TCGA-E9-A1NC TCGA-E9-A1NC-01 +TCGA-E9-A1ND TCGA-E9-A1ND-01 +TCGA-E9-A1NE TCGA-E9-A1NE-01 +TCGA-E9-A1NF TCGA-E9-A1NF-01 +TCGA-E9-A1NG TCGA-E9-A1NG-01 +TCGA-E9-A1NH TCGA-E9-A1NH-01 +TCGA-E9-A1NI TCGA-E9-A1NI-01 +TCGA-E9-A1QZ TCGA-E9-A1QZ-01 +TCGA-E9-A1R0 TCGA-E9-A1R0-01 +TCGA-E9-A1R2 TCGA-E9-A1R2-01 +TCGA-E9-A1R3 TCGA-E9-A1R3-01 +TCGA-E9-A1R4 TCGA-E9-A1R4-01 +TCGA-E9-A1R5 TCGA-E9-A1R5-01 +TCGA-E9-A1R6 TCGA-E9-A1R6-01 +TCGA-E9-A1R7 TCGA-E9-A1R7-01 +TCGA-E9-A1RA TCGA-E9-A1RA-01 +TCGA-E9-A1RB TCGA-E9-A1RB-01 +TCGA-E9-A1RC TCGA-E9-A1RC-01 +TCGA-E9-A1RD TCGA-E9-A1RD-01 +TCGA-E9-A1RE TCGA-E9-A1RE-01 +TCGA-E9-A1RF TCGA-E9-A1RF-01 +TCGA-E9-A1RG TCGA-E9-A1RG-01 +TCGA-E9-A1RH TCGA-E9-A1RH-01 +TCGA-E9-A1RI TCGA-E9-A1RI-01 +TCGA-E9-A226 TCGA-E9-A226-01 +TCGA-E9-A227 TCGA-E9-A227-01 +TCGA-E9-A228 TCGA-E9-A228-01 +TCGA-E9-A229 TCGA-E9-A229-01 +TCGA-E9-A22A TCGA-E9-A22A-01 +TCGA-E9-A22B TCGA-E9-A22B-01 +TCGA-E9-A22D TCGA-E9-A22D-01 +TCGA-E9-A22E TCGA-E9-A22E-01 +TCGA-E9-A22G TCGA-E9-A22G-01 +TCGA-E9-A22H TCGA-E9-A22H-01 +TCGA-E9-A243 TCGA-E9-A243-01 +TCGA-E9-A244 TCGA-E9-A244-01 +TCGA-E9-A245 TCGA-E9-A245-01 +TCGA-E9-A247 TCGA-E9-A247-01 +TCGA-E9-A248 TCGA-E9-A248-01 +TCGA-E9-A249 TCGA-E9-A249-01 +TCGA-E9-A24A TCGA-E9-A24A-01 +TCGA-E9-A295 TCGA-E9-A295-01 +TCGA-EW-A1IW TCGA-EW-A1IW-01 +TCGA-EW-A1IX TCGA-EW-A1IX-01 +TCGA-EW-A1IY TCGA-EW-A1IY-01 +TCGA-EW-A1IZ TCGA-EW-A1IZ-01 +TCGA-EW-A1J1 TCGA-EW-A1J1-01 +TCGA-EW-A1J2 TCGA-EW-A1J2-01 +TCGA-EW-A1J3 TCGA-EW-A1J3-01 +TCGA-EW-A1J5 TCGA-EW-A1J5-01 +TCGA-EW-A1J6 TCGA-EW-A1J6-01 +TCGA-EW-A1OV TCGA-EW-A1OV-01 +TCGA-EW-A1OW TCGA-EW-A1OW-01 +TCGA-EW-A1OX TCGA-EW-A1OX-01 +TCGA-EW-A1OY TCGA-EW-A1OY-01 +TCGA-EW-A1OZ TCGA-EW-A1OZ-01 +TCGA-EW-A1P0 TCGA-EW-A1P0-01 +TCGA-EW-A1P1 TCGA-EW-A1P1-01 +TCGA-EW-A1P3 TCGA-EW-A1P3-01 +TCGA-EW-A1P4 TCGA-EW-A1P4-01 +TCGA-EW-A1P5 TCGA-EW-A1P5-01 +TCGA-EW-A1P6 TCGA-EW-A1P6-01 +TCGA-EW-A1P7 TCGA-EW-A1P7-01 +TCGA-EW-A1P8 TCGA-EW-A1P8-01 +TCGA-EW-A1PA TCGA-EW-A1PA-01 +TCGA-EW-A1PB TCGA-EW-A1PB-01 +TCGA-EW-A1PD TCGA-EW-A1PD-01 +TCGA-EW-A1PE TCGA-EW-A1PE-01 +TCGA-EW-A1PF TCGA-EW-A1PF-01 +TCGA-EW-A1PG TCGA-EW-A1PG-01 +TCGA-EW-A1PH TCGA-EW-A1PH-01 +TCGA-EW-A2FS TCGA-EW-A2FS-01 +TCGA-EW-A2FV TCGA-EW-A2FV-01 +TCGA-EW-A2FW TCGA-EW-A2FW-01 +TCGA-GI-A2C8 TCGA-GI-A2C8-01 +TCGA-GM-A2D9 TCGA-GM-A2D9-01 +TCGA-GM-A2DA TCGA-GM-A2DA-01 +TCGA-GM-A2DB TCGA-GM-A2DB-01 +TCGA-GM-A2DC TCGA-GM-A2DC-01 +TCGA-GM-A2DD TCGA-GM-A2DD-01 +TCGA-GM-A2DF TCGA-GM-A2DF-01 +TCGA-GM-A2DH TCGA-GM-A2DH-01 +TCGA-GM-A2DI TCGA-GM-A2DI-01 +TCGA-GM-A2DK TCGA-GM-A2DK-01 +TCGA-GM-A2DL TCGA-GM-A2DL-01 +TCGA-GM-A2DM TCGA-GM-A2DM-01 +TCGA-GM-A2DN TCGA-GM-A2DN-01 +TCGA-GM-A2DO TCGA-GM-A2DO-01 +TEST_PATIENT_1 TEST_SAMPLE_1 +TEST_PATIENT_10 TEST_SAMPLE_10 +TEST_PATIENT_11 TEST_SAMPLE_11 +TEST_PATIENT_12 TEST_SAMPLE_12 +TEST_PATIENT_13 TEST_SAMPLE_13 +TEST_PATIENT_14 TEST_SAMPLE_14 +TEST_PATIENT_15 TEST_SAMPLE_15 +TEST_PATIENT_2 TEST_SAMPLE_2 +TEST_PATIENT_3 TEST_SAMPLE_3 +TEST_PATIENT_4 TEST_SAMPLE_4 +TEST_PATIENT_5 TEST_SAMPLE_5 +TEST_PATIENT_6 TEST_SAMPLE_6 +TEST_PATIENT_7 TEST_SAMPLE_7 +TEST_PATIENT_8 TEST_SAMPLE_8 +TEST_PATIENT_9 TEST_SAMPLE_9 +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HETEROZYGOUS +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HOMOZYGOUS +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_UNDEFINED +TEST-A23C TEST-A23C-01 +TEST-A23E TEST-A23E-01 +TEST-A23H TEST-A23H-01 +TEST-A2B8 TEST-A2B8-01 +TEST-A2FB TEST-A2FB-01 +TEST-A2FF TEST-A2FF-01 +TEST-A2FG TEST-A2FG-01 diff --git a/test/test_data/study_es_0_import_export/data_mutations.txt b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt similarity index 98% rename from test/test_data/study_es_0_import_export/data_mutations.txt rename to test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt index 5d181f48041..594c8bb4449 100644 --- a/test/test_data/study_es_0_import_export/data_mutations.txt +++ b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt @@ -1,35 +1,35 @@ Hugo_Symbol Entrez_Gene_Id Center NCBI_Build Chromosome Start_Position End_Position Strand Variant_Classification Variant_Type Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 dbSNP_RS dbSNP_Val_Status Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Match_Norm_Seq_Allele1 Match_Norm_Seq_Allele2 Tumor_Validation_Allele1 Tumor_Validation_Allele2 Match_Norm_Validation_Allele1 Match_Norm_Validation_Allele2 Verification_Status Validation_Status Mutation_Status Sequencing_Phase Sequence_Source Validation_Method Score BAM_File Sequencer HGVSp_Short t_alt_count t_ref_count n_alt_count n_ref_count -BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_UNDEFINED TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HETEROZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HOMOZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_1 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_15 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_4 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_3 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_2 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_1 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_3 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_4 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ATM 472 genome.wustl.edu GRCh37 11 108173702 108173702 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 - G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +ATM 472 genome.wustl.edu GRCh37 11 108106472 108106472 + Frame_Shift_Del DEL T - - novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Nonsense_Mutation SNP G A A rs80357262 NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HETEROZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HOMOZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_UNDEFINED TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41201181 41201181 + Missense_Mutation SNP C A A rs80357069 byCluster TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +BRCA2 675 genome.wustl.edu GRCh37 13 108106473 108106473 + Nonsense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106474 108106474 + Nonsense_Mutation SNP T C C NA NA TCGA-A2-A04P-01 TCGA-A2-A04P-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106475 108106475 + In_Frame_Del DEL T - - NA NA TCGA-A1-A0SK-01 TCGA-A1-A0SK-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106476 108106476 + In_Frame_Del DEL T - - NA NA TCGA-A2-A0CM-01 TCGA-A2-A0CM-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106477 108106477 + Missense_Mutation SNP T C C NA NA TCGA-AR-A1AR-01 TCGA-AR-A1AR-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106478 108106478 + Missense_Mutation SNP T C C NA NA TCGA-B6-A0WX-01 TCGA-B6-A0WX-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106479 108106479 + Nonsense_Mutation SNP T C C NA NA TCGA-BH-A1F0-01 TCGA-BH-A1F0-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106480 108106480 + Nonsense_Mutation SNP T C C NA NA TCGA-B6-A0I6-01 TCGA-B6-A0I6-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106481 108106481 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18V-01 TCGA-BH-A18V-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106482 108106482 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18K-01 TCGA-BH-A18K-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106483 108106483 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0HL-01 TCGA-BH-A0HL-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA +BRCA2 675 genome.wustl.edu GRCh37 13 108106484 108106484 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0E0-01 TCGA-BH-A0E0-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +DTNB 1838 genome.wustl.edu GRCh37 2 25678299 25678299 + Missense_Mutation SNP C T T NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +ABLIM1 3983 genome.wustl.edu GRCh37 10 116247760 116247760 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MSH3 4437 genome.wustl.edu GRCh37 5 80024722 80024722 + Frame_Shift_Del DEL T - - NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MYB 4602 genome.wustl.edu GRCh37 6 135507043 135507044 + Frame_Shift_Ins INS - A A NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 - - NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -PIEZO1 9780 genome.wustl.edu GRCh37 16 88790292 88790292 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx TP53 7157 genome.wustl.edu GRCh37 17 7578253 7578253 + Missense_Mutation SNP C A A NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A C NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx +PIEZO1 9780 genome.wustl.edu GRCh37 16 88790292 88790292 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +ADAMTS20 80070 genome.wustl.edu GRCh37 12 43944926 43944926 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx OR11H1 81061 genome.wustl.edu GRCh37 22 16449539 16449539 + Missense_Mutation SNP A G G NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx TMEM247 388946 genome.wustl.edu GRCh37 2 46707888 46707888 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 G G NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -ABLIM1 3983 genome.wustl.edu GRCh37 10 116247760 116247760 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -ADAMTS20 80070 genome.wustl.edu GRCh37 12 43944926 43944926 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -DTNB 1838 genome.wustl.edu GRCh37 2 25678299 25678299 + Missense_Mutation SNP C T T NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Nonsense_Mutation SNP G A A rs80357262 NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -BRCA1 672 genome.wustl.edu GRCh37 17 41201181 41201181 + Missense_Mutation SNP C A A rs80357069 byCluster TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx -ATM 472 genome.wustl.edu GRCh37 11 108173702 108173702 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 - G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -ATM 472 genome.wustl.edu GRCh37 11 108106472 108106472 + Frame_Shift_Del DEL T - - novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx -BRCA2 675 genome.wustl.edu GRCh37 13 108106473 108106473 + Nonsense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106484 108106484 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0E0-01 TCGA-BH-A0E0-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106483 108106483 + Missense_Mutation SNP T C C NA NA TCGA-BH-A0HL-01 TCGA-BH-A0HL-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106482 108106482 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18K-01 TCGA-BH-A18K-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106481 108106481 + In_Frame_Del DEL T - - NA NA TCGA-BH-A18V-01 TCGA-BH-A18V-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106480 108106480 + Nonsense_Mutation SNP T C C NA NA TCGA-B6-A0I6-01 TCGA-B6-A0I6-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106479 108106479 + Nonsense_Mutation SNP T C C NA NA TCGA-BH-A1F0-01 TCGA-BH-A1F0-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106478 108106478 + Missense_Mutation SNP T C C NA NA TCGA-B6-A0WX-01 TCGA-B6-A0WX-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106477 108106477 + Missense_Mutation SNP T C C NA NA TCGA-AR-A1AR-01 TCGA-AR-A1AR-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106476 108106476 + In_Frame_Del DEL T - - NA NA TCGA-A2-A0CM-01 TCGA-A2-A0CM-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106475 108106475 + In_Frame_Del DEL T - - NA NA TCGA-A1-A0SK-01 TCGA-A1-A0SK-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA -BRCA2 675 genome.wustl.edu GRCh37 13 108106474 108106474 + Nonsense_Mutation SNP T C C NA NA TCGA-A2-A04P-01 TCGA-A2-A04P-10 NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA diff --git a/test/test_data/study_es_0_import_export/meta_clinical_patient_attributes.txt b/test/test_data/study_es_0_import_export/meta_clinical_patient_attributes.txt new file mode 100644 index 00000000000..5c5ad664971 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_clinical_patient_attributes.txt @@ -0,0 +1,4 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: CLINICAL +datatype: PATIENT_ATTRIBUTES +data_filename: data_clinical_patient_attributes.txt diff --git a/test/test_data/study_es_0_import_export/meta_clinical_samples.txt b/test/test_data/study_es_0_import_export/meta_clinical_sample_attributes.txt similarity index 68% rename from test/test_data/study_es_0_import_export/meta_clinical_samples.txt rename to test/test_data/study_es_0_import_export/meta_clinical_sample_attributes.txt index c3cdc6773ed..ccff7f668fb 100644 --- a/test/test_data/study_es_0_import_export/meta_clinical_samples.txt +++ b/test/test_data/study_es_0_import_export/meta_clinical_sample_attributes.txt @@ -1,4 +1,4 @@ cancer_study_identifier: study_es_0_import_export genetic_alteration_type: CLINICAL datatype: SAMPLE_ATTRIBUTES -data_filename: data_clinical_samples.txt +data_filename: data_clinical_sample_attributes.txt diff --git a/test/test_data/study_es_0_import_export/meta_mutations.txt b/test/test_data/study_es_0_import_export/meta_mutation_extended_maf_mutations.txt similarity index 76% rename from test/test_data/study_es_0_import_export/meta_mutations.txt rename to test/test_data/study_es_0_import_export/meta_mutation_extended_maf_mutations.txt index c9bb93bfae1..f0eec9d2f70 100644 --- a/test/test_data/study_es_0_import_export/meta_mutations.txt +++ b/test/test_data/study_es_0_import_export/meta_mutation_extended_maf_mutations.txt @@ -1,8 +1,9 @@ cancer_study_identifier: study_es_0_import_export genetic_alteration_type: MUTATION_EXTENDED datatype: MAF -data_filename: data_mutations.txt stable_id: mutations show_profile_in_analysis_tab: true profile_name: Mutations profile_description: Mutation data from whole exome sequencing. +patient_level: false +data_filename: data_mutation_extended_maf_mutations.txt diff --git a/test/test_data/study_es_0_import_export/meta_study.txt b/test/test_data/study_es_0_import_export/meta_study.txt index 277e2cff81f..8e02ccc2fed 100644 --- a/test/test_data/study_es_0_import_export/meta_study.txt +++ b/test/test_data/study_es_0_import_export/meta_study.txt @@ -1,9 +1,8 @@ -type_of_cancer: brca cancer_study_identifier: study_es_0_import_export +type_of_cancer: brca-es0 name: Test study es_0 description: Test study es_0 citation: Cell 2018 pmid: 29625048,29596782,29622463,29617662,29625055,29625050 groups: SU2C-PI3K;PUBLIC;GDAC -add_global_case_list: true reference_genome: hg19 From 86cdbf0dd4a1109d6c7343a370e5a153e2021f32 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 09:10:51 +0200 Subject: [PATCH 14/69] Return 404 http status when no study exists --- .../application/file/export/ExportConfig.java | 2 +- .../file/export/ExportController.java | 13 +++++++---- .../file/export/services/ExportService.java | 22 +++++-------------- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index ab6bd0ac77f..9a9cea3a217 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -29,7 +29,7 @@ //Details //Have Table(inherits closable iterator of sequence map) interface that explains what it promises. Ensure it in the code? //Ensure flow of data is ordered correctly (patient id, sample id, etc) -//Make export request return 404 if no study found +//Make export request return 404 if no study found (done) //catch exceptions in the exporters and return them as README.ERRORS.txt @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 25bd0d1f1a0..c6aef083352 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export; import jakarta.servlet.http.HttpServletResponse; +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.export.services.ExportService; import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; @@ -23,22 +24,26 @@ public class ExportController { private static final Logger LOG = LoggerFactory.getLogger(ExportController.class); private final ExportService exportService; + private final CancerStudyMetadataService cancerStudyMetadataService; - public ExportController(ExportService exportService) { + public ExportController(CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { this.exportService = exportService; + this.cancerStudyMetadataService = cancerStudyMetadataService; } @PreAuthorize("hasPermission(#studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") @GetMapping("/export/study/{studyId}.zip") public void downloadStudyData(HttpServletResponse response, @PathVariable String studyId) throws IOException { + if (cancerStudyMetadataService.getCancerStudyMetadata(studyId) == null) { + response.setStatus(HttpServletResponse.SC_NOT_FOUND); + return; + } response.setContentType(("application/zip")); response.setHeader("Content-Disposition", "attachment; filename=\"" + studyId + ".zip\""); try (OutputStream out = response.getOutputStream(); BufferedOutputStream bof = new BufferedOutputStream(out); ZipOutputStreamWriterFactory zipOutputStreamWriterFactory = new ZipOutputStreamWriterFactory(bof)) { - if (!exportService.exportData(zipOutputStreamWriterFactory, studyId)) { - response.setStatus(HttpServletResponse.SC_NOT_FOUND); - } + exportService.exportData(zipOutputStreamWriterFactory, studyId); } catch (Exception e) { //Should error handling be done here? LOG.error("Error exporting study data", e); diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index ff6db078441..2ea8136270c 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -1,6 +1,5 @@ package org.cbioportal.application.file.export.services; -import org.cbioportal.application.file.export.exporters.CancerStudyMetadataExporter; import org.cbioportal.application.file.export.exporters.Exporter; import org.cbioportal.application.file.utils.FileWriterFactory; import org.slf4j.Logger; @@ -8,7 +7,6 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; -import java.util.Optional; public class ExportService implements Exporter { @@ -25,25 +23,15 @@ public ExportService( @Transactional @Override public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { - Optional cancerStudyMetadataExporterOptional = exporters.stream().filter(exporter -> exporter instanceof CancerStudyMetadataExporter).findFirst(); - if (cancerStudyMetadataExporterOptional.isEmpty()) { - throw new RuntimeException("CancerStudyMetadataExporter is not found"); - } - Exporter cancerStudyMetadataExporter = cancerStudyMetadataExporterOptional.get(); - if (!cancerStudyMetadataExporter.exportData(fileWriterFactory, studyId)) { - LOG.error("No data found for studyId: {} using exporter: {}", studyId, cancerStudyMetadataExporter.getClass().getSimpleName()); - return false; - } + boolean atLeastOneDataFileExportedSuccesfully = false; for (Exporter exporter : exporters) { - if (exporter == cancerStudyMetadataExporter) { - continue; - } - boolean exportedData = exporter.exportData(fileWriterFactory, studyId); + boolean exportedDataType = exporter.exportData(fileWriterFactory, studyId); LOG.debug("{} data for studyId: {} using exporter: {}", - exportedData ? "Exported" : "No data exported", + exportedDataType ? "Exported" : "No data exported", studyId, exporter.getClass().getSimpleName()); + atLeastOneDataFileExportedSuccesfully |= exportedDataType; } - return true; + return atLeastOneDataFileExportedSuccesfully; } } From 93b6f74a85072bbf514b35f6a800f6d85154779e Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 14:40:37 +0200 Subject: [PATCH 15/69] Make sure the rows are ordered by sample/patient IDs We do defensieve assumption check to make sure clinical file rows will be formed correctly --- ...icalPatientAttributesDataTypeExporter.java | 4 +- ...nicalSampleAttributesDataTypeExporter.java | 4 +- .../mappers/ClinicalAttributeDataMapper.java | 7 +- .../ClinicalAttributeDataService.java | 7 +- .../file/model/ClinicalAttributeValue.java | 43 ++++++++++-- .../file/model/ClinicalAttributesTable.java | 15 ++-- .../model/ClinicalPatientAttributeValue.java | 58 ---------------- .../model/ClinicalSampleAttributeValue.java | 69 ------------------- .../export/ClinicalAttributeDataMapper.xml | 27 ++++---- ...linicalAttributeDataTypeExporterTests.java | 29 +++++--- 10 files changed, 88 insertions(+), 175 deletions(-) delete mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java delete mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java index a86f16b5163..e75a84b449a 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java @@ -2,9 +2,9 @@ import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalAttributeValue; import org.cbioportal.application.file.model.ClinicalAttributesMetadata; import org.cbioportal.application.file.model.ClinicalAttributesTable; -import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; import org.cbioportal.application.file.utils.CloseableIterator; import java.util.ArrayList; @@ -35,7 +35,7 @@ protected ClinicalAttributesTable getData(String studyId) { List clinicalPatientAttributes = new ArrayList<>(); clinicalPatientAttributes.add(ClinicalAttribute.PATIENT_ID); clinicalPatientAttributes.addAll(clinicalDataAttributeDataService.getClinicalPatientAttributes(studyId)); - CloseableIterator clinicalPatientAttributeValues = clinicalDataAttributeDataService.getClinicalPatientAttributeValues(studyId); + CloseableIterator clinicalPatientAttributeValues = clinicalDataAttributeDataService.getClinicalPatientAttributeValues(studyId); return new ClinicalAttributesTable(clinicalPatientAttributes, clinicalPatientAttributeValues); } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java index c65986586c9..25c8330fbe2 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java @@ -2,9 +2,9 @@ import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.model.ClinicalAttribute; +import org.cbioportal.application.file.model.ClinicalAttributeValue; import org.cbioportal.application.file.model.ClinicalAttributesMetadata; import org.cbioportal.application.file.model.ClinicalAttributesTable; -import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; import org.cbioportal.application.file.utils.CloseableIterator; import java.util.ArrayList; @@ -36,7 +36,7 @@ protected ClinicalAttributesTable getData(String studyId) { clinicalSampleAttributes.add(ClinicalAttribute.PATIENT_ID); clinicalSampleAttributes.add(ClinicalAttribute.SAMPLE_ID); clinicalSampleAttributes.addAll(clinicalDataAttributeDataService.getClinicalSampleAttributes(studyId)); - CloseableIterator clinicalSampleAttributeValues = clinicalDataAttributeDataService.getClinicalSampleAttributeValues(studyId); + CloseableIterator clinicalSampleAttributeValues = clinicalDataAttributeDataService.getClinicalSampleAttributeValues(studyId); return new ClinicalAttributesTable(clinicalSampleAttributes, clinicalSampleAttributeValues); } } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java index dd7d59f1713..c0574afd6c7 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java @@ -2,8 +2,7 @@ import org.apache.ibatis.cursor.Cursor; import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; -import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.model.ClinicalAttributeValue; import java.util.List; @@ -11,11 +10,11 @@ public interface ClinicalAttributeDataMapper { List getClinicalSampleAttributes(String studyId); - Cursor getClinicalSampleAttributeValues(String studyId); + Cursor getClinicalSampleAttributeValues(String studyId); List getClinicalPatientAttributes(String studyId); - Cursor getClinicalPatientAttributeValues(String studyId); + Cursor getClinicalPatientAttributeValues(String studyId); boolean hasClinicalPatientAttributes(String studyId); diff --git a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java index 4a7824fbcac..cf21b7e2e74 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java @@ -2,8 +2,7 @@ import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; -import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.model.ClinicalAttributeValue; import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; @@ -20,7 +19,7 @@ public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttribut this.clinicalAttributeDataMapper = clinicalAttributeDataMapper; } - public CloseableIterator getClinicalSampleAttributeValues(String studyId) { + public CloseableIterator getClinicalSampleAttributeValues(String studyId) { return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId)); } @@ -28,7 +27,7 @@ public List getClinicalSampleAttributes(String studyId) { return clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId); } - public CloseableIterator getClinicalPatientAttributeValues(String studyId) { + public CloseableIterator getClinicalPatientAttributeValues(String studyId) { return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId)); } diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java index f44dbdeb3cd..60589799ed6 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java @@ -1,8 +1,41 @@ package org.cbioportal.application.file.model; -import java.util.SequencedMap; +public class ClinicalAttributeValue { + private Long rowKey; + private String attributeId; + private String attributeValue; -public interface ClinicalAttributeValue { - SequencedMap getKey(); - SequencedMap getValue(); -} + public ClinicalAttributeValue() { + super(); + } + + public ClinicalAttributeValue(Long rowKey, String attributeId, String attributeValue) { + this.rowKey = rowKey; + this.attributeId = attributeId; + this.attributeValue = attributeValue; + } + + public void setRowKey(Long rowKey) { + this.rowKey = rowKey; + } + + public Long getRowKey() { + return rowKey; + } + + public String getAttributeId() { + return attributeId; + } + + public void setAttributeId(String attributeId) { + this.attributeId = attributeId; + } + + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } +} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java index a2b57a8c289..9a610f7b264 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java @@ -14,10 +14,10 @@ public class ClinicalAttributesTable implements CloseableIterator attributes; private final Closeable closeable; - private PeekingIterator rowIterator; + private PeekingIterator rowIterator; private final LinkedHashSet header; - public ClinicalAttributesTable(List attributes, CloseableIterator data) { + public ClinicalAttributesTable(List attributes, CloseableIterator data) { this.attributes = attributes; this.header = attributes.stream().map(ClinicalAttribute::getAttributeId).collect(Collectors.toCollection(LinkedHashSet::new)); this.closeable = data; @@ -33,13 +33,16 @@ public boolean hasNext() { public SequencedMap next() { if (rowIterator.hasNext()) { ClinicalAttributeValue clinicalAttributeValue = rowIterator.next(); - var attributeValueMap = new HashMap<>(clinicalAttributeValue.getValue()); + if (rowIterator.hasNext() && clinicalAttributeValue.getRowKey().compareTo(rowIterator.peek().getRowKey()) > 0) { + throw new IllegalStateException("The keys are not in ascending order:" + clinicalAttributeValue.getRowKey() + " and " + rowIterator.peek().getRowKey()); + } + var attributeValueMap = new HashMap(); + attributeValueMap.put(clinicalAttributeValue.getAttributeId(), clinicalAttributeValue.getAttributeValue()); while (rowIterator.hasNext() - && rowIterator.peek().getKey().equals(clinicalAttributeValue.getKey())) { + && rowIterator.peek().getRowKey().equals(clinicalAttributeValue.getRowKey())) { clinicalAttributeValue = rowIterator.next(); - attributeValueMap.putAll(clinicalAttributeValue.getValue()); + attributeValueMap.put(clinicalAttributeValue.getAttributeId(), clinicalAttributeValue.getAttributeValue()); } - attributeValueMap.putAll(clinicalAttributeValue.getKey()); var result = new LinkedHashMap(); header.forEach(attributeId -> result.put(attributeId, attributeValueMap.remove(attributeId))); if (!attributeValueMap.isEmpty()) { diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java deleted file mode 100644 index 78e66e97933..00000000000 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalPatientAttributeValue.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.cbioportal.application.file.model; - -import java.util.LinkedHashMap; -import java.util.SequencedMap; - -public class ClinicalPatientAttributeValue implements ClinicalAttributeValue { - private String patientId; - private String attributeId; - private String attributeValue; - - public ClinicalPatientAttributeValue() { - super(); - } - - public ClinicalPatientAttributeValue(String patientId, String attributeId, String attributeValue) { - this.patientId = patientId; - this.attributeId = attributeId; - this.attributeValue = attributeValue; - } - - public String getPatientId() { - return patientId; - } - - public void setPatientId(String patientId) { - this.patientId = patientId; - } - - public String getAttributeId() { - return attributeId; - } - - public void setAttributeId(String attributeId) { - this.attributeId = attributeId; - } - - public String getAttributeValue() { - return attributeValue; - } - - public void setAttributeValue(String attributeValue) { - this.attributeValue = attributeValue; - } - - public SequencedMap getKey() { - var key = new LinkedHashMap(); - key.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), patientId); - return key; - } - - public SequencedMap getValue() { - var value = new LinkedHashMap(); - if (attributeId != null) { - value.put(attributeId, attributeValue); - } - return value; - } -} \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java deleted file mode 100644 index 2949271852c..00000000000 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalSampleAttributeValue.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.cbioportal.application.file.model; - -import java.util.LinkedHashMap; -import java.util.SequencedMap; - -public class ClinicalSampleAttributeValue implements ClinicalAttributeValue { - private String patientId; - private String sampleId; - private String attributeId; - private String attributeValue; - - public ClinicalSampleAttributeValue() { - super(); - } - - public ClinicalSampleAttributeValue(String patientId, String sampleId, String attributeId, String attributeValue) { - this.patientId = patientId; - this.sampleId = sampleId; - this.attributeId = attributeId; - this.attributeValue = attributeValue; - } - - public String getPatientId() { - return patientId; - } - - public void setPatientId(String patientId) { - this.patientId = patientId; - } - - public String getSampleId() { - return sampleId; - } - - public void setSampleId(String sampleId) { - this.sampleId = sampleId; - } - - public String getAttributeId() { - return attributeId; - } - - public void setAttributeId(String attributeId) { - this.attributeId = attributeId; - } - - public String getAttributeValue() { - return attributeValue; - } - - public void setAttributeValue(String attributeValue) { - this.attributeValue = attributeValue; - } - - public SequencedMap getKey() { - var key = new LinkedHashMap(); - key.put(ClinicalAttribute.PATIENT_ID.getAttributeId(), patientId); - key.put(ClinicalAttribute.SAMPLE_ID.getAttributeId(), sampleId); - return key; - } - - public SequencedMap getValue() { - var value = new LinkedHashMap(); - if (attributeId != null) { - value.put(attributeId, attributeValue); - } - return value; - } -} \ No newline at end of file diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index 24b4fbb2395..a5cf1ee5b2f 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -31,11 +31,11 @@ ) 'SAMPLE_COUNT' @@ -96,32 +95,32 @@ ) \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java index 61122954a8d..9672009a04d 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java @@ -4,8 +4,7 @@ import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.model.ClinicalAttribute; -import org.cbioportal.application.file.model.ClinicalPatientAttributeValue; -import org.cbioportal.application.file.model.ClinicalSampleAttributeValue; +import org.cbioportal.application.file.model.ClinicalAttributeValue; import org.cbioportal.application.file.utils.CloseableIterator; import org.junit.Test; @@ -90,13 +89,19 @@ public boolean hasClinicalPatientAttributes(String studyId) { } @Override - public CloseableIterator getClinicalSampleAttributeValues(String studyId) { + public CloseableIterator getClinicalSampleAttributeValues(String studyId) { return new SimpleCloseableIterator<>( List.of( - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "A"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_1", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "1"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_1", "TEST_SAMPLE_ID_2", "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "2"), - new ClinicalSampleAttributeValue("TEST_PATIENT_ID_2", "TEST_SAMPLE_ID_3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "B"))); + new ClinicalAttributeValue(1L, "PATIENT_ID", "TEST_PATIENT_ID_1"), + new ClinicalAttributeValue(1L, "SAMPLE_ID", "TEST_SAMPLE_ID_1"), + new ClinicalAttributeValue(1L, "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "1"), + new ClinicalAttributeValue(1L, "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "A"), + new ClinicalAttributeValue(2L, "PATIENT_ID", "TEST_PATIENT_ID_1"), + new ClinicalAttributeValue(2L, "SAMPLE_ID", "TEST_SAMPLE_ID_2"), + new ClinicalAttributeValue(2L, "TEST_NUMBER_SAMPLE_ATTRIBUTE_ID", "2"), + new ClinicalAttributeValue(3L, "PATIENT_ID", "TEST_PATIENT_ID_2"), + new ClinicalAttributeValue(3L, "SAMPLE_ID", "TEST_SAMPLE_ID_3"), + new ClinicalAttributeValue(3L, "TEST_STRING_SAMPLE_ATTRIBUTE_ID", "B"))); } @Override @@ -107,11 +112,13 @@ public List getClinicalPatientAttributes(String studyId) { } @Override - public CloseableIterator getClinicalPatientAttributeValues(String studyId) { + public CloseableIterator getClinicalPatientAttributeValues(String studyId) { return new SimpleCloseableIterator<>(List.of( - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_1", "TEST_NUMBER_PATIENT_ATTRIBUTE_ID", "3"), - new ClinicalPatientAttributeValue("TEST_PATIENT_ID_2", "TEST_STRING_PATIENT_ATTRIBUTE_ID", "D"))); + new ClinicalAttributeValue(1L, "PATIENT_ID", "TEST_PATIENT_ID_1"), + new ClinicalAttributeValue(1L, "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), + new ClinicalAttributeValue(1L, "TEST_NUMBER_PATIENT_ATTRIBUTE_ID", "3"), + new ClinicalAttributeValue(2L, "PATIENT_ID", "TEST_PATIENT_ID_2"), + new ClinicalAttributeValue(2L, "TEST_STRING_PATIENT_ATTRIBUTE_ID", "D"))); } }; } From 5787b0691520e3a28f3f858541057d37d8f74418 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 14:48:14 +0200 Subject: [PATCH 16/69] Check clinical attributes for duplicates --- .../ClinicalPatientAttributesDataTypeExporter.java | 6 +++--- .../file/model/ClinicalAttributesTable.java | 11 +++++++++++ 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java index e75a84b449a..c7d090365a6 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java @@ -7,9 +7,9 @@ import org.cbioportal.application.file.model.ClinicalAttributesTable; import org.cbioportal.application.file.utils.CloseableIterator; -import java.util.ArrayList; -import java.util.List; -import java.util.Optional; +import java.util.*; +import java.util.function.Function; +import java.util.stream.Collectors; /** * Export metadata and data for clinical patient attributes. diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java index 9a610f7b264..0670b0348c7 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java @@ -8,6 +8,7 @@ import java.io.Closeable; import java.io.IOException; import java.util.*; +import java.util.function.Function; import java.util.stream.Collectors; public class ClinicalAttributesTable implements CloseableIterator>, HeaderInfo { @@ -18,6 +19,16 @@ public class ClinicalAttributesTable implements CloseableIterator header; public ClinicalAttributesTable(List attributes, CloseableIterator data) { + Set duplicates = attributes.stream() + .map(ClinicalAttribute::getAttributeId) + .collect(Collectors.groupingBy(Function.identity(), Collectors.counting())) + .entrySet().stream() + .filter(entry -> entry.getValue() > 1) + .map(Map.Entry::getKey) + .collect(Collectors.toSet()); + if (!duplicates.isEmpty()) { + throw new IllegalArgumentException("The following attributes are duplicated: " + duplicates); + } this.attributes = attributes; this.header = attributes.stream().map(ClinicalAttribute::getAttributeId).collect(Collectors.toCollection(LinkedHashSet::new)); this.closeable = data; From a795247c0383c3162eee331618dee1198a48d3cb Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 14:51:12 +0200 Subject: [PATCH 17/69] Clean code from done TODO comments --- .../application/file/export/ExportConfig.java | 12 ------------ .../file/export/services/ExportService.java | 2 ++ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 9a9cea3a217..8d1a1dced80 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -19,18 +19,6 @@ import java.util.List; import java.util.Properties; -//TODO -//Refactor molecular profile exporters (done) -//Organize the packages differently, per data type instead per layer -//Make async to work DeferredResult> with explicit use of the executor service (no @Async) -//Bring writers to exporter classes? (done) -//Split meatadata from file specific info (done) - -//Details -//Have Table(inherits closable iterator of sequence map) interface that explains what it promises. Ensure it in the code? -//Ensure flow of data is ordered correctly (patient id, sample id, etc) -//Make export request return 404 if no study found (done) -//catch exceptions in the exporters and return them as README.ERRORS.txt @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index 2ea8136270c..9eb0dbd0491 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -31,6 +31,8 @@ public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { studyId, exporter.getClass().getSimpleName()); atLeastOneDataFileExportedSuccesfully |= exportedDataType; + + //TODO catch exceptions in the exporters and return them as README.ERRORS.txt file os users know that they did not get whole study } return atLeastOneDataFileExportedSuccesfully; } From e95234391abfe4db568d1f43661276be7876dd42 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 15:29:32 +0200 Subject: [PATCH 18/69] Run study export in low priority custom thread pool --- .../application/file/export/ExportConfig.java | 35 ++++++++++ .../file/export/ExportController.java | 66 ++++++++++++++----- 2 files changed, 83 insertions(+), 18 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 8d1a1dced80..a21ea671efa 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -13,11 +13,14 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import javax.sql.DataSource; import java.io.IOException; import java.util.List; import java.util.Properties; +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadFactory; @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @@ -83,6 +86,38 @@ public DataSource exportDataSource(DataSourceProperties mysqlDataSourcePropertie return new HikariDataSource(hikariConfig); } + @Bean(name = "exportThreadPool") + public Executor exportThreadPool() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + executor.setCorePoolSize(5); // minimum number of threads + executor.setMaxPoolSize(10); // maximum number of threads + executor.setQueueCapacity(100); // queue size before rejecting new tasks + executor.setThreadNamePrefix("ExportExecutor-"); + //make low priority threads. So OS can schedule other tasks first + executor.setThreadFactory(new ExportThreadFactory("ExportPool-", Thread.MIN_PRIORITY)); + executor.initialize(); + return executor; + } + + public static class ExportThreadFactory implements ThreadFactory { + private final String namePrefix; + private final int priority; + private int count = 0; + + public ExportThreadFactory(String namePrefix, int priority) { + this.namePrefix = namePrefix; + this.priority = priority; + } + + @Override + public Thread newThread(Runnable r) { + Thread thread = new Thread(r, namePrefix + count++); + thread.setDaemon(true); // Optional: allow JVM to exit if only exports remain + thread.setPriority(priority); // 👈 Set thread priority here + return thread; + } + } + @Bean public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index c6aef083352..5025cf4b510 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -1,20 +1,22 @@ package org.cbioportal.application.file.export; -import jakarta.servlet.http.HttpServletResponse; import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.export.services.ExportService; import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; -import java.io.BufferedOutputStream; -import java.io.IOException; -import java.io.OutputStream; +import java.io.*; +import java.util.concurrent.Executor; @RestController //How to have only one conditional on property in the config only @@ -25,29 +27,57 @@ public class ExportController { private static final Logger LOG = LoggerFactory.getLogger(ExportController.class); private final ExportService exportService; private final CancerStudyMetadataService cancerStudyMetadataService; + private final Executor exportThreadPool; - public ExportController(CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { + public ExportController(@Qualifier("exportThreadPool") Executor exportThreadPool, CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { + this.exportThreadPool = exportThreadPool; this.exportService = exportService; this.cancerStudyMetadataService = cancerStudyMetadataService; } - @PreAuthorize("hasPermission(#studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") @GetMapping("/export/study/{studyId}.zip") - public void downloadStudyData(HttpServletResponse response, @PathVariable String studyId) throws IOException { + @PreAuthorize("hasPermission(#studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") + public ResponseEntity downloadStudyData(@PathVariable String studyId) { if (cancerStudyMetadataService.getCancerStudyMetadata(studyId) == null) { - response.setStatus(HttpServletResponse.SC_NOT_FOUND); - return; + return ResponseEntity.notFound().build(); } - response.setContentType(("application/zip")); - response.setHeader("Content-Disposition", "attachment; filename=\"" + studyId + ".zip\""); - - try (OutputStream out = response.getOutputStream(); BufferedOutputStream bof = new BufferedOutputStream(out); ZipOutputStreamWriterFactory zipOutputStreamWriterFactory = new ZipOutputStreamWriterFactory(bof)) { - exportService.exportData(zipOutputStreamWriterFactory, studyId); - } catch (Exception e) { - //Should error handling be done here? - LOG.error("Error exporting study data", e); - response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + final PipedOutputStream pipedOut = new PipedOutputStream(); + final PipedInputStream pipedIn; + try { + pipedIn = new PipedInputStream(pipedOut, 64 * 1024); + } catch (IOException e) { + throw new RuntimeException("Unable to create pipe for streaming", e); } + + exportThreadPool.execute(() -> { + try (BufferedOutputStream bos = new BufferedOutputStream(pipedOut); + ZipOutputStreamWriterFactory zipFactory = new ZipOutputStreamWriterFactory(bos)) { + exportService.exportData(zipFactory, studyId); + } catch (Exception e) { + LOG.error("Export failed", e); + try { + pipedOut.close(); + } catch (IOException ex) { + LOG.warn("Failed to close piped output", ex); + } + } + }); + + StreamingResponseBody stream = outputStream -> { + try (InputStream in = pipedIn) { + byte[] buffer = new byte[8192]; + int bytesRead; + while ((bytesRead = in.read(buffer)) != -1) { + outputStream.write(buffer, 0, bytesRead); + outputStream.flush(); + } + } + }; + + return ResponseEntity.ok() + .contentType(new MediaType("application", "zip")) + .header("Content-Disposition", "attachment; filename=\"" + studyId + ".zip\"") + .body(stream); } } From b30768da8d9238b335cb6667125873fe6112482d Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 16:29:13 +0200 Subject: [PATCH 19/69] Specify the type of MAF exporter --- .../org/cbioportal/application/file/export/ExportConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index a21ea671efa..36a33f52e66 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -122,7 +122,7 @@ public Thread newThread(Runnable r) { public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, - GeneticProfileDatatypeExporter mafMetadataAndDataExporter, + MafDataTypeExporter mafMetadataAndDataExporter, CaseListsExporter caseListsExporter) { return List.of( cancerStudyMetadataExporter, From 828449e8cd842972bf8c8943d1479a6ce17fbd8a Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 16:29:44 +0200 Subject: [PATCH 20/69] Should we maybe currupt file if download fails? --- .../application/file/export/services/ExportService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index 9eb0dbd0491..78eec4ff8ce 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -32,7 +32,8 @@ public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { exporter.getClass().getSimpleName()); atLeastOneDataFileExportedSuccesfully |= exportedDataType; - //TODO catch exceptions in the exporters and return them as README.ERRORS.txt file os users know that they did not get whole study + //TODO catch exceptions in the exporters and return them as README.ERRORS.txt file so users know that they did not get whole study + //OR corrupt the whole zip file } return atLeastOneDataFileExportedSuccesfully; } From 5e0855c75b62ac93584b33fc6c6103ef7f4fe4c2 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 4 Apr 2025 16:45:23 +0200 Subject: [PATCH 21/69] Remove unneeded comments --- .../org/cbioportal/application/file/export/ExportConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 36a33f52e66..35e6a441727 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -112,8 +112,8 @@ public ExportThreadFactory(String namePrefix, int priority) { @Override public Thread newThread(Runnable r) { Thread thread = new Thread(r, namePrefix + count++); - thread.setDaemon(true); // Optional: allow JVM to exit if only exports remain - thread.setPriority(priority); // 👈 Set thread priority here + thread.setDaemon(true); + thread.setPriority(priority); return thread; } } From b45c0d70c6568df3c1110c14819bf807a29debe8 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 9 Apr 2025 10:37:22 +0200 Subject: [PATCH 22/69] Make sure input stream closes --- .../application/file/export/ExportController.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 5025cf4b510..3772cbeb855 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -42,13 +42,7 @@ public ResponseEntity downloadStudyData(@PathVariable Str return ResponseEntity.notFound().build(); } - final PipedOutputStream pipedOut = new PipedOutputStream(); - final PipedInputStream pipedIn; - try { - pipedIn = new PipedInputStream(pipedOut, 64 * 1024); - } catch (IOException e) { - throw new RuntimeException("Unable to create pipe for streaming", e); - } + PipedOutputStream pipedOut = new PipedOutputStream(); exportThreadPool.execute(() -> { try (BufferedOutputStream bos = new BufferedOutputStream(pipedOut); @@ -65,7 +59,7 @@ public ResponseEntity downloadStudyData(@PathVariable Str }); StreamingResponseBody stream = outputStream -> { - try (InputStream in = pipedIn) { + try (PipedInputStream in = new PipedInputStream(pipedOut, 64 * 1024)) { byte[] buffer = new byte[8192]; int bytesRead; while ((bytesRead = in.read(buffer)) != -1) { From e9535cb161f02479e7729d58bbfd9c820cde39e3 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 9 Apr 2025 22:46:42 +0200 Subject: [PATCH 23/69] Add support of MRNA Expression data type export --- .../application/file/export/ExportConfig.java | 12 +++ .../GeneticProfileDatatypeExporter.java | 5 +- .../MrnaExpressionDatatypeExporter.java | 96 +++++++++++++++++++ .../mappers/GeneticProfileDataMapper.java | 13 +++ .../services/GeneticProfileDataService.java | 24 +++++ .../application/file/model/Gene.java | 22 +++++ .../application/file/model/GeneticEntity.java | 22 +++++ .../file/model/GeneticEntityProperty.java | 22 +++++ .../file/model/GeneticProfileData.java | 46 +++++++++ .../application/file/model/Table.java | 18 ++-- .../export/GeneticProfileDataMapper.xml | 52 ++++++++++ 11 files changed, 325 insertions(+), 7 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java create mode 100644 src/main/java/org/cbioportal/application/file/model/Gene.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GeneticEntity.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java create mode 100644 src/main/resources/mappers/export/GeneticProfileDataMapper.xml diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 35e6a441727..5993f0f66b1 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -47,6 +47,11 @@ public GeneticProfileService geneticProfileService(GeneticProfileMapper geneticP return new GeneticProfileService(geneticProfileMapper); } + @Bean + public GeneticProfileDataService geneticProfileDataService(GeneticProfileDataMapper geneticProfileDataMapper) { + return new GeneticProfileDataService(geneticProfileDataMapper); + } + @Bean public CaseListMetadataService caseListMetadataService(CaseListMetadataMapper caseListMetadataMapper) { return new CaseListMetadataService(caseListMetadataMapper); @@ -123,12 +128,14 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, MafDataTypeExporter mafMetadataAndDataExporter, + MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter, CaseListsExporter caseListsExporter) { return List.of( cancerStudyMetadataExporter, clinicalPatientAttributesMetadataAndDataExporter, clinicalSampleAttributesMetadataAndDataExporter, mafMetadataAndDataExporter, + mrnaExpressionDatatypeExporter, caseListsExporter ); } @@ -153,6 +160,11 @@ public MafDataTypeExporter mafMetadataAndDataExporter(GeneticProfileService gene return new MafDataTypeExporter(geneticProfileService, mafRecordService); } + @Bean + public MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + @Bean public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetadataService) { return new CaseListsExporter(caseListMetadataService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index ea77ccaaa40..f3ba06a0dcb 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -2,10 +2,13 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.HeaderInfo; import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.FileWriterFactory; import java.util.List; +import java.util.SequencedMap; /** * Export metadata and data for a genetic profile of certain data type (genetic alteration type + datatype). @@ -34,7 +37,7 @@ public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { protected abstract String getDatatype(); - protected abstract class GeneticProfileExporter extends DataTypeExporter { + protected abstract class GeneticProfileExporter extends DataTypeExporter>> { @Override public String getDataFilename(GeneticProfileDatatypeMetadata metadata) { return "data_" + metadata.getGeneticAlterationType().toLowerCase() diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java new file mode 100644 index 00000000000..c3ae7f3d1a1 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java @@ -0,0 +1,96 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Optional; +import java.util.SequencedMap; + +public class MrnaExpressionDatatypeExporter extends GeneticProfileDatatypeExporter { + + private final GeneticProfileDataService geneticProfileDataService; + + public MrnaExpressionDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService); + this.geneticProfileDataService = geneticProfileDataService; + } + + @Override + protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { + return new MrnaExpressionGeneticProfileExporter(metadata); + } + + @Override + protected String getGeneticAlterationType() { + return "MRNA_EXPRESSION"; + } + + @Override + protected String getDatatype() { + return "CONTINUOUS"; + } + + private class MrnaExpressionGeneticProfileExporter extends GeneticProfileExporter { + private final GeneticProfileDatatypeMetadata metatdata; + + public MrnaExpressionGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { + this.metatdata = metadata; + } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(metatdata); + } + + @Override + protected CloseableIterator> getData(String studyId) { + var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + for (String sampleStableId : sampleStableIds) { + if (sampleStableId == null) { + throw new IllegalStateException("Sample stable ID is null"); + } + } + var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); + return new Table(composeRows(geneticProfileData, sampleStableIds)); + } + + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds) { + return new CloseableIterator<>() { + @Override + public void close() throws IOException { + geneticProfileData.close(); + } + + @Override + public boolean hasNext() { + return geneticProfileData.hasNext(); + } + + @Override + public TableRow next() { + var data = geneticProfileData.next(); + if (data.getValues().size() != sampleStableIds.size()) { + throw new IllegalStateException("Number of values does not match number of sample stable IDs"); + } + return () -> { + var row = new LinkedHashMap(); + row.put("Hugo_Symbol", data.getGene() == null ? null : data.getGene().getHugoGeneSymbol()); + row.put("Entrez_Gene_Id", data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); + for (int i = 0; i < sampleStableIds.size(); i++) { + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return row; + }; + } + }; + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java new file mode 100644 index 00000000000..fb8de1997cf --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java @@ -0,0 +1,13 @@ +package org.cbioportal.application.file.export.mappers; + +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.model.GeneticProfileData; + +import java.util.List; + +public interface GeneticProfileDataMapper { + + List getSampleStableIds(String molecularProfileStableId); + + Cursor getData(String molecularProfileStableId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java new file mode 100644 index 00000000000..2b573036c4a --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java @@ -0,0 +1,24 @@ +package org.cbioportal.application.file.export.services; + +import org.cbioportal.application.file.export.mappers.GeneticProfileDataMapper; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.cbioportal.application.file.utils.CursorAdapter; + +import java.util.List; + +public class GeneticProfileDataService { + private final GeneticProfileDataMapper geneticProfileDataMapper; + + public GeneticProfileDataService(GeneticProfileDataMapper geneticProfileDataMapper) { + this.geneticProfileDataMapper = geneticProfileDataMapper; + } + + public List getSampleStableIds(String molecularProfileStableId) { + return geneticProfileDataMapper.getSampleStableIds(molecularProfileStableId); + } + + public CloseableIterator getData(String molecularProfileStableId) { + return new CursorAdapter<>(geneticProfileDataMapper.getData(molecularProfileStableId)); + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/Gene.java b/src/main/java/org/cbioportal/application/file/model/Gene.java new file mode 100644 index 00000000000..5bc204fd0b6 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/Gene.java @@ -0,0 +1,22 @@ +package org.cbioportal.application.file.model; + +public class Gene { + private String hugoGeneSymbol; + private Integer entrezGeneId; + + public String getHugoGeneSymbol() { + return hugoGeneSymbol; + } + + public void setHugoGeneSymbol(String hugoGeneSymbol) { + this.hugoGeneSymbol = hugoGeneSymbol; + } + + public Integer getEntrezGeneId() { + return entrezGeneId; + } + + public void setEntrezGeneId(Integer entrezGeneId) { + this.entrezGeneId = entrezGeneId; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java b/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java new file mode 100644 index 00000000000..4cb184342bf --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java @@ -0,0 +1,22 @@ +package org.cbioportal.application.file.model; + +public class GeneticEntity { + private String stableId; + private String entityType; + + public String getEntityType() { + return entityType; + } + + public void setEntityType(String entityType) { + this.entityType = entityType; + } + + public String getStableId() { + return stableId; + } + + public void setStableId(String stableId) { + this.stableId = stableId; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java b/src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java new file mode 100644 index 00000000000..5d1268d3bd1 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java @@ -0,0 +1,22 @@ +package org.cbioportal.application.file.model; + +public class GeneticEntityProperty { + private String name; + private String value; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java b/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java new file mode 100644 index 00000000000..b081234e8cd --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java @@ -0,0 +1,46 @@ +package org.cbioportal.application.file.model; + +import java.util.List; + +public class GeneticProfileData { + private GeneticEntity geneticEntity; + private Gene gene; + private List properties; + private String commaSeparatedValues; + + public String getCommaSeparatedValues() { + return commaSeparatedValues; + } + + public List getValues() { + return List.of(commaSeparatedValues.split(",")); + } + + public void setCommaSeparatedValues(String commaSeparatedValues) { + this.commaSeparatedValues = commaSeparatedValues; + } + + public Gene getGene() { + return gene; + } + + public void setGene(Gene gene) { + this.gene = gene; + } + + public GeneticEntity getGeneticEntity() { + return geneticEntity; + } + + public void setGeneticEntity(GeneticEntity geneticEntity) { + this.geneticEntity = geneticEntity; + } + + public List getProperties() { + return properties; + } + + public void setProperties(List properties) { + this.properties = properties; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/Table.java b/src/main/java/org/cbioportal/application/file/model/Table.java index 571940e7371..673042d58da 100644 --- a/src/main/java/org/cbioportal/application/file/model/Table.java +++ b/src/main/java/org/cbioportal/application/file/model/Table.java @@ -24,6 +24,7 @@ public class Table implements CloseableIterator>, H private final PeekingIterator rows; private final Closeable closeable; private SequencedSet header; + private Iterable> comments; public Table(CloseableIterator rows) { this.closeable = rows; @@ -32,9 +33,20 @@ public Table(CloseableIterator rows) { public Table(CloseableIterator rows, SequencedSet header) { this(rows); + if (this.rows.peek().toRow().size() != header.size()) { + throw new IllegalArgumentException("Header size does not match row size"); + } this.header = header; } + public Table(CloseableIterator rows, SequencedSet header, Iterable> comments) { + this(rows, header); + if (this.header.size() != Iterators.size(comments.iterator())) { + throw new IllegalArgumentException("Header size does not match comments size"); + } + this.comments = comments; + } + @Override public boolean hasNext() { return rows.hasNext(); @@ -47,9 +59,6 @@ public SequencedMap next() { @Override public Iterable> getComments() { - if (rows instanceof HeaderInfo headerInfo) { - return headerInfo.getComments(); - } return emptyList(); } @@ -58,9 +67,6 @@ public SequencedSet getHeader() { if (header != null) { return header; } - if (rows instanceof HeaderInfo headerInfo) { - return headerInfo.getHeader(); - } if (rows.hasNext()) { return rows.peek().toRow().sequencedKeySet(); } diff --git a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml new file mode 100644 index 00000000000..1c64b7342b6 --- /dev/null +++ b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From c90c35c8a8919455e61eb70bf37c66824b41d371 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 11 Apr 2025 16:03:23 +0200 Subject: [PATCH 24/69] Add support for generic data types --- .../application/file/export/ExportConfig.java | 69 ++++++--- .../file/export/ExportController.java | 5 +- ...icalPatientAttributesDataTypeExporter.java | 6 +- ...enericAssayLimitValueDatatypeExporter.java | 141 ++++++++++++++++++ .../GeneticProfileDatatypeExporter.java | 2 - .../MrnaExpressionDatatypeExporter.java | 34 ++--- .../mappers/GeneticProfileDataMapper.java | 5 + .../services/GeneticProfileDataService.java | 9 ++ .../writers/KeyValueMetadataWriter.java | 8 +- .../file/export/writers/TsvDataWriter.java | 13 +- .../file/model/ClinicalAttributeValue.java | 8 +- .../file/model/ClinicalAttributesTable.java | 11 +- ...operty.java => GenericEntityProperty.java} | 12 +- .../file/model/GeneticDatatypeMetadata.java | 1 - .../application/file/model/GeneticEntity.java | 10 ++ .../file/model/GeneticProfileData.java | 16 +- .../model/GeneticProfileDatatypeMetadata.java | 27 +++- .../application/file/model/HeaderInfo.java | 1 + .../application/file/model/MafRecord.java | 120 ++++++--------- .../file/utils/CloseableIterator.java | 17 +++ .../export/GeneticProfileDataMapper.xml | 36 ++++- 21 files changed, 381 insertions(+), 170 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java rename src/main/java/org/cbioportal/application/file/model/{GeneticEntityProperty.java => GenericEntityProperty.java} (57%) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 5993f0f66b1..30d4ea54566 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -2,9 +2,27 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; -import org.cbioportal.application.file.export.exporters.*; -import org.cbioportal.application.file.export.mappers.*; -import org.cbioportal.application.file.export.services.*; +import org.cbioportal.application.file.export.exporters.CancerStudyMetadataExporter; +import org.cbioportal.application.file.export.exporters.CaseListsExporter; +import org.cbioportal.application.file.export.exporters.ClinicalPatientAttributesDataTypeExporter; +import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; +import org.cbioportal.application.file.export.exporters.Exporter; +import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; +import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; +import org.cbioportal.application.file.export.exporters.MrnaExpressionDatatypeExporter; +import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; +import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; +import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; +import org.cbioportal.application.file.export.mappers.GeneticProfileDataMapper; +import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; +import org.cbioportal.application.file.export.mappers.MafRecordMapper; +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; +import org.cbioportal.application.file.export.services.CaseListMetadataService; +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.export.services.ExportService; +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.export.services.MafRecordService; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -104,31 +122,13 @@ public Executor exportThreadPool() { return executor; } - public static class ExportThreadFactory implements ThreadFactory { - private final String namePrefix; - private final int priority; - private int count = 0; - - public ExportThreadFactory(String namePrefix, int priority) { - this.namePrefix = namePrefix; - this.priority = priority; - } - - @Override - public Thread newThread(Runnable r) { - Thread thread = new Thread(r, namePrefix + count++); - thread.setDaemon(true); - thread.setPriority(priority); - return thread; - } - } - @Bean public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, MafDataTypeExporter mafMetadataAndDataExporter, MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter, + GenericAssayLimitValueDatatypeExporter genericAssayLimitValueDatatypeExporter, CaseListsExporter caseListsExporter) { return List.of( cancerStudyMetadataExporter, @@ -136,6 +136,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE clinicalSampleAttributesMetadataAndDataExporter, mafMetadataAndDataExporter, mrnaExpressionDatatypeExporter, + genericAssayLimitValueDatatypeExporter, caseListsExporter ); } @@ -165,9 +166,33 @@ public MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter(GeneticProf return new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); } + @Bean + public GenericAssayLimitValueDatatypeExporter genericAssayLimitValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + @Bean public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetadataService) { return new CaseListsExporter(caseListMetadataService); } + public static class ExportThreadFactory implements ThreadFactory { + private final String namePrefix; + private final int priority; + private int count = 0; + + public ExportThreadFactory(String namePrefix, int priority) { + this.namePrefix = namePrefix; + this.priority = priority; + } + + @Override + public Thread newThread(Runnable r) { + Thread thread = new Thread(r, namePrefix + count++); + thread.setDaemon(true); + thread.setPriority(priority); + return thread; + } + } + } diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 3772cbeb855..7adfb71d211 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -15,7 +15,10 @@ import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; -import java.io.*; +import java.io.BufferedOutputStream; +import java.io.IOException; +import java.io.PipedInputStream; +import java.io.PipedOutputStream; import java.util.concurrent.Executor; @RestController diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java index c7d090365a6..e75a84b449a 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java @@ -7,9 +7,9 @@ import org.cbioportal.application.file.model.ClinicalAttributesTable; import org.cbioportal.application.file.utils.CloseableIterator; -import java.util.*; -import java.util.function.Function; -import java.util.stream.Collectors; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; /** * Export metadata and data for clinical patient attributes. diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java new file mode 100644 index 00000000000..d30acb2ce3f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java @@ -0,0 +1,141 @@ +package org.cbioportal.application.file.export.exporters; + +import com.google.common.collect.Iterators; +import com.google.common.collect.PeekingIterator; +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.GenericEntityProperty; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Optional; +import java.util.SequencedMap; + +public class GenericAssayLimitValueDatatypeExporter extends GeneticProfileDatatypeExporter { + + private final GeneticProfileDataService geneticProfileDataService; + + public GenericAssayLimitValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService); + this.geneticProfileDataService = geneticProfileDataService; + } + + @Override + protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { + return new LimitValueGenericProfileExporter(metadata); + } + + @Override + protected String getGeneticAlterationType() { + return "GENERIC_ASSAY"; + } + + @Override + protected String getDatatype() { + return "LIMIT-VALUE"; + } + + private class LimitValueGenericProfileExporter extends GeneticProfileExporter { + private final GeneticProfileDatatypeMetadata metatdata; + + public LimitValueGenericProfileExporter(GeneticProfileDatatypeMetadata metadata) { + this.metatdata = metadata; + this.metatdata.setGenericEntitiesMetaProperties( + geneticProfileDataService.getDistinctGenericEntityMetaPropertyNames(metadata.getStableId())); + } + + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, List genericEntitiesMetaProperties, CloseableIterator properties) { + PeekingIterator geneticProfileDataPeekingIterator = Iterators.peekingIterator(geneticProfileData); + PeekingIterator propertyPeekingIterator = Iterators.peekingIterator(properties); + return new CloseableIterator<>() { + @Override + public void close() throws IOException { + geneticProfileData.close(); + properties.close(); + } + + @Override + public boolean hasNext() { + return geneticProfileDataPeekingIterator.hasNext(); + } + + @Override + public TableRow next() { + var data = geneticProfileDataPeekingIterator.next(); + if (data.getGeneticEntity() == null) { + throw new IllegalStateException("Genetic entity is null"); + } + if (data.getGeneticEntity().getGeneticEntityId() == null) { + throw new IllegalStateException("Genetic entity ID is null"); + } + if (geneticProfileDataPeekingIterator.hasNext() + && geneticProfileDataPeekingIterator.peek().getGeneticEntity() != null + && geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId() != null + && data.getGeneticEntity().getGeneticEntityId() > geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId()) { + throw new IllegalStateException("Genetic entity ID is not in ascending order"); + } + if (data.getValues().size() != sampleStableIds.size()) { + throw new IllegalStateException("Number of values does not match number of sample stable IDs"); + } + return () -> { + var row = new LinkedHashMap(); + row.put("ENTITY_STABLE_ID", data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); + if (!genericEntitiesMetaProperties.isEmpty()) { + var propertyMap = new HashMap(); + GenericEntityProperty property = null; + while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId().equals(data.getGeneticEntity().getGeneticEntityId())) { + property = propertyPeekingIterator.next(); + if (property.getName() == null) { + throw new IllegalStateException("Property name is null"); + } + if (property.getValue() == null) { + throw new IllegalStateException("Property value is null"); + } + propertyMap.put(property.getName(), property.getValue()); + } + if (property != null && propertyPeekingIterator.hasNext() && property.getGeneticEntityId() > propertyPeekingIterator.peek().getGeneticEntityId()) { + throw new IllegalStateException("Genetic entity ID is not in ascending order for properties"); + } + // Add the properties to the row in the order of genericEntitiesMetaProperties + for (String propertyName : genericEntitiesMetaProperties) { + row.put(propertyName, propertyMap.get(propertyName)); + } + } + for (int i = 0; i < sampleStableIds.size(); i++) { + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return row; + }; + } + }; + } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(metatdata); + } + + @Override + protected CloseableIterator> getData(String studyId) { + var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + for (String sampleStableId : sampleStableIds) { + if (sampleStableId == null) { + throw new IllegalStateException("Sample stable ID is null"); + } + } + var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); + CloseableIterator properties = CloseableIterator.empty(); + if (!this.metatdata.getGenericEntitiesMetaProperties().isEmpty()) { + properties = geneticProfileDataService.getGenericEntityMetaProperties(metatdata.getStableId()); + } + return new Table(composeRows(geneticProfileData, sampleStableIds, metatdata.getGenericEntitiesMetaProperties(), properties)); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index f3ba06a0dcb..42700cf0116 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -2,8 +2,6 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; -import org.cbioportal.application.file.model.HeaderInfo; -import org.cbioportal.application.file.model.Table; import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.FileWriterFactory; diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java index c3ae7f3d1a1..1a86dc3fd48 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java @@ -45,23 +45,6 @@ public MrnaExpressionGeneticProfileExporter(GeneticProfileDatatypeMetadata metad this.metatdata = metadata; } - @Override - protected Optional getMetadata(String studyId) { - return Optional.of(metatdata); - } - - @Override - protected CloseableIterator> getData(String studyId) { - var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - for (String sampleStableId : sampleStableIds) { - if (sampleStableId == null) { - throw new IllegalStateException("Sample stable ID is null"); - } - } - var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); - return new Table(composeRows(geneticProfileData, sampleStableIds)); - } - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds) { return new CloseableIterator<>() { @Override @@ -92,5 +75,22 @@ public TableRow next() { } }; } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(metatdata); + } + + @Override + protected CloseableIterator> getData(String studyId) { + var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + for (String sampleStableId : sampleStableIds) { + if (sampleStableId == null) { + throw new IllegalStateException("Sample stable ID is null"); + } + } + var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); + return new Table(composeRows(geneticProfileData, sampleStableIds)); + } } } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java index fb8de1997cf..dc7e7e59679 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileDataMapper.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export.mappers; import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.model.GenericEntityProperty; import org.cbioportal.application.file.model.GeneticProfileData; import java.util.List; @@ -10,4 +11,8 @@ public interface GeneticProfileDataMapper { List getSampleStableIds(String molecularProfileStableId); Cursor getData(String molecularProfileStableId); + + List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId); + + Cursor getGenericEntityMetaProperties(String molecularProfileStableId); } diff --git a/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java index 2b573036c4a..1bf08068f74 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileDataService.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export.services; import org.cbioportal.application.file.export.mappers.GeneticProfileDataMapper; +import org.cbioportal.application.file.model.GenericEntityProperty; import org.cbioportal.application.file.model.GeneticProfileData; import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; @@ -21,4 +22,12 @@ public List getSampleStableIds(String molecularProfileStableId) { public CloseableIterator getData(String molecularProfileStableId) { return new CursorAdapter<>(geneticProfileDataMapper.getData(molecularProfileStableId)); } + + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return geneticProfileDataMapper.getDistinctGenericEntityMetaPropertyNames(molecularProfileStableId); + } + + public CloseableIterator getGenericEntityMetaProperties(String molecularProfileStableId) { + return new CursorAdapter<>(geneticProfileDataMapper.getGenericEntityMetaProperties(molecularProfileStableId)); + } } diff --git a/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java index 7aa03067ac2..76ef3220ed0 100644 --- a/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/KeyValueMetadataWriter.java @@ -22,6 +22,10 @@ public KeyValueMetadataWriter(Writer writer) { this.writer = writer; } + private static String composeKeyValueLine(String key, String value) { + return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; + } + /** * Write a stream of key-value pairs to the writer */ @@ -37,9 +41,5 @@ public void write(SequencedMap metadata) { } } } - - private static String composeKeyValueLine(String key, String value) { - return key + ": " + (value == null ? "" : value.replace("\n", "\\n")) + "\n"; - } } diff --git a/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java index c3ad7714a94..8d4b05c420b 100644 --- a/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java @@ -16,15 +16,19 @@ */ public class TsvDataWriter { - private static final String TAB = "\t"; public static final String COMMENT_STARTER = "#"; - + private static final String TAB = "\t"; private final Writer writer; public TsvDataWriter(Writer writer) { this.writer = writer; } + private static String composeRow(Iterable row) { + return StreamSupport.stream(row.spliterator(), false) + .map(s -> s == null ? "" : s.replace(TAB, "\\t")).collect(Collectors.joining(TAB)) + "\n"; + } + public void write(Iterator> table) { //TODO extract these checks to separate class SequencedSet header = null; @@ -70,9 +74,4 @@ private void writeContent(String content) { throw new RuntimeException(e); } } - - private static String composeRow(Iterable row) { - return StreamSupport.stream(row.spliterator(), false) - .map(s -> s == null ? "" : s.replace(TAB, "\\t")).collect(Collectors.joining(TAB)) + "\n"; - } } diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java index 60589799ed6..2dec7521097 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributeValue.java @@ -15,14 +15,14 @@ public ClinicalAttributeValue(Long rowKey, String attributeId, String attributeV this.attributeValue = attributeValue; } - public void setRowKey(Long rowKey) { - this.rowKey = rowKey; - } - public Long getRowKey() { return rowKey; } + public void setRowKey(Long rowKey) { + this.rowKey = rowKey; + } + public String getAttributeId() { return attributeId; } diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java index 0670b0348c7..dd0ab65272d 100644 --- a/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalAttributesTable.java @@ -7,7 +7,14 @@ import java.io.Closeable; import java.io.IOException; -import java.util.*; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.SequencedMap; +import java.util.SequencedSet; +import java.util.Set; import java.util.function.Function; import java.util.stream.Collectors; @@ -15,8 +22,8 @@ public class ClinicalAttributesTable implements CloseableIterator attributes; private final Closeable closeable; - private PeekingIterator rowIterator; private final LinkedHashSet header; + private final PeekingIterator rowIterator; public ClinicalAttributesTable(List attributes, CloseableIterator data) { Set duplicates = attributes.stream() diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java b/src/main/java/org/cbioportal/application/file/model/GenericEntityProperty.java similarity index 57% rename from src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java rename to src/main/java/org/cbioportal/application/file/model/GenericEntityProperty.java index 5d1268d3bd1..db39dee530e 100644 --- a/src/main/java/org/cbioportal/application/file/model/GeneticEntityProperty.java +++ b/src/main/java/org/cbioportal/application/file/model/GenericEntityProperty.java @@ -1,9 +1,19 @@ package org.cbioportal.application.file.model; -public class GeneticEntityProperty { +public class GenericEntityProperty { + + private Integer geneticEntityId; private String name; private String value; + public Integer getGeneticEntityId() { + return geneticEntityId; + } + + public void setGeneticEntityId(Integer geneticEntityId) { + this.geneticEntityId = geneticEntityId; + } + public String getName() { return name; } diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GeneticDatatypeMetadata.java index 197b5cfd563..a0543333557 100644 --- a/src/main/java/org/cbioportal/application/file/model/GeneticDatatypeMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/GeneticDatatypeMetadata.java @@ -1,6 +1,5 @@ package org.cbioportal.application.file.model; -import java.util.LinkedHashMap; import java.util.SequencedMap; //TODO Rename diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java b/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java index 4cb184342bf..7ec0e3103d0 100644 --- a/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java +++ b/src/main/java/org/cbioportal/application/file/model/GeneticEntity.java @@ -1,9 +1,19 @@ package org.cbioportal.application.file.model; public class GeneticEntity { + + private Integer geneticEntityId; private String stableId; private String entityType; + public Integer getGeneticEntityId() { + return geneticEntityId; + } + + public void setGeneticEntityId(Integer geneticEntityId) { + this.geneticEntityId = geneticEntityId; + } + public String getEntityType() { return entityType; } diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java b/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java index b081234e8cd..e812332ab7d 100644 --- a/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java +++ b/src/main/java/org/cbioportal/application/file/model/GeneticProfileData.java @@ -5,21 +5,20 @@ public class GeneticProfileData { private GeneticEntity geneticEntity; private Gene gene; - private List properties; private String commaSeparatedValues; public String getCommaSeparatedValues() { return commaSeparatedValues; } - public List getValues() { - return List.of(commaSeparatedValues.split(",")); - } - public void setCommaSeparatedValues(String commaSeparatedValues) { this.commaSeparatedValues = commaSeparatedValues; } + public List getValues() { + return List.of(commaSeparatedValues.split(",")); + } + public Gene getGene() { return gene; } @@ -36,11 +35,4 @@ public void setGeneticEntity(GeneticEntity geneticEntity) { this.geneticEntity = geneticEntity; } - public List getProperties() { - return properties; - } - - public void setProperties(List properties) { - this.properties = properties; - } } diff --git a/src/main/java/org/cbioportal/application/file/model/GeneticProfileDatatypeMetadata.java b/src/main/java/org/cbioportal/application/file/model/GeneticProfileDatatypeMetadata.java index e8fd2523d14..c103f17b4dd 100644 --- a/src/main/java/org/cbioportal/application/file/model/GeneticProfileDatatypeMetadata.java +++ b/src/main/java/org/cbioportal/application/file/model/GeneticProfileDatatypeMetadata.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.model; +import java.util.List; import java.util.SequencedMap; public class GeneticProfileDatatypeMetadata implements GeneticDatatypeMetadata { @@ -15,6 +16,7 @@ public class GeneticProfileDatatypeMetadata implements GeneticDatatypeMetadata { private Float pivotThreshold; private String sortOrder; private Boolean patientLevel; + private List genericEntitiesMetaProperties; public GeneticProfileDatatypeMetadata() { } @@ -23,6 +25,10 @@ public String getStableId() { return stableId; } + public void setStableId(String stableId) { + this.stableId = stableId; + } + /** * Get the stable ID of the genetic datatype without the cancer study identifier. * @@ -38,10 +44,6 @@ public String getGeneticDatatypeStableId() { return stableId.replace(this.cancerStudyIdentifier + "_", ""); } - public void setStableId(String stableId) { - this.stableId = stableId; - } - @Override public String getGeneticAlterationType() { return geneticAlterationType; @@ -96,6 +98,10 @@ public Boolean getShowProfileInAnalysisTab() { return showProfileInAnalysisTab; } + public void setShowProfileInAnalysisTab(Boolean showProfileInAnalysisTab) { + this.showProfileInAnalysisTab = showProfileInAnalysisTab; + } + public String getGenericAssayType() { return genericAssayType; } @@ -104,10 +110,6 @@ public void setGenericAssayType(String genericAssayType) { this.genericAssayType = genericAssayType; } - public void setShowProfileInAnalysisTab(Boolean showProfileInAnalysisTab) { - this.showProfileInAnalysisTab = showProfileInAnalysisTab; - } - public Float getPivotThreshold() { return pivotThreshold; } @@ -132,6 +134,14 @@ public void setPatientLevel(Boolean patientLevel) { this.patientLevel = patientLevel; } + public List getGenericEntitiesMetaProperties() { + return genericEntitiesMetaProperties; + } + + public void setGenericEntitiesMetaProperties(List genericEntitiesMetaProperties) { + this.genericEntitiesMetaProperties = genericEntitiesMetaProperties; + } + @Override public SequencedMap toMetadataKeyValues() { var metadata = GeneticDatatypeMetadata.super.toMetadataKeyValues(); @@ -144,6 +154,7 @@ public SequencedMap toMetadataKeyValues() { metadata.put("value_sort_order", getSortOrder()); metadata.put("patient_level", getPatientLevel() == null ? null : getPatientLevel().toString().toLowerCase()); metadata.put("generic_assay_type", getGenericAssayType()); + metadata.put("generic_entity_meta_properties", getGenericEntitiesMetaProperties() == null ? null : String.join(",", getGenericEntitiesMetaProperties())); return metadata; } } \ No newline at end of file diff --git a/src/main/java/org/cbioportal/application/file/model/HeaderInfo.java b/src/main/java/org/cbioportal/application/file/model/HeaderInfo.java index 8ddaff70330..1e37a2ea285 100644 --- a/src/main/java/org/cbioportal/application/file/model/HeaderInfo.java +++ b/src/main/java/org/cbioportal/application/file/model/HeaderInfo.java @@ -4,5 +4,6 @@ public interface HeaderInfo { Iterable> getComments(); + SequencedSet getHeader(); } diff --git a/src/main/java/org/cbioportal/application/file/model/MafRecord.java b/src/main/java/org/cbioportal/application/file/model/MafRecord.java index 71e0cb7da9a..2ac20eca92b 100644 --- a/src/main/java/org/cbioportal/application/file/model/MafRecord.java +++ b/src/main/java/org/cbioportal/application/file/model/MafRecord.java @@ -10,186 +10,192 @@ * Represents a record in a Mutation Annotation Format (MAF) file. */ public class MafRecord implements TableRow { + private static final LinkedHashMap> MAF_ROW = new LinkedHashMap<>(); + + static { + MAF_ROW.put("Hugo_Symbol", MafRecord::getHugoSymbol); + MAF_ROW.put("Entrez_Gene_Id", MafRecord::getEntrezGeneId); + MAF_ROW.put("Center", MafRecord::getCenter); + MAF_ROW.put("NCBI_Build", MafRecord::getNcbiBuild); + MAF_ROW.put("Chromosome", MafRecord::getChromosome); + MAF_ROW.put("Start_Position", (mafRecord -> mafRecord.getStartPosition() == null ? null : mafRecord.getStartPosition().toString())); + MAF_ROW.put("End_Position", mafRecord -> mafRecord.getEndPosition() == null ? null : mafRecord.getEndPosition().toString()); + MAF_ROW.put("Strand", MafRecord::getStrand); + MAF_ROW.put("Variant_Classification", MafRecord::getVariantClassification); + MAF_ROW.put("Variant_Type", MafRecord::getVariantType); + MAF_ROW.put("Reference_Allele", MafRecord::getReferenceAllele); + MAF_ROW.put("Tumor_Seq_Allele1", MafRecord::getTumorSeqAllele1); + MAF_ROW.put("Tumor_Seq_Allele2", MafRecord::getTumorSeqAllele2); + MAF_ROW.put("dbSNP_RS", MafRecord::getDbSnpRs); + MAF_ROW.put("dbSNP_Val_Status", MafRecord::getDbSnpValStatus); + MAF_ROW.put("Tumor_Sample_Barcode", MafRecord::getTumorSampleBarcode); + MAF_ROW.put("Matched_Norm_Sample_Barcode", MafRecord::getMatchedNormSampleBarcode); + MAF_ROW.put("Match_Norm_Seq_Allele1", MafRecord::getMatchNormSeqAllele1); + MAF_ROW.put("Match_Norm_Seq_Allele2", MafRecord::getMatchNormSeqAllele2); + MAF_ROW.put("Tumor_Validation_Allele1", MafRecord::getTumorValidationAllele1); + MAF_ROW.put("Tumor_Validation_Allele2", MafRecord::getTumorValidationAllele2); + MAF_ROW.put("Match_Norm_Validation_Allele1", MafRecord::getMatchNormValidationAllele1); + MAF_ROW.put("Match_Norm_Validation_Allele2", MafRecord::getMatchNormValidationAllele2); + MAF_ROW.put("Verification_Status", MafRecord::getVerificationStatus); + MAF_ROW.put("Validation_Status", MafRecord::getValidationStatus); + MAF_ROW.put("Mutation_Status", MafRecord::getMutationStatus); + MAF_ROW.put("Sequencing_Phase", MafRecord::getSequencingPhase); + MAF_ROW.put("Sequence_Source", MafRecord::getSequenceSource); + MAF_ROW.put("Validation_Method", MafRecord::getValidationMethod); + MAF_ROW.put("Score", MafRecord::getScore); + MAF_ROW.put("BAM_File", MafRecord::getBamFile); + MAF_ROW.put("Sequencer", MafRecord::getSequencer); + MAF_ROW.put("HGVSp_Short", MafRecord::getHgvspShort); + MAF_ROW.put("t_alt_count", (mafRecord -> mafRecord.gettAltCount() == null ? null : mafRecord.gettAltCount().toString())); + MAF_ROW.put("t_ref_count", (mafRecord -> mafRecord.gettRefCount() == null ? null : mafRecord.gettRefCount().toString())); + MAF_ROW.put("n_alt_count", (mafRecord -> mafRecord.getnAltCount() == null ? null : mafRecord.getnAltCount().toString())); + MAF_ROW.put("n_ref_count", (mafRecord -> mafRecord.getnRefCount() == null ? null : mafRecord.getnRefCount().toString())); + } + /** * A HUGO gene symbol. */ private String hugoSymbol; - /** * A Entrez Gene identifier. */ private String entrezGeneId; - /** * The sequencing center. */ private String center; - /** * The Genome Reference Consortium Build used by a variant calling software. It must be "GRCh37" or "GRCh38" for a human, and "GRCm38" for a mouse. */ private String ncbiBuild; - /** * A chromosome number, e.g., "7". */ private String chromosome; - /** * Start position of event. */ private Long startPosition; - /** * End position of event. */ private Long endPosition; - /** * We assume that the mutation is reported for the + strand. */ private String strand; - /** * Translational effect of variant allele, e.g. Missense_Mutation, Silent, etc. */ private String variantClassification; - /** * Variant Type, e.g. SNP, DNP, etc. */ private String variantType; - /** * The plus strand reference allele at this position. */ private String referenceAllele; - /** * Primary data genotype. */ private String tumorSeqAllele1; - /** * Primary data genotype. */ private String tumorSeqAllele2; - /** * Latest dbSNP rs ID. */ private String dbSnpRs; - /** * dbSNP validation status. */ private String dbSnpValStatus; - /** * This is the sample ID. Either a TCGA barcode (patient identifier will be extracted), or for non-TCGA data, a literal SAMPLE_ID as listed in the clinical data file. */ private String tumorSampleBarcode; - /** * The sample ID for the matched normal sample. */ private String matchedNormSampleBarcode; - /** * Primary data. */ private String matchNormSeqAllele1; - /** * Primary data. */ private String matchNormSeqAllele2; - /** * Secondary data from orthogonal technology. */ private String tumorValidationAllele1; - /** * Secondary data from orthogonal technology. */ private String tumorValidationAllele2; - /** * Secondary data from orthogonal technology. */ private String matchNormValidationAllele1; - /** * Secondary data from orthogonal technology. */ private String matchNormValidationAllele2; - /** * Second pass results from independent attempt using same methods as primary data source. "Verified", "Unknown" or "NA". */ private String verificationStatus; - /** * Second pass results from orthogonal technology. "Valid", "Invalid", "Untested", "Inconclusive", "Redacted", "Unknown" or "NA". */ private String validationStatus; - /** * "Somatic" or "Germline" are supported by the UI in Mutations tab. "None", "LOH" and "Wildtype" will not be loaded. Other values will be displayed as text. */ private String mutationStatus; - /** * Indicates current sequencing phase. */ private String sequencingPhase; - /** * Molecular assay type used to produce the analytes used for sequencing. */ private String sequenceSource; - /** * The assay platforms used for the validation call. */ private String validationMethod; - /** * Score */ private String score; - /** * The BAM file used to call the variant. */ private String bamFile; - /** * Instrument used to produce primary data. */ private String sequencer; - /** * Amino Acid Change, e.g. p.V600E. */ private String hgvspShort; - /** * Variant allele count (tumor). */ private Integer tAltCount; - /** * Reference allele count (tumor). */ private Integer tRefCount; - /** * Variant allele count (normal). */ private Integer nAltCount; - /** * Reference allele count (normal). */ @@ -198,48 +204,6 @@ public class MafRecord implements TableRow { public MafRecord() { } - private static final LinkedHashMap> MAF_ROW = new LinkedHashMap<>(); - - static { - MAF_ROW.put("Hugo_Symbol", MafRecord::getHugoSymbol); - MAF_ROW.put("Entrez_Gene_Id", MafRecord::getEntrezGeneId); - MAF_ROW.put("Center", MafRecord::getCenter); - MAF_ROW.put("NCBI_Build", MafRecord::getNcbiBuild); - MAF_ROW.put("Chromosome", MafRecord::getChromosome); - MAF_ROW.put("Start_Position", (mafRecord -> mafRecord.getStartPosition() == null ? null : mafRecord.getStartPosition().toString())); - MAF_ROW.put("End_Position", mafRecord -> mafRecord.getEndPosition() == null ? null : mafRecord.getEndPosition().toString()); - MAF_ROW.put("Strand", MafRecord::getStrand); - MAF_ROW.put("Variant_Classification", MafRecord::getVariantClassification); - MAF_ROW.put("Variant_Type", MafRecord::getVariantType); - MAF_ROW.put("Reference_Allele", MafRecord::getReferenceAllele); - MAF_ROW.put("Tumor_Seq_Allele1", MafRecord::getTumorSeqAllele1); - MAF_ROW.put("Tumor_Seq_Allele2", MafRecord::getTumorSeqAllele2); - MAF_ROW.put("dbSNP_RS", MafRecord::getDbSnpRs); - MAF_ROW.put("dbSNP_Val_Status", MafRecord::getDbSnpValStatus); - MAF_ROW.put("Tumor_Sample_Barcode", MafRecord::getTumorSampleBarcode); - MAF_ROW.put("Matched_Norm_Sample_Barcode", MafRecord::getMatchedNormSampleBarcode); - MAF_ROW.put("Match_Norm_Seq_Allele1", MafRecord::getMatchNormSeqAllele1); - MAF_ROW.put("Match_Norm_Seq_Allele2", MafRecord::getMatchNormSeqAllele2); - MAF_ROW.put("Tumor_Validation_Allele1", MafRecord::getTumorValidationAllele1); - MAF_ROW.put("Tumor_Validation_Allele2", MafRecord::getTumorValidationAllele2); - MAF_ROW.put("Match_Norm_Validation_Allele1", MafRecord::getMatchNormValidationAllele1); - MAF_ROW.put("Match_Norm_Validation_Allele2", MafRecord::getMatchNormValidationAllele2); - MAF_ROW.put("Verification_Status", MafRecord::getVerificationStatus); - MAF_ROW.put("Validation_Status", MafRecord::getValidationStatus); - MAF_ROW.put("Mutation_Status", MafRecord::getMutationStatus); - MAF_ROW.put("Sequencing_Phase", MafRecord::getSequencingPhase); - MAF_ROW.put("Sequence_Source", MafRecord::getSequenceSource); - MAF_ROW.put("Validation_Method", MafRecord::getValidationMethod); - MAF_ROW.put("Score", MafRecord::getScore); - MAF_ROW.put("BAM_File", MafRecord::getBamFile); - MAF_ROW.put("Sequencer", MafRecord::getSequencer); - MAF_ROW.put("HGVSp_Short", MafRecord::getHgvspShort); - MAF_ROW.put("t_alt_count", (mafRecord -> mafRecord.gettAltCount() == null ? null : mafRecord.gettAltCount().toString())); - MAF_ROW.put("t_ref_count", (mafRecord -> mafRecord.gettRefCount() == null ? null : mafRecord.gettRefCount().toString())); - MAF_ROW.put("n_alt_count", (mafRecord -> mafRecord.getnAltCount() == null ? null : mafRecord.getnAltCount().toString())); - MAF_ROW.put("n_ref_count", (mafRecord -> mafRecord.getnRefCount() == null ? null : mafRecord.getnRefCount().toString())); - } - public static SequencedSet getHeader() { return new LinkedHashSet<>(MAF_ROW.sequencedKeySet()); } diff --git a/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java index c81c3947167..c3c975de906 100644 --- a/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java +++ b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java @@ -4,4 +4,21 @@ import java.util.Iterator; public interface CloseableIterator extends Closeable, Iterator { + static CloseableIterator empty() { + return new CloseableIterator() { + @Override + public void close() { + } + + @Override + public boolean hasNext() { + return false; + } + + @Override + public T next() { + throw new UnsupportedOperationException("No elements in iterator"); + } + }; + } } \ No newline at end of file diff --git a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml index 1c64b7342b6..dd9c76907b3 100644 --- a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml +++ b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml @@ -21,6 +21,7 @@ + @@ -28,25 +29,44 @@ - - - - + + + + + + + \ No newline at end of file From 1b999776e8f30d67fc0a5504693c8e959a54b7cc Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 11 Apr 2025 17:40:47 +0200 Subject: [PATCH 25/69] Add README to the package --- .../org/cbioportal/application/file/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/main/java/org/cbioportal/application/file/README.md diff --git a/src/main/java/org/cbioportal/application/file/README.md b/src/main/java/org/cbioportal/application/file/README.md new file mode 100644 index 00000000000..a868eaf1172 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/README.md @@ -0,0 +1,15 @@ +# Study Data Export + +This package contains the code for exporting study data from the database to a file format. The export process involves several steps, including: +1. Retrieving the study data from the database. +2. Transforming the data into a suitable format for export. +3. Writing the transformed data to a file. + +The implementation is done with minimum dependencies on the rest of the code to ensure that the code is lightweight, performant and easy to move to a separate web application if needed. +To make export process take less RAM, the code uses a streaming approach to read and write data. On the database side, the code uses a cursor to read data in chunks, and on the web controller side, the code uses a streaming response to write data in chunks. +This allows the code to handle large datasets without running out of memory. + +## Usage + +Set `dynamic_study_export_mode` to `true` in the application properties file to enable the dynamic study export mode. +This mode allows the user to export study with `/export/study/{studyId}.zip` link. \ No newline at end of file From e2c69c596d3d3740746335f034575d9483595f00 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Mon, 14 Apr 2025 14:25:34 +0200 Subject: [PATCH 26/69] Add MRNA and Generic Assay data type to the test study --- .../data_clinical_patient_attributes.txt | 1136 ++++++++--------- .../data_clinical_sample_attributes.txt | 1132 ++++++++-------- ...limit-value_generic_assay_patient_test.txt | 3 + ...assay_limit-value_mutational_signature.txt | 61 + ...neric_assay_limit-value_treatment_ec50.txt | 10 + ...neric_assay_limit-value_treatment_ic50.txt | 10 + .../data_mrna_expression_continuous_mrna.txt | 7 + .../data_mutation_extended_maf_mutations.txt | 6 +- ...limit-value_generic_assay_patient_test.txt | 11 + ...assay_limit-value_mutational_signature.txt | 11 + ...neric_assay_limit-value_treatment_ec50.txt | 13 + ...neric_assay_limit-value_treatment_ic50.txt | 13 + .../meta_mrna_expression_continuous_mrna.txt | 9 + 13 files changed, 1285 insertions(+), 1137 deletions(-) create mode 100644 test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt create mode 100644 test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt create mode 100644 test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt create mode 100644 test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt create mode 100644 test/test_data/study_es_0_import_export/data_mrna_expression_continuous_mrna.txt create mode 100644 test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt create mode 100644 test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_mutational_signature.txt create mode 100644 test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ec50.txt create mode 100644 test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ic50.txt create mode 100644 test/test_data/study_es_0_import_export/meta_mrna_expression_continuous_mrna.txt diff --git a/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt b/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt index c249ac00a08..d73d39d86bb 100644 --- a/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt +++ b/test/test_data/study_es_0_import_export/data_clinical_patient_attributes.txt @@ -3,419 +3,339 @@ #STRING NUMBER STRING NUMBER STRING #1 1 1 1 1 PATIENT_ID DFS_MONTHS DFS_STATUS OS_MONTHS OS_STATUS -TCGA-A1-A0SB 8.51 0:DiseaseFree 8.51 0:LIVING -TCGA-A1-A0SD 14.36 0:DiseaseFree 14.36 0:LIVING -TCGA-A1-A0SE 43.37 0:DiseaseFree 43.37 0:LIVING -TCGA-A1-A0SF 48.06 0:DiseaseFree 48.06 0:LIVING -TCGA-A1-A0SG 14.23 0:DiseaseFree 14.23 0:LIVING -TCGA-A1-A0SH 47.21 0:DiseaseFree 47.21 0:LIVING -TCGA-A1-A0SI 20.83 0:DiseaseFree 20.83 0:LIVING -TCGA-A1-A0SJ 14 0:DiseaseFree 14 0:LIVING -TCGA-A1-A0SK 31.77 1:DECEASED -TCGA-A1-A0SM 7.95 0:DiseaseFree 7.95 0:LIVING -TCGA-A1-A0SN 39.29 0:DiseaseFree 39.29 0:LIVING -TCGA-A1-A0SO 27.99 0:DiseaseFree 27.99 0:LIVING -TCGA-A1-A0SP 19.15 0:DiseaseFree 19.15 0:LIVING -TCGA-A1-A0SQ 18.17 0:DiseaseFree 18.17 0:LIVING -TCGA-A2-A04N 103.59 0:DiseaseFree 103.59 0:LIVING TCGA-A2-A04P 1:Recurred/Progressed -TCGA-A2-A04Q 41.89 0:DiseaseFree 41.89 0:LIVING -TCGA-A2-A04R 77.67 0:DiseaseFree 77.67 0:LIVING -TCGA-A2-A04T 64.06 0:DiseaseFree 64.06 0:LIVING -TCGA-A2-A04U 22.01 0:DiseaseFree 22.01 0:LIVING -TCGA-A2-A04V 1:Recurred/Progressed 63.08 1:DECEASED -TCGA-A2-A04W 63.01 0:DiseaseFree 63.01 0:LIVING -TCGA-A2-A04X 44.32 0:DiseaseFree 44.32 0:LIVING -TCGA-A2-A04Y 25.07 0:DiseaseFree 25.07 0:LIVING -TCGA-A2-A0CL 60.02 0:DiseaseFree 60.02 0:LIVING +TCGA-A1-A0SK 31.77 1:DECEASED TCGA-A2-A0CM 1:Recurred/Progressed 24.77 1:DECEASED -TCGA-A2-A0CP 81.97 0:DiseaseFree 81.97 0:LIVING -TCGA-A2-A0CQ 78.59 0:DiseaseFree 78.59 0:LIVING -TCGA-A2-A0CS 75.5 0:DiseaseFree 75.5 0:LIVING -TCGA-A2-A0CT 62.98 0:DiseaseFree 62.98 0:LIVING -TCGA-A2-A0CU 4.57 0:DiseaseFree 5.16 1:DECEASED -TCGA-A2-A0CV 61.44 0:DiseaseFree 61.44 0:LIVING -TCGA-A2-A0CW 57.49 0:DiseaseFree 57.49 0:LIVING -TCGA-A2-A0CX 42.81 0:DiseaseFree 42.81 0:LIVING -TCGA-A2-A0CY 42.32 0:DiseaseFree 42.32 0:LIVING -TCGA-A2-A0CZ 43.96 0:DiseaseFree 43.96 0:LIVING +TCGA-AR-A1AR 17.18 1:DECEASED +TCGA-B6-A0WX 1:Recurred/Progressed 21.45 1:DECEASED +TCGA-BH-A1F0 1:Recurred/Progressed 25.79 1:DECEASED +TCGA-B6-A0I6 1:Recurred/Progressed 32.56 1:DECEASED +TCGA-BH-A18V 51.09 1:DECEASED +TCGA-BH-A18Q 55.59 1:DECEASED +TCGA-BH-A18K 1:Recurred/Progressed 90.74 1:DECEASED +TCGA-BH-A0HL 2.37 0:DiseaseFree 2.37 0:LIVING +TCGA-BH-A0E0 4.37 0:DiseaseFree 4.37 0:LIVING +TCGA-BH-A0RX 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-A7-A13D 8.77 0:DiseaseFree 8.77 0:LIVING +TCGA-BH-A0E6 9.59 0:DiseaseFree 9.59 0:LIVING +TCGA-AO-A0J4 9.66 0:DiseaseFree 9.66 0:LIVING +TCGA-A7-A0CE 8.31 0:DiseaseFree 8.31 0:LIVING +TCGA-A7-A13E 9.43 0:DiseaseFree 9.43 0:LIVING +TCGA-A7-A0DA 12.25 0:DiseaseFree 12.25 0:LIVING +TCGA-D8-A142 2 0:DiseaseFree 2 0:LIVING +TCGA-D8-A143 5.65 0:DiseaseFree 5.65 0:LIVING +TCGA-AQ-A04J 5.22 0:DiseaseFree 5.22 0:LIVING +TCGA-BH-A0HN 16.95 0:DiseaseFree 16.95 0:LIVING +TCGA-A2-A0T0 11.07 0:DiseaseFree 11.07 0:LIVING +TCGA-A2-A0YE 8.28 0:DiseaseFree 8.28 0:LIVING +TCGA-A2-A0YJ 10.71 0:DiseaseFree 10.71 0:LIVING TCGA-A2-A0D0 21.12 0:DiseaseFree 21.12 0:LIVING -TCGA-A2-A0D1 25.82 0:DiseaseFree 25.82 0:LIVING +TCGA-A2-A04U 22.01 0:DiseaseFree 22.01 0:LIVING +TCGA-AO-A0J6 25.46 0:DiseaseFree 25.46 0:LIVING +TCGA-A2-A0YM 21.72 0:DiseaseFree 21.72 0:LIVING TCGA-A2-A0D2 25 0:DiseaseFree 25 0:LIVING -TCGA-A2-A0D3 24.18 0:DiseaseFree 24.18 0:LIVING -TCGA-A2-A0D4 16.3 0:DiseaseFree 16.3 0:LIVING -TCGA-A2-A0EM 90.58 0:DiseaseFree 90.58 0:LIVING -TCGA-A2-A0EN 82.63 0:DiseaseFree 82.63 0:LIVING -TCGA-A2-A0EO 71.65 0:DiseaseFree 71.65 0:LIVING -TCGA-A2-A0EQ 67.45 0:DiseaseFree 67.45 0:LIVING -TCGA-A2-A0ER 62.49 0:DiseaseFree 62.49 0:LIVING -TCGA-A2-A0ES 32.89 0:DiseaseFree 32.89 0:LIVING -TCGA-A2-A0ET 26.51 0:DiseaseFree 26.51 0:LIVING -TCGA-A2-A0EU 24.08 0:DiseaseFree 24.08 0:LIVING -TCGA-A2-A0EV 17.91 0:DiseaseFree 17.91 0:LIVING -TCGA-A2-A0EW 25.3 0:DiseaseFree 25.3 0:LIVING -TCGA-A2-A0EX 18.04 0:DiseaseFree 18.04 0:LIVING -TCGA-A2-A0EY 15.93 0:DiseaseFree 15.93 0:LIVING -TCGA-A2-A0ST 53.98 0:DiseaseFree 53.98 0:LIVING -TCGA-A2-A0SU 44.38 0:DiseaseFree 44.38 0:LIVING -TCGA-A2-A0SV 1:Recurred/Progressed 27.1 1:DECEASED -TCGA-A2-A0SW 1:Recurred/Progressed 44.81 1:DECEASED +TCGA-BH-A0B3 39.52 0:DiseaseFree 39.52 0:LIVING +TCGA-A2-A04Q 41.89 0:DiseaseFree 41.89 0:LIVING TCGA-A2-A0SX 1:Recurred/Progressed 42.32 0:LIVING -TCGA-A2-A0SY 37.91 0:DiseaseFree 37.91 0:LIVING -TCGA-A2-A0T0 11.07 0:DiseaseFree 11.07 0:LIVING +TCGA-AO-A0JL 43.33 0:DiseaseFree 43.33 0:LIVING +TCGA-AO-A12F 48.33 0:DiseaseFree 48.33 0:LIVING +TCGA-BH-A0B9 51.65 0:DiseaseFree 51.65 0:LIVING +TCGA-A2-A04T 64.06 0:DiseaseFree 64.06 0:LIVING +TCGA-B6-A0RT 89.39 0:DiseaseFree 89.39 0:LIVING +TCGA-AO-A128 94.52 0:DiseaseFree 94.52 0:LIVING +TCGA-AO-A129 96.03 0:DiseaseFree 96.03 0:LIVING +TCGA-AO-A124 102.47 0:DiseaseFree 102.47 0:LIVING +TCGA-B6-A0RU 131.12 0:DiseaseFree 131.12 0:LIVING +TCGA-B6-A0IQ 127.18 0:DiseaseFree 127.18 0:LIVING +TCGA-B6-A0I2 125.7 0:DiseaseFree 125.7 0:LIVING +TCGA-B6-A0IJ 176.85 0:DiseaseFree 176.85 0:LIVING +TCGA-B6-A0X1 186.31 0:DiseaseFree 186.31 0:LIVING +TCGA-B6-A0RE 211.38 0:DiseaseFree 211.38 0:LIVING +TCGA-A2-A0ST 53.98 0:DiseaseFree 53.98 0:LIVING +TCGA-AR-A0TP 78.59 0:DiseaseFree 78.59 0:LIVING +TCGA-A1-A0SO 27.99 0:DiseaseFree 27.99 0:LIVING +TCGA-A8-A07C 19.05 0:DiseaseFree 19.05 0:LIVING +TCGA-A8-A07O 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A07R 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-A8-A07U 9.95 0:DiseaseFree 9.95 0:LIVING +TCGA-A8-A08H 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A08R 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-AN-A04D 1.71 0:DiseaseFree 1.71 0:LIVING +TCGA-AN-A0AL 6.47 0:DiseaseFree 6.47 0:LIVING +TCGA-AN-A0AR 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0AT 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0FJ 7.92 0:DiseaseFree 7.92 0:LIVING +TCGA-AN-A0FL 7.56 0:DiseaseFree 7.56 0:LIVING +TCGA-AN-A0FX 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0G0 0.53 0:DiseaseFree 0.53 0:LIVING +TCGA-AN-A0XU 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AR-A0TS 37.39 0:DiseaseFree 37.39 0:LIVING +TCGA-AR-A0TU 11.83 0:DiseaseFree 11.83 0:LIVING +TCGA-AR-A0U0 0.26 0:DiseaseFree 0.26 0:LIVING +TCGA-AR-A0U1 6.08 0:DiseaseFree 6.08 0:LIVING +TCGA-AR-A0U4 53.45 0:DiseaseFree 53.45 0:LIVING +TCGA-AR-A1AH 75.5 0:DiseaseFree 75.5 0:LIVING +TCGA-AR-A1AI 61.8 0:DiseaseFree 61.8 0:LIVING +TCGA-AR-A1AJ 52.7 0:DiseaseFree 52.7 0:LIVING +TCGA-AR-A1AQ 43.01 0:DiseaseFree 43.01 0:LIVING +TCGA-AR-A1AY 20.17 0:DiseaseFree 20.17 0:LIVING +TCGA-BH-A0AV 38.77 0:DiseaseFree 38.77 0:LIVING +TCGA-BH-A0BG 24.84 0:DiseaseFree 24.84 0:LIVING +TCGA-BH-A0BL 43.99 0:DiseaseFree 43.99 0:LIVING +TCGA-BH-A0BW 11.66 0:DiseaseFree 11.66 0:LIVING +TCGA-BH-A0DL 48.2 0:DiseaseFree 48.2 0:LIVING +TCGA-BH-A0WA 12.22 0:DiseaseFree 12.22 0:LIVING +TCGA-BH-A18G 2 0:DiseaseFree 2 0:LIVING +TCGA-C8-A12K 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12V 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A131 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A134 0 0:DiseaseFree 0 0:LIVING +TCGA-D8-A147 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-E2-A14N 44.35 0:DiseaseFree 44.35 0:LIVING +TCGA-E2-A14R 27.76 0:DiseaseFree 27.76 0:LIVING +TCGA-E2-A14X 22.73 0:DiseaseFree 22.73 0:LIVING +TCGA-E2-A14Y 22.6 0:DiseaseFree 22.6 0:LIVING +TCGA-E2-A150 19.42 0:DiseaseFree 19.42 0:LIVING +TCGA-E2-A158 14.78 0:DiseaseFree 14.78 0:LIVING +TCGA-E2-A159 16.92 0:DiseaseFree 16.92 0:LIVING +TCGA-E2-A1AZ 64.52 0:DiseaseFree 64.52 0:LIVING +TCGA-E2-A1B5 25.43 0:DiseaseFree 25.43 0:LIVING +TCGA-A8-A08L 9.99 1:DECEASED +TCGA-BH-A1EV 1:Recurred/Progressed 11.99 1:DECEASED +TCGA-B6-A0I9 1:Recurred/Progressed 12.12 1:DECEASED +TCGA-A8-A09X 14 1:DECEASED +TCGA-B6-A0IK 1:Recurred/Progressed 18.76 1:DECEASED +TCGA-BH-A18P 1:Recurred/Progressed 30.26 1:DECEASED +TCGA-A8-A08J 37.03 1:DECEASED +TCGA-BH-A18R 36.11 0:DiseaseFree 37.49 1:DECEASED +TCGA-AR-A1AT 41.79 1:DECEASED +TCGA-B6-A0RS 1:Recurred/Progressed 100.6 1:DECEASED +TCGA-BH-A0DZ 16.26 0:DiseaseFree 16.26 0:LIVING TCGA-A2-A0T1 10.58 0:DiseaseFree 10.58 0:LIVING -TCGA-A2-A0T2 -TCGA-A2-A0T3 14.98 0:DiseaseFree 14.98 0:LIVING -TCGA-A2-A0T4 12.98 0:DiseaseFree 12.98 0:LIVING +TCGA-AO-A0J2 19.22 0:DiseaseFree 19.22 0:LIVING +TCGA-BH-A0AW 20.43 0:DiseaseFree 20.43 0:LIVING +TCGA-BH-A0EE 30.98 0:DiseaseFree 30.98 0:LIVING +TCGA-A2-A0D1 25.82 0:DiseaseFree 25.82 0:LIVING +TCGA-AO-A03N 1:Recurred/Progressed 54.04 0:LIVING +TCGA-A2-A0CY 42.32 0:DiseaseFree 42.32 0:LIVING +TCGA-A2-A04X 44.32 0:DiseaseFree 44.32 0:LIVING +TCGA-A2-A0CX 42.81 0:DiseaseFree 42.81 0:LIVING +TCGA-A2-A04W 63.01 0:DiseaseFree 63.01 0:LIVING +TCGA-AO-A12D 64 0:DiseaseFree 64 0:LIVING +TCGA-A2-A0CL 60.02 0:DiseaseFree 60.02 0:LIVING +TCGA-AO-A0JE 64.56 0:DiseaseFree 64.56 0:LIVING +TCGA-A2-A0EQ 67.45 0:DiseaseFree 67.45 0:LIVING +TCGA-AO-A03L 80.23 0:DiseaseFree 80.23 0:LIVING +TCGA-B6-A0RH 188.84 0:DiseaseFree 188.84 0:LIVING +TCGA-A8-A075 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-A8-A076 53.91 0:DiseaseFree 53.91 0:LIVING +TCGA-A8-A07B 32.98 0:DiseaseFree 32.98 0:LIVING +TCGA-A8-A07I 14 0:DiseaseFree 14 0:LIVING +TCGA-A8-A081 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A08B 23.06 0:DiseaseFree 23.06 0:LIVING +TCGA-A8-A08X 33.97 0:DiseaseFree 33.97 0:LIVING +TCGA-A8-A092 17.02 0:DiseaseFree 17.02 0:LIVING +TCGA-A8-A094 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A09G 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A0A7 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-AN-A04C 1.77 0:DiseaseFree 1.77 0:LIVING +TCGA-AN-A0FV 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AR-A0TX 0.49 0:DiseaseFree 0.49 0:LIVING +TCGA-BH-A0B7 56.93 0:DiseaseFree 56.93 0:LIVING +TCGA-BH-A0HY 28.48 0:DiseaseFree 28.48 0:LIVING +TCGA-C8-A12L 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12P 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Q 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12T 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Z 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A130 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A135 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A137 0.1 0:DiseaseFree 0.1 0:LIVING +TCGA-C8-A138 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-C8-A1HF 0 0:DiseaseFree 0 0:LIVING +TCGA-D8-A13Z 6.9 0:DiseaseFree 6.9 0:LIVING +TCGA-E2-A14P 16 0:DiseaseFree 16 0:LIVING +TCGA-E2-A14V 24.57 0:DiseaseFree 24.57 0:LIVING +TCGA-E2-A152 1:Recurred/Progressed 19.32 0:LIVING +TCGA-E2-A1B0 41.76 0:DiseaseFree 41.76 0:LIVING +TCGA-A2-A0CU 4.57 0:DiseaseFree 5.16 1:DECEASED +TCGA-AR-A0TR 5.26 1:DECEASED +TCGA-BH-A18T 1:Recurred/Progressed 7.36 1:DECEASED +TCGA-B6-A0I8 1:Recurred/Progressed 24.61 1:DECEASED +TCGA-B6-A0X4 1:Recurred/Progressed 28.22 1:DECEASED +TCGA-A8-A06U 28.98 1:DECEASED +TCGA-BH-A0EA 27.3 0:DiseaseFree 32.62 1:DECEASED +TCGA-BH-A18N 37.72 1:DECEASED +TCGA-BH-A1EU 0:DiseaseFree 42.25 1:DECEASED +TCGA-B6-A0X7 58.84 1:DECEASED +TCGA-A2-A04V 1:Recurred/Progressed 63.08 1:DECEASED +TCGA-BH-A18S 66 0:DiseaseFree 66 1:DECEASED +TCGA-BH-A18M 72.51 1:DECEASED +TCGA-B6-A0RM 77.96 0:DiseaseFree 77.96 1:DECEASED +TCGA-BH-A1ET 0:DiseaseFree 82.79 1:DECEASED +TCGA-B6-A0IN 1:Recurred/Progressed 84.53 1:DECEASED +TCGA-BH-A1EO 0:DiseaseFree 91.92 1:DECEASED +TCGA-B6-A0WS 0:DiseaseFree 97.41 1:DECEASED +TCGA-B6-A0RP 102.7 1:DECEASED +TCGA-B6-A0IH 112.29 1:DECEASED +TCGA-B6-A0WY 1:Recurred/Progressed 113.67 1:DECEASED +TCGA-BH-A1ES 1:Recurred/Progressed 113.74 1:DECEASED +TCGA-B6-A0X0 129.61 1:DECEASED +TCGA-B6-A0RQ 0:DiseaseFree 140.38 1:DECEASED +TCGA-B6-A0IG 1:Recurred/Progressed 146.39 1:DECEASED +TCGA-BH-A0HO 2.5 0:DiseaseFree 2.5 0:LIVING +TCGA-BH-A0DS 2.53 0:DiseaseFree 2.53 0:LIVING +TCGA-BH-A0DQ 3.22 0:DiseaseFree 3.22 0:LIVING +TCGA-BH-A0HK 5.85 0:DiseaseFree 5.85 0:LIVING +TCGA-A7-A0CG 5.45 0:DiseaseFree 5.45 0:LIVING +TCGA-A7-A0CH 5.29 0:DiseaseFree 5.29 0:LIVING +TCGA-A7-A0DB 4.6 0:DiseaseFree 4.6 0:LIVING +TCGA-A7-A0D9 5.22 0:DiseaseFree 5.22 0:LIVING +TCGA-AO-A0J8 9.1 0:DiseaseFree 9.1 0:LIVING +TCGA-BH-A0GZ 10.78 0:DiseaseFree 10.78 0:LIVING +TCGA-AO-A0JA 1:Recurred/Progressed 11.37 0:LIVING +TCGA-AO-A0JF 11.63 0:DiseaseFree 11.63 0:LIVING +TCGA-A7-A0CD 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-D8-A145 1.61 0:DiseaseFree 1.61 0:LIVING +TCGA-BH-A0HP 13.6 0:DiseaseFree 13.6 0:LIVING +TCGA-BH-A0DK 13.9 0:DiseaseFree 13.9 0:LIVING +TCGA-BH-A0E2 12.35 0:DiseaseFree 12.35 0:LIVING +TCGA-A2-A0YI 11.76 0:DiseaseFree 11.76 0:LIVING +TCGA-A2-A0YL 8.8 0:DiseaseFree 8.8 0:LIVING +TCGA-AO-A0JG 14.75 0:DiseaseFree 14.75 0:LIVING +TCGA-A2-A0YF 9.49 0:DiseaseFree 9.49 0:LIVING +TCGA-BH-A0DP 15.64 0:DiseaseFree 15.64 0:LIVING +TCGA-BH-A0E1 15.67 0:DiseaseFree 15.67 0:LIVING TCGA-A2-A0T5 10.55 0:DiseaseFree 10.55 0:LIVING TCGA-A2-A0T6 11.3 0:DiseaseFree 11.3 0:LIVING +TCGA-BH-A0HI 20.34 0:DiseaseFree 20.34 0:LIVING TCGA-A2-A0T7 13.04 0:DiseaseFree 13.04 0:LIVING -TCGA-A2-A0YC 21.12 0:DiseaseFree 21.12 0:LIVING +TCGA-BH-A0BJ 21.68 0:DiseaseFree 21.68 0:LIVING +TCGA-BH-A0H7 23.03 0:DiseaseFree 23.03 0:LIVING +TCGA-BH-A0HF 23.88 0:DiseaseFree 23.88 0:LIVING +TCGA-BH-A0EB 24.48 0:DiseaseFree 24.48 0:LIVING +TCGA-BH-A0H6 24.54 0:DiseaseFree 24.54 0:LIVING TCGA-A2-A0YD 18.07 0:DiseaseFree 18.07 0:LIVING -TCGA-A2-A0YE 8.28 0:DiseaseFree 8.28 0:LIVING -TCGA-A2-A0YF 9.49 0:DiseaseFree 9.49 0:LIVING -TCGA-A2-A0YG 13.27 0:DiseaseFree 13.27 0:LIVING -TCGA-A2-A0YH 12.45 0:DiseaseFree 12.45 0:LIVING -TCGA-A2-A0YI 11.76 0:DiseaseFree 11.76 0:LIVING -TCGA-A2-A0YJ 10.71 0:DiseaseFree 10.71 0:LIVING -TCGA-A2-A0YK 10.97 0:DiseaseFree 10.97 0:LIVING -TCGA-A2-A0YL 8.8 0:DiseaseFree 8.8 0:LIVING -TCGA-A2-A0YM 21.72 0:DiseaseFree 21.72 0:LIVING -TCGA-A2-A0YT 21.98 0:DiseaseFree 23.75 1:DECEASED -TCGA-A2-A1FV 15.11 0:DiseaseFree 15.11 0:LIVING -TCGA-A2-A1FW 7.26 0:DiseaseFree 7.26 0:LIVING -TCGA-A2-A1FX 30.72 0:DiseaseFree 30.72 0:LIVING -TCGA-A2-A1FZ 13.44 0:DiseaseFree 13.44 0:LIVING -TCGA-A2-A1G0 12.48 0:DiseaseFree 12.48 0:LIVING -TCGA-A2-A1G1 12.19 0:DiseaseFree 12.19 0:LIVING -TCGA-A2-A1G4 12.22 0:DiseaseFree 12.22 0:LIVING -TCGA-A2-A1G6 4.34 0:DiseaseFree 4.34 0:LIVING -TCGA-A2-A259 42.22 0:DiseaseFree 42.22 0:LIVING -TCGA-A2-A25A 97.51 0:DiseaseFree 97.51 0:LIVING -TCGA-A2-A25B 8.48 0:DiseaseFree 8.48 0:LIVING -TCGA-A2-A25C 9.36 0:DiseaseFree 9.36 0:LIVING -TCGA-A2-A25D 7.98 0:DiseaseFree 7.98 0:LIVING -TCGA-A2-A25E 82.49 0:DiseaseFree 82.49 0:LIVING -TCGA-A2-A25F 3.71 0:DiseaseFree 3.71 0:LIVING -TCGA-A7-A0CD 5.59 0:DiseaseFree 5.59 0:LIVING -TCGA-A7-A0CE 8.31 0:DiseaseFree 8.31 0:LIVING -TCGA-A7-A0CG 5.45 0:DiseaseFree 5.45 0:LIVING -TCGA-A7-A0CH 5.29 0:DiseaseFree 5.29 0:LIVING -TCGA-A7-A0CJ 6.18 0:DiseaseFree 6.18 0:LIVING -TCGA-A7-A0D9 5.22 0:DiseaseFree 5.22 0:LIVING -TCGA-A7-A0DA 12.25 0:DiseaseFree 12.25 0:LIVING -TCGA-A7-A0DB 4.6 0:DiseaseFree 4.6 0:LIVING -TCGA-A7-A0DC 8.97 0:DiseaseFree 8.97 0:LIVING -TCGA-A7-A13D 8.77 0:DiseaseFree 8.77 0:LIVING -TCGA-A7-A13E 9.43 0:DiseaseFree 9.43 0:LIVING -TCGA-A7-A13F 6.44 0:DiseaseFree 6.44 0:LIVING -TCGA-A7-A13G 6.83 0:DiseaseFree 6.83 0:LIVING -TCGA-A7-A26E 13.83 0:DiseaseFree 13.83 0:LIVING -TCGA-A7-A26F 8.44 0:DiseaseFree 8.44 0:LIVING -TCGA-A7-A26G 6.87 0:DiseaseFree 6.87 0:LIVING -TCGA-A7-A26H 2.1 0:DiseaseFree 2.1 0:LIVING -TCGA-A7-A26I 4.01 0:DiseaseFree 4.01 0:LIVING -TCGA-A7-A26J 1:Recurred/Progressed 2.2 0:LIVING -TCGA-A8-A06N 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A06O 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-BH-A0HB 26.48 0:DiseaseFree 26.48 0:LIVING +TCGA-BH-A0HX 27.24 0:DiseaseFree 27.24 0:LIVING +TCGA-AO-A12H 28.32 0:DiseaseFree 28.32 0:LIVING +TCGA-E2-A10E 13.73 0:DiseaseFree 13.73 0:LIVING +TCGA-A2-A0D3 24.18 0:DiseaseFree 24.18 0:LIVING +TCGA-E2-A10F 11.83 0:DiseaseFree 11.83 0:LIVING +TCGA-AO-A03V 29.11 0:DiseaseFree 29.11 0:LIVING +TCGA-A2-A0EW 25.3 0:DiseaseFree 25.3 0:LIVING +TCGA-BH-A0GY 30.13 0:DiseaseFree 30.13 0:LIVING +TCGA-A2-A0EV 17.91 0:DiseaseFree 17.91 0:LIVING +TCGA-BH-A0BC 32 0:DiseaseFree 32 0:LIVING +TCGA-A2-A0YC 21.12 0:DiseaseFree 21.12 0:LIVING +TCGA-A2-A0EU 24.08 0:DiseaseFree 24.08 0:LIVING +TCGA-A2-A0ET 26.51 0:DiseaseFree 26.51 0:LIVING +TCGA-A2-A04Y 25.07 0:DiseaseFree 25.07 0:LIVING +TCGA-BH-A0HQ 36.83 0:DiseaseFree 36.83 0:LIVING +TCGA-A2-A0ES 32.89 0:DiseaseFree 32.89 0:LIVING +TCGA-BH-A0BA 37.19 0:DiseaseFree 37.19 0:LIVING +TCGA-E2-A10B 24.57 0:DiseaseFree 24.57 0:LIVING +TCGA-BH-A0B1 37.72 0:DiseaseFree 37.72 0:LIVING +TCGA-BH-A0DH 37.98 0:DiseaseFree 37.98 0:LIVING +TCGA-BH-A0B4 39.13 0:DiseaseFree 39.13 0:LIVING +TCGA-BH-A0H9 40.97 0:DiseaseFree 40.97 0:LIVING +TCGA-AO-A0J9 1:Recurred/Progressed 41.23 0:LIVING +TCGA-AO-A12G 41.56 0:DiseaseFree 41.56 0:LIVING +TCGA-A2-A0SY 37.91 0:DiseaseFree 37.91 0:LIVING +TCGA-BH-A0E7 44.75 0:DiseaseFree 44.75 0:LIVING +TCGA-AO-A03M 47.8 0:DiseaseFree 47.8 0:LIVING +TCGA-BH-A0BV 49.9 0:DiseaseFree 49.9 0:LIVING +TCGA-BH-A0B8 51.55 0:DiseaseFree 51.55 0:LIVING +TCGA-A2-A0CZ 43.96 0:DiseaseFree 43.96 0:LIVING +TCGA-A2-A0SU 44.38 0:DiseaseFree 44.38 0:LIVING +TCGA-AO-A12E 57.23 0:DiseaseFree 57.23 0:LIVING +TCGA-E2-A106 51.09 0:DiseaseFree 51.09 0:LIVING +TCGA-A2-A0CV 61.44 0:DiseaseFree 61.44 0:LIVING +TCGA-AO-A12C 65.48 0:DiseaseFree 65.48 0:LIVING +TCGA-B6-A0RG 68.4 0:DiseaseFree 68.4 0:LIVING +TCGA-A2-A0CS 75.5 0:DiseaseFree 75.5 0:LIVING +TCGA-A2-A0EO 71.65 0:DiseaseFree 71.65 0:LIVING +TCGA-A2-A0CQ 78.59 0:DiseaseFree 78.59 0:LIVING +TCGA-A2-A0EN 82.63 0:DiseaseFree 82.63 0:LIVING +TCGA-AO-A12A 90.48 0:DiseaseFree 90.48 0:LIVING +TCGA-A2-A0CP 81.97 0:DiseaseFree 81.97 0:LIVING +TCGA-AO-A126 93.63 0:DiseaseFree 93.63 0:LIVING +TCGA-AO-A125 99.15 0:DiseaseFree 99.15 0:LIVING +TCGA-A2-A0EM 90.58 0:DiseaseFree 90.58 0:LIVING +TCGA-A2-A04N 103.59 0:DiseaseFree 103.59 0:LIVING +TCGA-AQ-A04L 109.86 0:DiseaseFree 109.86 0:LIVING +TCGA-B6-A0IO 110.06 0:DiseaseFree 110.06 0:LIVING +TCGA-B6-A0IP 110.85 0:DiseaseFree 110.85 0:LIVING +TCGA-B6-A0WZ 129.48 0:DiseaseFree 129.48 0:LIVING +TCGA-B6-A0I5 149.45 0:DiseaseFree 149.45 0:LIVING +TCGA-B6-A0RV 157.3 0:DiseaseFree 157.3 0:LIVING +TCGA-B6-A0RO 161.9 0:DiseaseFree 161.9 0:LIVING +TCGA-B6-A0RN 172.84 0:DiseaseFree 172.84 0:LIVING +TCGA-B6-A0WT 177.28 0:DiseaseFree 177.28 0:LIVING +TCGA-B6-A0IA 220.71 0:DiseaseFree 220.71 0:LIVING +TCGA-B6-A0RI 1:Recurred/Progressed 223.24 0:LIVING +TCGA-A1-A0SE 43.37 0:DiseaseFree 43.37 0:LIVING +TCGA-A2-A0EX 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-AO-A0JJ 49.67 0:DiseaseFree 49.67 0:LIVING +TCGA-E2-A105 38.21 0:DiseaseFree 38.21 0:LIVING +TCGA-A1-A0SD 14.36 0:DiseaseFree 14.36 0:LIVING +TCGA-A1-A0SH 47.21 0:DiseaseFree 47.21 0:LIVING +TCGA-A1-A0SJ 14 0:DiseaseFree 14 0:LIVING TCGA-A8-A06P 13.01 0:DiseaseFree 13.01 0:LIVING -TCGA-A8-A06Q 1.02 0:DiseaseFree 1.02 0:LIVING -TCGA-A8-A06R 17.94 0:DiseaseFree 17.94 0:LIVING TCGA-A8-A06T 41.03 0:DiseaseFree 41.03 0:LIVING -TCGA-A8-A06U 28.98 1:DECEASED -TCGA-A8-A06X 30.98 1:DECEASED TCGA-A8-A06Y 25.99 0:DiseaseFree 25.99 0:LIVING -TCGA-A8-A06Z 1.02 0:DiseaseFree 1.02 0:LIVING -TCGA-A8-A075 16.99 0:DiseaseFree 16.99 0:LIVING -TCGA-A8-A076 53.91 0:DiseaseFree 53.91 0:LIVING -TCGA-A8-A079 9 0:DiseaseFree 9 0:LIVING -TCGA-A8-A07B 32.98 0:DiseaseFree 32.98 0:LIVING -TCGA-A8-A07C 19.05 0:DiseaseFree 19.05 0:LIVING TCGA-A8-A07E 19.97 0:DiseaseFree 19.97 0:LIVING TCGA-A8-A07F 18.92 0:DiseaseFree 18.92 0:LIVING TCGA-A8-A07G 18.92 0:DiseaseFree 18.92 0:LIVING -TCGA-A8-A07I 14 0:DiseaseFree 14 0:LIVING TCGA-A8-A07J 11.99 0:DiseaseFree 11.99 0:LIVING -TCGA-A8-A07L 16.99 0:DiseaseFree 16.99 0:LIVING -TCGA-A8-A07O 9.99 0:DiseaseFree 9.99 0:LIVING TCGA-A8-A07P 10.97 0:DiseaseFree 10.97 0:LIVING -TCGA-A8-A07R 8.97 0:DiseaseFree 8.97 0:LIVING -TCGA-A8-A07S 7.95 0:DiseaseFree 7.95 0:LIVING -TCGA-A8-A07U 9.95 0:DiseaseFree 9.95 0:LIVING -TCGA-A8-A07W 9.99 0:DiseaseFree 9.99 0:LIVING -TCGA-A8-A07Z 28.02 0:DiseaseFree 28.02 0:LIVING -TCGA-A8-A081 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A082 18.04 0:DiseaseFree 18.04 0:LIVING TCGA-A8-A083 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A084 15.05 0:DiseaseFree 15.05 0:LIVING -TCGA-A8-A085 36.93 0:DiseaseFree 36.93 0:LIVING TCGA-A8-A086 13.01 0:DiseaseFree 13.01 0:LIVING TCGA-A8-A08A 0.99 0:DiseaseFree 0.99 0:LIVING -TCGA-A8-A08B 23.06 0:DiseaseFree 23.06 0:LIVING TCGA-A8-A08C 19.94 0:DiseaseFree 19.94 0:LIVING -TCGA-A8-A08F 18.04 0:DiseaseFree 18.04 0:LIVING -TCGA-A8-A08G 19.91 0:DiseaseFree 19.91 0:LIVING -TCGA-A8-A08H 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A08I 11.99 0:DiseaseFree 11.99 0:LIVING -TCGA-A8-A08J 37.03 1:DECEASED -TCGA-A8-A08L 9.99 1:DECEASED TCGA-A8-A08O 30.95 0:DiseaseFree 30.95 0:LIVING -TCGA-A8-A08P 30.95 0:DiseaseFree 30.95 0:LIVING -TCGA-A8-A08R 0.99 0:DiseaseFree 0.99 0:LIVING -TCGA-A8-A08S 19.05 0:DiseaseFree 19.05 0:LIVING TCGA-A8-A08T 92.97 0:DiseaseFree 92.97 0:LIVING -TCGA-A8-A08X 33.97 0:DiseaseFree 33.97 0:LIVING TCGA-A8-A08Z 39.98 0:DiseaseFree 39.98 0:LIVING TCGA-A8-A090 0 0:DiseaseFree 0 0:LIVING TCGA-A8-A091 19.05 0:DiseaseFree 19.05 0:LIVING -TCGA-A8-A092 17.02 0:DiseaseFree 17.02 0:LIVING TCGA-A8-A093 17.91 0:DiseaseFree 17.91 0:LIVING -TCGA-A8-A094 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A095 41.92 0:DiseaseFree 41.92 0:LIVING -TCGA-A8-A096 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A097 11.99 0:DiseaseFree 11.99 0:LIVING TCGA-A8-A099 9.99 0:DiseaseFree 9.99 0:LIVING TCGA-A8-A09A 9.99 0:DiseaseFree 9.99 0:LIVING TCGA-A8-A09B 11.99 0:DiseaseFree 11.99 0:LIVING -TCGA-A8-A09C 1.02 0:DiseaseFree 1.02 0:LIVING -TCGA-A8-A09D 13.01 0:DiseaseFree 13.01 0:LIVING -TCGA-A8-A09E 30.95 0:DiseaseFree 30.95 0:LIVING -TCGA-A8-A09G 0 0:DiseaseFree 0 0:LIVING -TCGA-A8-A09I 33.05 0:DiseaseFree 33.05 0:LIVING -TCGA-A8-A09K 29.93 0:DiseaseFree 29.93 0:LIVING -TCGA-A8-A09M 15.01 0:DiseaseFree 15.01 0:LIVING -TCGA-A8-A09N 1.02 0:DiseaseFree 1.02 0:LIVING -TCGA-A8-A09Q 25 0:DiseaseFree 25 0:LIVING -TCGA-A8-A09R 8.97 0:DiseaseFree 8.97 0:LIVING TCGA-A8-A09T 18.99 0:DiseaseFree 18.99 0:LIVING TCGA-A8-A09V 15.01 0:DiseaseFree 15.01 0:LIVING -TCGA-A8-A09W 0.99 0:DiseaseFree 0.99 0:LIVING -TCGA-A8-A09X 14 1:DECEASED -TCGA-A8-A09Z 0 0:DiseaseFree 0 0:LIVING TCGA-A8-A0A1 11.99 0:DiseaseFree 11.99 0:LIVING TCGA-A8-A0A2 18.99 0:DiseaseFree 18.99 0:LIVING TCGA-A8-A0A4 13.01 0:DiseaseFree 13.01 0:LIVING TCGA-A8-A0A6 21.03 0:DiseaseFree 21.03 0:LIVING -TCGA-A8-A0A7 0.99 0:DiseaseFree 0.99 0:LIVING -TCGA-A8-A0A9 13.01 0:DiseaseFree 13.01 0:LIVING -TCGA-A8-A0AB 16.99 0:DiseaseFree 16.99 0:LIVING TCGA-A8-A0AD 38.01 0:DiseaseFree 38.01 0:LIVING TCGA-AN-A03X 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A03Y 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A041 0.23 0:DiseaseFree 0.23 0:LIVING TCGA-AN-A046 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A049 0.62 0:DiseaseFree 0.62 0:LIVING -TCGA-AN-A04A 2.92 0:DiseaseFree 2.92 0:LIVING -TCGA-AN-A04C 1.77 0:DiseaseFree 1.77 0:LIVING -TCGA-AN-A04D 1.71 0:DiseaseFree 1.71 0:LIVING -TCGA-AN-A0AJ 7.98 0:DiseaseFree 7.98 0:LIVING -TCGA-AN-A0AK 7.33 0:DiseaseFree 7.33 0:LIVING -TCGA-AN-A0AL 6.47 0:DiseaseFree 6.47 0:LIVING -TCGA-AN-A0AM 0.16 0:DiseaseFree 0.16 0:LIVING -TCGA-AN-A0AR 0.3 0:DiseaseFree 0.3 0:LIVING -TCGA-AN-A0AS 0.3 0:DiseaseFree 0.3 0:LIVING -TCGA-AN-A0AT 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0FD 6.41 0:DiseaseFree 6.41 0:LIVING -TCGA-AN-A0FF 4.6 0:DiseaseFree 4.6 0:LIVING -TCGA-AN-A0FJ 7.92 0:DiseaseFree 7.92 0:LIVING -TCGA-AN-A0FK 6.96 0:DiseaseFree 6.96 0:LIVING -TCGA-AN-A0FL 7.56 0:DiseaseFree 7.56 0:LIVING -TCGA-AN-A0FN 7.16 0:DiseaseFree 7.16 0:LIVING -TCGA-AN-A0FS 6.27 0:DiseaseFree 6.27 0:LIVING -TCGA-AN-A0FT 6.01 0:DiseaseFree 6.01 0:LIVING -TCGA-AN-A0FV 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0FW 0.36 0:DiseaseFree 0.36 0:LIVING -TCGA-AN-A0FX 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0FY 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0FZ 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0G0 0.53 0:DiseaseFree 0.53 0:LIVING -TCGA-AN-A0XL 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XN 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XO 12.32 0:DiseaseFree 12.32 0:LIVING -TCGA-AN-A0XP 0.3 0:DiseaseFree 0.3 0:LIVING -TCGA-AN-A0XR 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XS 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XT 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XU 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-AN-A0XV 5.32 0:DiseaseFree 5.32 0:LIVING -TCGA-AN-A0XW 5.59 0:DiseaseFree 5.59 0:LIVING -TCGA-AO-A03L 80.23 0:DiseaseFree 80.23 0:LIVING -TCGA-AO-A03M 47.8 0:DiseaseFree 47.8 0:LIVING -TCGA-AO-A03N 1:Recurred/Progressed 54.04 0:LIVING -TCGA-AO-A03O 32.62 0:DiseaseFree 81.57 1:DECEASED -TCGA-AO-A03P 1:Recurred/Progressed 84.63 0:LIVING -TCGA-AO-A03R 56.08 0:DiseaseFree 56.08 0:LIVING -TCGA-AO-A03T 39 0:DiseaseFree 39 0:LIVING -TCGA-AO-A03U 56.74 0:DiseaseFree 59 1:DECEASED -TCGA-AO-A03V 29.11 0:DiseaseFree 29.11 0:LIVING -TCGA-AO-A0J2 19.22 0:DiseaseFree 19.22 0:LIVING -TCGA-AO-A0J3 9.92 0:DiseaseFree 9.92 0:LIVING -TCGA-AO-A0J4 9.66 0:DiseaseFree 9.66 0:LIVING -TCGA-AO-A0J5 1:Recurred/Progressed 24.15 0:LIVING -TCGA-AO-A0J6 25.46 0:DiseaseFree 25.46 0:LIVING -TCGA-AO-A0J7 8.54 0:DiseaseFree 8.54 0:LIVING -TCGA-AO-A0J8 9.1 0:DiseaseFree 9.1 0:LIVING -TCGA-AO-A0J9 1:Recurred/Progressed 41.23 0:LIVING -TCGA-AO-A0JA 1:Recurred/Progressed 11.37 0:LIVING -TCGA-AO-A0JB 37.78 0:DiseaseFree 37.78 0:LIVING -TCGA-AO-A0JC 50.82 0:DiseaseFree 50.82 0:LIVING -TCGA-AO-A0JD 59.56 0:DiseaseFree 59.56 0:LIVING -TCGA-AO-A0JE 64.56 0:DiseaseFree 64.56 0:LIVING -TCGA-AO-A0JF 11.63 0:DiseaseFree 11.63 0:LIVING -TCGA-AO-A0JG 14.75 0:DiseaseFree 14.75 0:LIVING -TCGA-AO-A0JI 38.5 0:DiseaseFree 38.5 0:LIVING -TCGA-AO-A0JJ 49.67 0:DiseaseFree 49.67 0:LIVING -TCGA-AO-A0JL 43.33 0:DiseaseFree 43.33 0:LIVING -TCGA-AO-A0JM 59.99 0:DiseaseFree 59.99 0:LIVING -TCGA-AO-A124 102.47 0:DiseaseFree 102.47 0:LIVING -TCGA-AO-A125 99.15 0:DiseaseFree 99.15 0:LIVING -TCGA-AO-A126 93.63 0:DiseaseFree 93.63 0:LIVING -TCGA-AO-A128 94.52 0:DiseaseFree 94.52 0:LIVING -TCGA-AO-A129 96.03 0:DiseaseFree 96.03 0:LIVING -TCGA-AO-A12A 90.48 0:DiseaseFree 90.48 0:LIVING -TCGA-AO-A12B 77.5 0:DiseaseFree 77.5 0:LIVING -TCGA-AO-A12C 65.48 0:DiseaseFree 65.48 0:LIVING -TCGA-AO-A12D 64 0:DiseaseFree 64 0:LIVING -TCGA-AO-A12E 57.23 0:DiseaseFree 57.23 0:LIVING -TCGA-AO-A12F 48.33 0:DiseaseFree 48.33 0:LIVING -TCGA-AO-A12G 41.56 0:DiseaseFree 41.56 0:LIVING -TCGA-AO-A12H 28.32 0:DiseaseFree 28.32 0:LIVING -TCGA-AO-A1KO 14.72 0:DiseaseFree 14.72 0:LIVING -TCGA-AO-A1KP 82.56 0:DiseaseFree 82.56 0:LIVING -TCGA-AO-A1KQ 49.9 0:DiseaseFree 49.9 0:LIVING -TCGA-AO-A1KR 70.31 0:DiseaseFree 70.31 0:LIVING -TCGA-AO-A1KS 0.53 0:DiseaseFree 0.53 0:LIVING -TCGA-AO-A1KT 17.77 0:DiseaseFree 17.77 0:LIVING -TCGA-AQ-A04H 14.42 0:DiseaseFree 14.42 0:LIVING -TCGA-AQ-A04J 5.22 0:DiseaseFree 5.22 0:LIVING -TCGA-AQ-A04L 109.86 0:DiseaseFree 109.86 0:LIVING -TCGA-AQ-A0Y5 0:DiseaseFree 5.29 1:DECEASED -TCGA-AQ-A1H2 6.47 0:DiseaseFree 6.47 0:LIVING -TCGA-AQ-A1H3 4.53 0:DiseaseFree 4.53 0:LIVING -TCGA-AR-A0TP 78.59 0:DiseaseFree 78.59 0:LIVING -TCGA-AR-A0TQ 49.28 0:DiseaseFree 49.28 0:LIVING -TCGA-AR-A0TR 5.26 1:DECEASED -TCGA-AR-A0TS 37.39 0:DiseaseFree 37.39 0:LIVING -TCGA-AR-A0TT 55.16 0:DiseaseFree 55.16 0:LIVING -TCGA-AR-A0TU 11.83 0:DiseaseFree 11.83 0:LIVING -TCGA-AR-A0TV 29.7 0:DiseaseFree 29.7 0:LIVING -TCGA-AR-A0TW 24.28 0:DiseaseFree 24.28 0:LIVING -TCGA-AR-A0TX 0.49 0:DiseaseFree 0.49 0:LIVING -TCGA-AR-A0TY 55.82 1:DECEASED -TCGA-AR-A0TZ 43.14 0:DiseaseFree 43.14 0:LIVING -TCGA-AR-A0U0 0.26 0:DiseaseFree 0.26 0:LIVING -TCGA-AR-A0U1 6.08 0:DiseaseFree 6.08 0:LIVING -TCGA-AR-A0U2 1:Recurred/Progressed 83.81 1:DECEASED -TCGA-AR-A0U3 74.35 0:DiseaseFree 74.35 0:LIVING -TCGA-AR-A0U4 53.45 0:DiseaseFree 53.45 0:LIVING -TCGA-AR-A1AH 75.5 0:DiseaseFree 75.5 0:LIVING -TCGA-AR-A1AI 61.8 0:DiseaseFree 61.8 0:LIVING -TCGA-AR-A1AJ 52.7 0:DiseaseFree 52.7 0:LIVING -TCGA-AR-A1AK 51.19 0:DiseaseFree 51.19 0:LIVING -TCGA-AR-A1AL 48.79 0:DiseaseFree 48.79 0:LIVING -TCGA-AR-A1AN 43.66 0:DiseaseFree 43.66 0:LIVING -TCGA-AR-A1AO 43.5 0:DiseaseFree 43.5 0:LIVING -TCGA-AR-A1AP 39.92 0:DiseaseFree 39.92 0:LIVING -TCGA-AR-A1AQ 43.01 0:DiseaseFree 43.01 0:LIVING -TCGA-AR-A1AR 17.18 1:DECEASED -TCGA-AR-A1AS 40.8 0:DiseaseFree 40.8 0:LIVING -TCGA-AR-A1AT 41.79 1:DECEASED -TCGA-AR-A1AU 46.29 0:DiseaseFree 46.29 0:LIVING -TCGA-AR-A1AV 42.55 0:DiseaseFree 42.55 0:LIVING -TCGA-AR-A1AW 35.22 0:DiseaseFree 35.22 0:LIVING -TCGA-AR-A1AX 36.24 0:DiseaseFree 36.24 0:LIVING -TCGA-AR-A1AY 20.17 0:DiseaseFree 20.17 0:LIVING -TCGA-AR-A24H 109.5 0:DiseaseFree 109.5 0:LIVING -TCGA-AR-A24K 50.86 0:DiseaseFree 50.86 0:LIVING -TCGA-AR-A24L 72.97 0:DiseaseFree 72.97 0:LIVING -TCGA-AR-A24M 65.38 0:DiseaseFree 65.38 0:LIVING -TCGA-AR-A24N 68.14 0:DiseaseFree 68.14 0:LIVING -TCGA-AR-A24O 65.61 0:DiseaseFree 65.61 0:LIVING -TCGA-AR-A24P 0.85 0:DiseaseFree 0.85 0:LIVING -TCGA-AR-A24Q 65.97 0:DiseaseFree 65.97 0:LIVING -TCGA-AR-A24R 57.33 0:DiseaseFree 57.33 0:LIVING -TCGA-AR-A24S 62.03 0:DiseaseFree 62.03 0:LIVING -TCGA-AR-A24T 53.22 0:DiseaseFree 53.22 0:LIVING -TCGA-AR-A24U 53.32 0:DiseaseFree 53.32 0:LIVING -TCGA-AR-A24V 54.14 0:DiseaseFree 54.14 0:LIVING -TCGA-AR-A24W -TCGA-AR-A24X 48.13 0:DiseaseFree 48.13 0:LIVING -TCGA-AR-A24Z 51.71 0:DiseaseFree 51.71 0:LIVING -TCGA-AR-A250 56.08 0:DiseaseFree 56.08 0:LIVING -TCGA-AR-A251 45.11 0:DiseaseFree 45.11 0:LIVING -TCGA-AR-A252 40.61 0:DiseaseFree 40.61 0:LIVING -TCGA-AR-A254 39.82 0:DiseaseFree 39.82 0:LIVING -TCGA-AR-A255 34.76 0:DiseaseFree 34.76 0:LIVING -TCGA-AR-A256 93.76 1:DECEASED -TCGA-B6-A0I2 125.7 0:DiseaseFree 125.7 0:LIVING -TCGA-B6-A0I5 149.45 0:DiseaseFree 149.45 0:LIVING -TCGA-B6-A0I6 1:Recurred/Progressed 32.56 1:DECEASED -TCGA-B6-A0I8 1:Recurred/Progressed 24.61 1:DECEASED -TCGA-B6-A0I9 1:Recurred/Progressed 12.12 1:DECEASED -TCGA-B6-A0IA 220.71 0:DiseaseFree 220.71 0:LIVING -TCGA-B6-A0IB 1:Recurred/Progressed 129.48 1:DECEASED -TCGA-B6-A0IC 50.66 1:DECEASED -TCGA-B6-A0IE 1:Recurred/Progressed 65.64 1:DECEASED -TCGA-B6-A0IG 1:Recurred/Progressed 146.39 1:DECEASED -TCGA-B6-A0IH 112.29 1:DECEASED -TCGA-B6-A0IJ 176.85 0:DiseaseFree 176.85 0:LIVING -TCGA-B6-A0IK 1:Recurred/Progressed 18.76 1:DECEASED -TCGA-B6-A0IM 126.03 0:DiseaseFree 126.03 0:LIVING -TCGA-B6-A0IN 1:Recurred/Progressed 84.53 1:DECEASED -TCGA-B6-A0IO 110.06 0:DiseaseFree 110.06 0:LIVING -TCGA-B6-A0IP 110.85 0:DiseaseFree 110.85 0:LIVING -TCGA-B6-A0IQ 127.18 0:DiseaseFree 127.18 0:LIVING -TCGA-B6-A0RE 211.38 0:DiseaseFree 211.38 0:LIVING -TCGA-B6-A0RG 68.4 0:DiseaseFree 68.4 0:LIVING -TCGA-B6-A0RH 188.84 0:DiseaseFree 188.84 0:LIVING -TCGA-B6-A0RI 1:Recurred/Progressed 223.24 0:LIVING -TCGA-B6-A0RL 81.11 0:DiseaseFree 81.11 1:DECEASED -TCGA-B6-A0RM 77.96 0:DiseaseFree 77.96 1:DECEASED -TCGA-B6-A0RN 172.84 0:DiseaseFree 172.84 0:LIVING -TCGA-B6-A0RO 161.9 0:DiseaseFree 161.9 0:LIVING -TCGA-B6-A0RP 102.7 1:DECEASED -TCGA-B6-A0RQ 0:DiseaseFree 140.38 1:DECEASED -TCGA-B6-A0RS 1:Recurred/Progressed 100.6 1:DECEASED -TCGA-B6-A0RT 89.39 0:DiseaseFree 89.39 0:LIVING -TCGA-B6-A0RU 131.12 0:DiseaseFree 131.12 0:LIVING -TCGA-B6-A0RV 157.3 0:DiseaseFree 157.3 0:LIVING -TCGA-B6-A0WS 0:DiseaseFree 97.41 1:DECEASED -TCGA-B6-A0WT 177.28 0:DiseaseFree 177.28 0:LIVING -TCGA-B6-A0WV 79.57 0:DiseaseFree 79.57 1:DECEASED -TCGA-B6-A0WW 1:Recurred/Progressed 18.3 1:DECEASED -TCGA-B6-A0WX 1:Recurred/Progressed 21.45 1:DECEASED -TCGA-B6-A0WY 1:Recurred/Progressed 113.67 1:DECEASED -TCGA-B6-A0WZ 129.48 0:DiseaseFree 129.48 0:LIVING -TCGA-B6-A0X0 129.61 1:DECEASED -TCGA-B6-A0X1 186.31 0:DiseaseFree 186.31 0:LIVING -TCGA-B6-A0X4 1:Recurred/Progressed 28.22 1:DECEASED -TCGA-B6-A0X5 1:Recurred/Progressed 68.89 1:DECEASED -TCGA-B6-A0X7 58.84 1:DECEASED -TCGA-B6-A1KC 43.56 0:DiseaseFree 43.56 0:LIVING -TCGA-B6-A1KF 101.45 0:DiseaseFree 101.45 0:LIVING -TCGA-B6-A1KI 48.06 0:DiseaseFree 48.06 0:LIVING -TCGA-B6-A1KN 109.4 0:DiseaseFree 109.4 0:LIVING -TCGA-BH-A0AU 24.51 0:DiseaseFree 24.51 0:LIVING -TCGA-BH-A0AV 38.77 0:DiseaseFree 38.77 0:LIVING -TCGA-BH-A0AW 20.43 0:DiseaseFree 20.43 0:LIVING -TCGA-BH-A0AY 25.53 0:DiseaseFree 25.53 0:LIVING +TCGA-AN-A04A 2.92 0:DiseaseFree 2.92 0:LIVING +TCGA-AN-A0FD 6.41 0:DiseaseFree 6.41 0:LIVING +TCGA-AN-A0FN 7.16 0:DiseaseFree 7.16 0:LIVING +TCGA-AN-A0FS 6.27 0:DiseaseFree 6.27 0:LIVING +TCGA-AN-A0FT 6.01 0:DiseaseFree 6.01 0:LIVING +TCGA-AN-A0FW 0.36 0:DiseaseFree 0.36 0:LIVING +TCGA-AN-A0FZ 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XL 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XN 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XO 12.32 0:DiseaseFree 12.32 0:LIVING +TCGA-AN-A0XP 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0XS 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XT 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XV 5.32 0:DiseaseFree 5.32 0:LIVING +TCGA-AR-A0TW 24.28 0:DiseaseFree 24.28 0:LIVING +TCGA-AR-A1AK 51.19 0:DiseaseFree 51.19 0:LIVING +TCGA-AR-A1AL 48.79 0:DiseaseFree 48.79 0:LIVING +TCGA-AR-A1AN 43.66 0:DiseaseFree 43.66 0:LIVING +TCGA-AR-A1AP 39.92 0:DiseaseFree 39.92 0:LIVING +TCGA-AR-A1AS 40.8 0:DiseaseFree 40.8 0:LIVING +TCGA-AR-A1AU 46.29 0:DiseaseFree 46.29 0:LIVING +TCGA-AR-A1AW 35.22 0:DiseaseFree 35.22 0:LIVING +TCGA-AR-A1AX 36.24 0:DiseaseFree 36.24 0:LIVING TCGA-BH-A0AZ 28.48 0:DiseaseFree 28.48 0:LIVING TCGA-BH-A0B0 46.88 0:DiseaseFree 46.88 0:LIVING -TCGA-BH-A0B1 37.72 0:DiseaseFree 37.72 0:LIVING -TCGA-BH-A0B2 40.8 0:DiseaseFree 40.8 0:LIVING -TCGA-BH-A0B3 39.52 0:DiseaseFree 39.52 0:LIVING -TCGA-BH-A0B4 39.13 0:DiseaseFree 39.13 0:LIVING -TCGA-BH-A0B5 48.33 0:DiseaseFree 48.33 0:LIVING -TCGA-BH-A0B7 56.93 0:DiseaseFree 56.93 0:LIVING -TCGA-BH-A0B8 51.55 0:DiseaseFree 51.55 0:LIVING -TCGA-BH-A0B9 51.65 0:DiseaseFree 51.65 0:LIVING -TCGA-BH-A0BA 37.19 0:DiseaseFree 37.19 0:LIVING -TCGA-BH-A0BC 32 0:DiseaseFree 32 0:LIVING -TCGA-BH-A0BD 18.2 0:DiseaseFree 18.2 0:LIVING -TCGA-BH-A0BF 25.66 0:DiseaseFree 25.66 0:LIVING -TCGA-BH-A0BG 24.84 0:DiseaseFree 24.84 0:LIVING -TCGA-BH-A0BJ 21.68 0:DiseaseFree 21.68 0:LIVING -TCGA-BH-A0BL 43.99 0:DiseaseFree 43.99 0:LIVING TCGA-BH-A0BM 36.7 0:DiseaseFree 36.7 0:LIVING TCGA-BH-A0BO 35.65 0:DiseaseFree 35.65 0:LIVING TCGA-BH-A0BP 48.66 0:DiseaseFree 48.66 0:LIVING @@ -423,146 +343,303 @@ TCGA-BH-A0BQ 27.14 0:DiseaseFree 27.14 0:LIVING TCGA-BH-A0BR 53.62 0:DiseaseFree 53.62 0:LIVING TCGA-BH-A0BS 53.88 0:DiseaseFree 53.88 0:LIVING TCGA-BH-A0BT 45.53 0:DiseaseFree 45.53 0:LIVING -TCGA-BH-A0BV 49.9 0:DiseaseFree 49.9 0:LIVING -TCGA-BH-A0BW 11.66 0:DiseaseFree 11.66 0:LIVING -TCGA-BH-A0BZ 49.02 0:DiseaseFree 49.02 0:LIVING -TCGA-BH-A0C0 41.72 0:DiseaseFree 41.72 0:LIVING TCGA-BH-A0C1 43.96 0:DiseaseFree 43.96 0:LIVING -TCGA-BH-A0C3 48.1 0:DiseaseFree 48.1 0:LIVING -TCGA-BH-A0C7 42.87 0:DiseaseFree 42.87 0:LIVING -TCGA-BH-A0DD 45.76 0:DiseaseFree 45.76 0:LIVING TCGA-BH-A0DE 31.14 0:DiseaseFree 31.14 0:LIVING TCGA-BH-A0DG 23.42 0:DiseaseFree 23.42 0:LIVING -TCGA-BH-A0DH 37.98 0:DiseaseFree 37.98 0:LIVING TCGA-BH-A0DI 22.11 0:DiseaseFree 22.11 0:LIVING -TCGA-BH-A0DK 13.9 0:DiseaseFree 13.9 0:LIVING -TCGA-BH-A0DL 48.2 0:DiseaseFree 48.2 0:LIVING TCGA-BH-A0DO 17.25 0:DiseaseFree 17.25 0:LIVING -TCGA-BH-A0DP 15.64 0:DiseaseFree 15.64 0:LIVING -TCGA-BH-A0DQ 3.22 0:DiseaseFree 3.22 0:LIVING -TCGA-BH-A0DS 2.53 0:DiseaseFree 2.53 0:LIVING TCGA-BH-A0DT 38.44 0:DiseaseFree 38.44 0:LIVING -TCGA-BH-A0DV 45.14 0:DiseaseFree 45.14 0:LIVING TCGA-BH-A0DX 47.37 0:DiseaseFree 47.37 0:LIVING -TCGA-BH-A0DZ 16.26 0:DiseaseFree 16.26 0:LIVING -TCGA-BH-A0E0 4.37 0:DiseaseFree 4.37 0:LIVING -TCGA-BH-A0E1 15.67 0:DiseaseFree 15.67 0:LIVING -TCGA-BH-A0E2 12.35 0:DiseaseFree 12.35 0:LIVING -TCGA-BH-A0E6 9.59 0:DiseaseFree 9.59 0:LIVING -TCGA-BH-A0E7 44.75 0:DiseaseFree 44.75 0:LIVING TCGA-BH-A0E9 46.16 0:DiseaseFree 46.16 0:LIVING -TCGA-BH-A0EA 27.3 0:DiseaseFree 32.62 1:DECEASED -TCGA-BH-A0EB 24.48 0:DiseaseFree 24.48 0:LIVING -TCGA-BH-A0EE 30.98 0:DiseaseFree 30.98 0:LIVING TCGA-BH-A0EI 24.41 0:DiseaseFree 24.41 0:LIVING -TCGA-BH-A0GY 30.13 0:DiseaseFree 30.13 0:LIVING -TCGA-BH-A0GZ 10.78 0:DiseaseFree 10.78 0:LIVING -TCGA-BH-A0H0 15.15 0:DiseaseFree 15.15 0:LIVING TCGA-BH-A0H3 37.75 0:DiseaseFree 37.75 0:LIVING TCGA-BH-A0H5 35.48 0:DiseaseFree 35.48 0:LIVING -TCGA-BH-A0H6 24.54 0:DiseaseFree 24.54 0:LIVING -TCGA-BH-A0H7 23.03 0:DiseaseFree 23.03 0:LIVING -TCGA-BH-A0H9 40.97 0:DiseaseFree 40.97 0:LIVING TCGA-BH-A0HA 28.12 0:DiseaseFree 28.12 0:LIVING -TCGA-BH-A0HB 26.48 0:DiseaseFree 26.48 0:LIVING -TCGA-BH-A0HF 23.88 0:DiseaseFree 23.88 0:LIVING -TCGA-BH-A0HI 20.34 0:DiseaseFree 20.34 0:LIVING -TCGA-BH-A0HK 5.85 0:DiseaseFree 5.85 0:LIVING -TCGA-BH-A0HL 2.37 0:DiseaseFree 2.37 0:LIVING -TCGA-BH-A0HN 16.95 0:DiseaseFree 16.95 0:LIVING -TCGA-BH-A0HO 2.5 0:DiseaseFree 2.5 0:LIVING -TCGA-BH-A0HP 13.6 0:DiseaseFree 13.6 0:LIVING -TCGA-BH-A0HQ 36.83 0:DiseaseFree 36.83 0:LIVING -TCGA-BH-A0HU 12.88 0:DiseaseFree 12.88 0:LIVING -TCGA-BH-A0HW 51.25 0:DiseaseFree 51.25 0:LIVING -TCGA-BH-A0HX 27.24 0:DiseaseFree 27.24 0:LIVING -TCGA-BH-A0HY 28.48 0:DiseaseFree 28.48 0:LIVING -TCGA-BH-A0RX 5.59 0:DiseaseFree 5.59 0:LIVING -TCGA-BH-A0W3 5.91 0:DiseaseFree 5.91 0:LIVING TCGA-BH-A0W4 5.75 0:DiseaseFree 5.75 0:LIVING TCGA-BH-A0W5 17.84 0:DiseaseFree 17.84 0:LIVING TCGA-BH-A0W7 18.33 0:DiseaseFree 18.33 0:LIVING -TCGA-BH-A0WA 12.22 0:DiseaseFree 12.22 0:LIVING -TCGA-BH-A18F 8.8 0:DiseaseFree 8.8 0:LIVING -TCGA-BH-A18G 2 0:DiseaseFree 2 0:LIVING TCGA-BH-A18H 0 0:DiseaseFree 0 0:LIVING TCGA-BH-A18I 7.23 0:DiseaseFree 7.23 0:LIVING +TCGA-C8-A12N 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12O 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12Y 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A132 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A133 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HI 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-D8-A141 3.71 0:DiseaseFree 3.71 0:LIVING +TCGA-E2-A14Q 32 0:DiseaseFree 32 0:LIVING +TCGA-E2-A14T 29.24 0:DiseaseFree 29.24 0:LIVING +TCGA-E2-A14Z 1:Recurred/Progressed 17.02 0:LIVING +TCGA-E2-A153 19.25 0:DiseaseFree 19.25 0:LIVING +TCGA-E2-A154 10.68 0:DiseaseFree 10.68 0:LIVING +TCGA-E2-A156 15.8 0:DiseaseFree 15.8 0:LIVING +TCGA-E2-A15C 16.3 0:DiseaseFree 16.3 0:LIVING +TCGA-E2-A15D 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15E 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-E2-A15F 15.38 0:DiseaseFree 15.38 0:LIVING +TCGA-E2-A15G 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15H 1.38 0:DiseaseFree 1.38 0:LIVING +TCGA-E2-A15I 13.5 0:DiseaseFree 13.5 0:LIVING +TCGA-E2-A15J 15.21 0:DiseaseFree 15.21 0:LIVING +TCGA-E2-A15O 12.98 0:DiseaseFree 12.98 0:LIVING +TCGA-E2-A15P 10.35 0:DiseaseFree 10.35 0:LIVING +TCGA-E2-A15R 10.84 0:DiseaseFree 10.84 0:LIVING +TCGA-E2-A1B1 44.71 0:DiseaseFree 44.71 0:LIVING +TCGA-E2-A1B4 29.93 0:DiseaseFree 29.93 0:LIVING +TCGA-E2-A1B6 11.1 0:DiseaseFree 11.1 0:LIVING +TCGA-E2-A1BC 9.76 0:DiseaseFree 9.76 0:LIVING +TCGA-E2-A1BD 10.41 0:DiseaseFree 10.41 0:LIVING +TCGA-A2-A0SV 1:Recurred/Progressed 27.1 1:DECEASED +TCGA-AO-A03O 32.62 0:DiseaseFree 81.57 1:DECEASED +TCGA-A2-A0SW 1:Recurred/Progressed 44.81 1:DECEASED +TCGA-B6-A0WW 1:Recurred/Progressed 18.3 1:DECEASED TCGA-BH-A18J 1:Recurred/Progressed 20.07 1:DECEASED -TCGA-BH-A18K 1:Recurred/Progressed 90.74 1:DECEASED TCGA-BH-A18L 26.64 1:DECEASED -TCGA-BH-A18M 72.51 1:DECEASED -TCGA-BH-A18N 37.72 1:DECEASED -TCGA-BH-A18P 1:Recurred/Progressed 30.26 1:DECEASED -TCGA-BH-A18Q 55.59 1:DECEASED -TCGA-BH-A18R 36.11 0:DiseaseFree 37.49 1:DECEASED -TCGA-BH-A18S 66 0:DiseaseFree 66 1:DECEASED -TCGA-BH-A18T 1:Recurred/Progressed 7.36 1:DECEASED +TCGA-A8-A06X 30.98 1:DECEASED +TCGA-B6-A0IC 50.66 1:DECEASED TCGA-BH-A18U 43.27 0:DiseaseFree 51.35 1:DECEASED -TCGA-BH-A18V 51.09 1:DECEASED -TCGA-BH-A1EN 0:DiseaseFree 67.42 1:DECEASED -TCGA-BH-A1EO 0:DiseaseFree 91.92 1:DECEASED -TCGA-BH-A1ES 1:Recurred/Progressed 113.74 1:DECEASED -TCGA-BH-A1ET 0:DiseaseFree 82.79 1:DECEASED -TCGA-BH-A1EU 0:DiseaseFree 42.25 1:DECEASED -TCGA-BH-A1EV 1:Recurred/Progressed 11.99 1:DECEASED TCGA-BH-A1EW 1:Recurred/Progressed 55.65 1:DECEASED -TCGA-BH-A1EX 1:Recurred/Progressed 49.54 1:DECEASED +TCGA-AR-A0TY 55.82 1:DECEASED +TCGA-B6-A0X5 1:Recurred/Progressed 68.89 1:DECEASED +TCGA-B6-A0WV 79.57 0:DiseaseFree 79.57 1:DECEASED +TCGA-B6-A0RL 81.11 0:DiseaseFree 81.11 1:DECEASED +TCGA-AR-A0U2 1:Recurred/Progressed 83.81 1:DECEASED +TCGA-B6-A0IB 1:Recurred/Progressed 129.48 1:DECEASED +TCGA-AO-A0J7 8.54 0:DiseaseFree 8.54 0:LIVING +TCGA-AO-A0J3 9.92 0:DiseaseFree 9.92 0:LIVING +TCGA-D8-A13Y 8.67 0:DiseaseFree 8.67 0:LIVING +TCGA-A7-A13F 6.44 0:DiseaseFree 6.44 0:LIVING +TCGA-BH-A0HU 12.88 0:DiseaseFree 12.88 0:LIVING +TCGA-D8-A140 0.89 0:DiseaseFree 0.89 0:LIVING +TCGA-A7-A0CJ 6.18 0:DiseaseFree 6.18 0:LIVING +TCGA-AQ-A04H 14.42 0:DiseaseFree 14.42 0:LIVING +TCGA-BH-A0H0 15.15 0:DiseaseFree 15.15 0:LIVING +TCGA-BH-A0BD 18.2 0:DiseaseFree 18.2 0:LIVING +TCGA-A2-A0T3 14.98 0:DiseaseFree 14.98 0:LIVING +TCGA-A2-A0T4 12.98 0:DiseaseFree 12.98 0:LIVING +TCGA-A2-A0YH 12.45 0:DiseaseFree 12.45 0:LIVING +TCGA-A2-A0YG 13.27 0:DiseaseFree 13.27 0:LIVING +TCGA-A2-A0EY 15.93 0:DiseaseFree 15.93 0:LIVING +TCGA-A2-A0D4 16.3 0:DiseaseFree 16.3 0:LIVING +TCGA-BH-A0AY 25.53 0:DiseaseFree 25.53 0:LIVING +TCGA-E2-A107 1:Recurred/Progressed 25.07 0:LIVING +TCGA-AO-A0JI 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-E2-A10C 28.02 0:DiseaseFree 28.02 0:LIVING +TCGA-E2-A10A 1:Recurred/Progressed 11.56 0:LIVING +TCGA-BH-A0C0 41.72 0:DiseaseFree 41.72 0:LIVING +TCGA-E2-A109 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-AO-A0JC 50.82 0:DiseaseFree 50.82 0:LIVING +TCGA-BH-A0HW 51.25 0:DiseaseFree 51.25 0:LIVING +TCGA-AO-A0JD 59.56 0:DiseaseFree 59.56 0:LIVING +TCGA-AO-A0JM 59.99 0:DiseaseFree 59.99 0:LIVING +TCGA-A2-A0CW 57.49 0:DiseaseFree 57.49 0:LIVING +TCGA-A2-A0ER 62.49 0:DiseaseFree 62.49 0:LIVING +TCGA-A2-A0CT 62.98 0:DiseaseFree 62.98 0:LIVING +TCGA-AO-A12B 77.5 0:DiseaseFree 77.5 0:LIVING +TCGA-A2-A04R 77.67 0:DiseaseFree 77.67 0:LIVING +TCGA-B6-A0IM 126.03 0:DiseaseFree 126.03 0:LIVING +TCGA-AO-A03P 1:Recurred/Progressed 84.63 0:LIVING +TCGA-A1-A0SM 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-A8-A06N 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A06O 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A06Q 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A06R 17.94 0:DiseaseFree 17.94 0:LIVING +TCGA-A8-A06Z 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A079 9 0:DiseaseFree 9 0:LIVING +TCGA-A8-A07L 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-A8-A07S 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-A8-A07W 9.99 0:DiseaseFree 9.99 0:LIVING +TCGA-A8-A07Z 28.02 0:DiseaseFree 28.02 0:LIVING +TCGA-A8-A082 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-A8-A084 15.05 0:DiseaseFree 15.05 0:LIVING +TCGA-A8-A085 36.93 0:DiseaseFree 36.93 0:LIVING +TCGA-A8-A08F 18.04 0:DiseaseFree 18.04 0:LIVING +TCGA-A8-A08G 19.91 0:DiseaseFree 19.91 0:LIVING +TCGA-A8-A08I 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A08P 30.95 0:DiseaseFree 30.95 0:LIVING +TCGA-A8-A095 41.92 0:DiseaseFree 41.92 0:LIVING +TCGA-A8-A096 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A097 11.99 0:DiseaseFree 11.99 0:LIVING +TCGA-A8-A09C 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A09D 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A09I 33.05 0:DiseaseFree 33.05 0:LIVING +TCGA-A8-A09M 15.01 0:DiseaseFree 15.01 0:LIVING +TCGA-A8-A09N 1.02 0:DiseaseFree 1.02 0:LIVING +TCGA-A8-A09Q 25 0:DiseaseFree 25 0:LIVING +TCGA-A8-A09R 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-A8-A09W 0.99 0:DiseaseFree 0.99 0:LIVING +TCGA-A8-A09Z 0 0:DiseaseFree 0 0:LIVING +TCGA-A8-A0A9 13.01 0:DiseaseFree 13.01 0:LIVING +TCGA-A8-A0AB 16.99 0:DiseaseFree 16.99 0:LIVING +TCGA-AN-A03Y 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A041 0.23 0:DiseaseFree 0.23 0:LIVING +TCGA-AN-A049 0.62 0:DiseaseFree 0.62 0:LIVING +TCGA-AN-A0AJ 7.98 0:DiseaseFree 7.98 0:LIVING +TCGA-AN-A0AK 7.33 0:DiseaseFree 7.33 0:LIVING +TCGA-AN-A0AM 0.16 0:DiseaseFree 0.16 0:LIVING +TCGA-AN-A0AS 0.3 0:DiseaseFree 0.3 0:LIVING +TCGA-AN-A0FF 4.6 0:DiseaseFree 4.6 0:LIVING +TCGA-AN-A0FK 6.96 0:DiseaseFree 6.96 0:LIVING +TCGA-AN-A0FY 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XR 0.33 0:DiseaseFree 0.33 0:LIVING +TCGA-AN-A0XW 5.59 0:DiseaseFree 5.59 0:LIVING +TCGA-AR-A0TQ 49.28 0:DiseaseFree 49.28 0:LIVING +TCGA-AR-A0TT 55.16 0:DiseaseFree 55.16 0:LIVING +TCGA-AR-A0TV 29.7 0:DiseaseFree 29.7 0:LIVING +TCGA-AR-A0TZ 43.14 0:DiseaseFree 43.14 0:LIVING +TCGA-AR-A0U3 74.35 0:DiseaseFree 74.35 0:LIVING +TCGA-AR-A1AV 42.55 0:DiseaseFree 42.55 0:LIVING +TCGA-BH-A0AU 24.51 0:DiseaseFree 24.51 0:LIVING +TCGA-BH-A0B5 48.33 0:DiseaseFree 48.33 0:LIVING +TCGA-BH-A0BF 25.66 0:DiseaseFree 25.66 0:LIVING +TCGA-BH-A0BZ 49.02 0:DiseaseFree 49.02 0:LIVING +TCGA-BH-A0C3 48.1 0:DiseaseFree 48.1 0:LIVING +TCGA-BH-A0C7 42.87 0:DiseaseFree 42.87 0:LIVING +TCGA-BH-A0DD 45.76 0:DiseaseFree 45.76 0:LIVING +TCGA-BH-A0W3 5.91 0:DiseaseFree 5.91 0:LIVING +TCGA-BH-A18F 8.8 0:DiseaseFree 8.8 0:LIVING +TCGA-C8-A12M 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12U 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12W 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A12X 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HG 0 0:DiseaseFree 0 0:LIVING +TCGA-C8-A1HL 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-C8-A1HM 0.2 0:DiseaseFree 0.2 0:LIVING +TCGA-C8-A1HN 0.07 0:DiseaseFree 0.07 0:LIVING +TCGA-E2-A14O 38.5 0:DiseaseFree 38.5 0:LIVING +TCGA-E2-A14S 27.4 0:DiseaseFree 27.4 0:LIVING +TCGA-E2-A14W 27.37 0:DiseaseFree 27.37 0:LIVING +TCGA-E2-A155 18.17 0:DiseaseFree 18.17 0:LIVING +TCGA-E2-A15A 16.49 0:DiseaseFree 16.49 0:LIVING +TCGA-E2-A15K 1.12 0:DiseaseFree 1.12 0:LIVING +TCGA-E2-A15L 10.87 0:DiseaseFree 10.87 0:LIVING +TCGA-E2-A15M 7.69 0:DiseaseFree 7.69 0:LIVING +TCGA-E2-A15S 9 0:DiseaseFree 9 0:LIVING +TCGA-E2-A15T 8.77 0:DiseaseFree 8.77 0:LIVING +TCGA-AO-A03U 56.74 0:DiseaseFree 59 1:DECEASED +TCGA-B6-A0IE 1:Recurred/Progressed 65.64 1:DECEASED +TCGA-A2-A0YK 10.97 0:DiseaseFree 10.97 0:LIVING +TCGA-E2-A108 4.07 0:DiseaseFree 4.07 0:LIVING +TCGA-AO-A0JB 37.78 0:DiseaseFree 37.78 0:LIVING +TCGA-AO-A03R 56.08 0:DiseaseFree 56.08 0:LIVING +TCGA-AO-A03T 39 0:DiseaseFree 39 0:LIVING +TCGA-AR-A1AO 43.5 0:DiseaseFree 43.5 0:LIVING +TCGA-A2-A0YT 21.98 0:DiseaseFree 23.75 1:DECEASED +TCGA-AQ-A0Y5 0:DiseaseFree 5.29 1:DECEASED +TCGA-EW-A1P8 1:Recurred/Progressed 7.85 1:DECEASED +TCGA-E2-A1LK 1:Recurred/Progressed 8.74 1:DECEASED TCGA-BH-A1EY 1:Recurred/Progressed 17.68 1:DECEASED -TCGA-BH-A1F0 1:Recurred/Progressed 25.79 1:DECEASED -TCGA-BH-A1F2 0:DiseaseFree 31.51 1:DECEASED -TCGA-BH-A1F5 0:DiseaseFree 89.1 1:DECEASED -TCGA-BH-A1F6 97.41 1:DECEASED TCGA-BH-A1F8 1:Recurred/Progressed 24.61 1:DECEASED -TCGA-BH-A1FB 1:Recurred/Progressed 120.54 1:DECEASED -TCGA-BH-A1FC 0:DiseaseFree 114.03 1:DECEASED +TCGA-BH-A1F2 0:DiseaseFree 31.51 1:DECEASED TCGA-BH-A1FD 1:Recurred/Progressed 33.12 1:DECEASED -TCGA-BH-A1FE 1:Recurred/Progressed 74.68 1:DECEASED -TCGA-BH-A1FG 122.81 1:DECEASED TCGA-BH-A1FH 1:Recurred/Progressed 36.89 1:DECEASED -TCGA-BH-A1FJ 63.31 1:DECEASED -TCGA-BH-A1FL 1:Recurred/Progressed 54.96 1:DECEASED +TCGA-BH-A203 TCGA-BH-A1FM 45.6 1:DECEASED +TCGA-BH-A1EX 1:Recurred/Progressed 49.54 1:DECEASED +TCGA-BH-A1FL 1:Recurred/Progressed 54.96 1:DECEASED +TCGA-BH-A208 +TCGA-GM-A2D9 1:Recurred/Progressed 59.53 1:DECEASED +TCGA-BH-A1FJ 63.31 1:DECEASED +TCGA-BH-A1EN 0:DiseaseFree 67.42 1:DECEASED TCGA-BH-A1FN 1:Recurred/Progressed 72.01 1:DECEASED -TCGA-BH-A1FR 1:Recurred/Progressed 144.49 1:DECEASED TCGA-BH-A1FU 1:Recurred/Progressed 72.01 1:DECEASED -TCGA-BH-A201 6.87 0:DiseaseFree 6.87 0:LIVING -TCGA-BH-A202 0.72 0:DiseaseFree 0.72 0:LIVING -TCGA-BH-A203 +TCGA-BH-A1FE 1:Recurred/Progressed 74.68 1:DECEASED TCGA-BH-A204 -TCGA-BH-A208 +TCGA-BH-A1F5 0:DiseaseFree 89.1 1:DECEASED +TCGA-AR-A256 93.76 1:DECEASED +TCGA-BH-A1F6 97.41 1:DECEASED +TCGA-BH-A1FC 0:DiseaseFree 114.03 1:DECEASED +TCGA-BH-A1FB 1:Recurred/Progressed 120.54 1:DECEASED +TCGA-BH-A1FG 122.81 1:DECEASED TCGA-BH-A209 +TCGA-BH-A1FR 1:Recurred/Progressed 144.49 1:DECEASED +TCGA-AO-A1KS 0.53 0:DiseaseFree 0.53 0:LIVING +TCGA-A7-A13G 6.83 0:DiseaseFree 6.83 0:LIVING +TCGA-D8-A1JS 3.45 0:DiseaseFree 3.45 0:LIVING +TCGA-A7-A0DC 8.97 0:DiseaseFree 8.97 0:LIVING +TCGA-D8-A1JT 4.04 0:DiseaseFree 4.04 0:LIVING +TCGA-A7-A26E 13.83 0:DiseaseFree 13.83 0:LIVING +TCGA-D8-A1JH 9.33 0:DiseaseFree 9.33 0:LIVING +TCGA-D8-A1JU 3.48 0:DiseaseFree 3.48 0:LIVING +TCGA-AO-A1KO 14.72 0:DiseaseFree 14.72 0:LIVING +TCGA-AO-A1KT 17.77 0:DiseaseFree 17.77 0:LIVING +TCGA-AO-A0J5 1:Recurred/Progressed 24.15 0:LIVING +TCGA-B6-A1KC 43.56 0:DiseaseFree 43.56 0:LIVING +TCGA-AO-A1KQ 49.9 0:DiseaseFree 49.9 0:LIVING +TCGA-B6-A1KI 48.06 0:DiseaseFree 48.06 0:LIVING +TCGA-AO-A1KP 82.56 0:DiseaseFree 82.56 0:LIVING +TCGA-B6-A1KF 101.45 0:DiseaseFree 101.45 0:LIVING +TCGA-B6-A1KN 109.4 0:DiseaseFree 109.4 0:LIVING +TCGA-D8-A1XO 7.95 0:DiseaseFree 7.95 0:LIVING +TCGA-D8-A1XT 6.34 0:DiseaseFree 6.34 0:LIVING +TCGA-A1-A0SP 19.15 0:DiseaseFree 19.15 0:LIVING +TCGA-D8-A1J8 8.41 0:DiseaseFree 8.41 0:LIVING +TCGA-D8-A1JF 3.15 0:DiseaseFree 3.15 0:LIVING +TCGA-D8-A1JG 6.14 0:DiseaseFree 6.14 0:LIVING +TCGA-D8-A1XS 0.59 0:DiseaseFree 0.59 0:LIVING +TCGA-A1-A0SB 8.51 0:DiseaseFree 8.51 0:LIVING +TCGA-A1-A0SF 48.06 0:DiseaseFree 48.06 0:LIVING +TCGA-A1-A0SG 14.23 0:DiseaseFree 14.23 0:LIVING +TCGA-A1-A0SI 20.83 0:DiseaseFree 20.83 0:LIVING +TCGA-A1-A0SN 39.29 0:DiseaseFree 39.29 0:LIVING +TCGA-A1-A0SQ 18.17 0:DiseaseFree 18.17 0:LIVING +TCGA-A2-A1FV 15.11 0:DiseaseFree 15.11 0:LIVING +TCGA-A2-A1FW 7.26 0:DiseaseFree 7.26 0:LIVING +TCGA-A2-A1FX 30.72 0:DiseaseFree 30.72 0:LIVING +TCGA-A2-A1FZ 13.44 0:DiseaseFree 13.44 0:LIVING +TCGA-A2-A1G0 12.48 0:DiseaseFree 12.48 0:LIVING +TCGA-A2-A1G1 12.19 0:DiseaseFree 12.19 0:LIVING +TCGA-A2-A1G4 12.22 0:DiseaseFree 12.22 0:LIVING +TCGA-A2-A1G6 4.34 0:DiseaseFree 4.34 0:LIVING +TCGA-A2-A259 42.22 0:DiseaseFree 42.22 0:LIVING +TCGA-A2-A25A 97.51 0:DiseaseFree 97.51 0:LIVING +TCGA-A2-A25B 8.48 0:DiseaseFree 8.48 0:LIVING +TCGA-A2-A25C 9.36 0:DiseaseFree 9.36 0:LIVING +TCGA-A2-A25D 7.98 0:DiseaseFree 7.98 0:LIVING +TCGA-A2-A25E 82.49 0:DiseaseFree 82.49 0:LIVING +TCGA-A2-A25F 3.71 0:DiseaseFree 3.71 0:LIVING +TCGA-A7-A26F 8.44 0:DiseaseFree 8.44 0:LIVING +TCGA-A7-A26G 6.87 0:DiseaseFree 6.87 0:LIVING +TCGA-A7-A26H 2.1 0:DiseaseFree 2.1 0:LIVING +TCGA-A7-A26I 4.01 0:DiseaseFree 4.01 0:LIVING +TCGA-A7-A26J 1:Recurred/Progressed 2.2 0:LIVING +TCGA-A8-A08S 19.05 0:DiseaseFree 19.05 0:LIVING +TCGA-A8-A09E 30.95 0:DiseaseFree 30.95 0:LIVING +TCGA-A8-A09K 29.93 0:DiseaseFree 29.93 0:LIVING +TEST-A23C 0.95 0:DiseaseFree 0.95 0:LIVING +TEST-A23E 2.37 0:DiseaseFree 2.37 0:LIVING +TEST-A23H 2.66 0:DiseaseFree 2.66 0:LIVING +TCGA-AO-A1KR 70.31 0:DiseaseFree 70.31 0:LIVING +TCGA-AQ-A1H2 6.47 0:DiseaseFree 6.47 0:LIVING +TCGA-AQ-A1H3 4.53 0:DiseaseFree 4.53 0:LIVING +TCGA-AR-A24H 109.5 0:DiseaseFree 109.5 0:LIVING +TCGA-AR-A24K 50.86 0:DiseaseFree 50.86 0:LIVING +TCGA-AR-A24L 72.97 0:DiseaseFree 72.97 0:LIVING +TCGA-AR-A24M 65.38 0:DiseaseFree 65.38 0:LIVING +TCGA-AR-A24N 68.14 0:DiseaseFree 68.14 0:LIVING +TCGA-AR-A24O 65.61 0:DiseaseFree 65.61 0:LIVING +TCGA-AR-A24P 0.85 0:DiseaseFree 0.85 0:LIVING +TCGA-AR-A24Q 65.97 0:DiseaseFree 65.97 0:LIVING +TCGA-AR-A24R 57.33 0:DiseaseFree 57.33 0:LIVING +TCGA-AR-A24S 62.03 0:DiseaseFree 62.03 0:LIVING +TCGA-AR-A24T 53.22 0:DiseaseFree 53.22 0:LIVING +TCGA-AR-A24U 53.32 0:DiseaseFree 53.32 0:LIVING +TCGA-AR-A24V 54.14 0:DiseaseFree 54.14 0:LIVING +TCGA-AR-A24X 48.13 0:DiseaseFree 48.13 0:LIVING +TCGA-AR-A24Z 51.71 0:DiseaseFree 51.71 0:LIVING +TCGA-AR-A250 56.08 0:DiseaseFree 56.08 0:LIVING +TCGA-AR-A251 45.11 0:DiseaseFree 45.11 0:LIVING +TCGA-AR-A252 40.61 0:DiseaseFree 40.61 0:LIVING +TCGA-AR-A254 39.82 0:DiseaseFree 39.82 0:LIVING +TCGA-AR-A255 34.76 0:DiseaseFree 34.76 0:LIVING +TCGA-BH-A0B2 40.8 0:DiseaseFree 40.8 0:LIVING +TCGA-BH-A0DV 45.14 0:DiseaseFree 45.14 0:LIVING +TCGA-BH-A201 6.87 0:DiseaseFree 6.87 0:LIVING +TCGA-BH-A202 0.72 0:DiseaseFree 0.72 0:LIVING TCGA-BH-A28Q -TCGA-C8-A12K 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12L 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12M 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12N 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12O 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12P 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12Q 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12T 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12U 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12V 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12W 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12X 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12Y 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A12Z 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A130 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A131 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A132 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A133 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A134 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A135 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A137 0.1 0:DiseaseFree 0.1 0:LIVING -TCGA-C8-A138 0.23 0:DiseaseFree 0.23 0:LIVING TCGA-C8-A1HE 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A1HF 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A1HG 0 0:DiseaseFree 0 0:LIVING -TCGA-C8-A1HI 0.07 0:DiseaseFree 0.07 0:LIVING TCGA-C8-A1HJ 0.16 0:DiseaseFree 0.16 0:LIVING TCGA-C8-A1HK 0.23 0:DiseaseFree 0.23 0:LIVING -TCGA-C8-A1HL 0.07 0:DiseaseFree 0.07 0:LIVING -TCGA-C8-A1HM 0.2 0:DiseaseFree 0.2 0:LIVING -TCGA-C8-A1HN 0.07 0:DiseaseFree 0.07 0:LIVING TCGA-C8-A1HO 0 0:DiseaseFree 0 0:LIVING TCGA-C8-A26V 0.3 0:DiseaseFree 0.3 0:LIVING TCGA-C8-A26W 0.23 0:DiseaseFree 0.23 0:LIVING @@ -575,25 +652,13 @@ TCGA-C8-A275 0.03 0:DiseaseFree 0.03 0:LIVING TCGA-C8-A278 0.03 0:DiseaseFree 0.03 0:LIVING TCGA-C8-A27A 12.19 0:DiseaseFree 12.19 0:LIVING TCGA-C8-A27B 0.99 0:DiseaseFree 0.99 0:LIVING -TCGA-D8-A13Y 8.67 0:DiseaseFree 8.67 0:LIVING -TCGA-D8-A13Z 6.9 0:DiseaseFree 6.9 0:LIVING -TCGA-D8-A140 0.89 0:DiseaseFree 0.89 0:LIVING -TCGA-D8-A141 3.71 0:DiseaseFree 3.71 0:LIVING -TCGA-D8-A142 2 0:DiseaseFree 2 0:LIVING -TCGA-D8-A143 5.65 0:DiseaseFree 5.65 0:LIVING -TCGA-D8-A145 1.61 0:DiseaseFree 1.61 0:LIVING TCGA-D8-A146 11.3 0:DiseaseFree 11.3 0:LIVING -TCGA-D8-A147 0.07 0:DiseaseFree 0.07 0:LIVING -TCGA-D8-A1J8 8.41 0:DiseaseFree 8.41 0:LIVING TCGA-D8-A1J9 8.15 0:DiseaseFree 8.15 0:LIVING TCGA-D8-A1JA 0.59 0:DiseaseFree 0.59 0:LIVING TCGA-D8-A1JB 0 0:DiseaseFree 0 0:LIVING TCGA-D8-A1JC 5.85 0:DiseaseFree 5.85 0:LIVING TCGA-D8-A1JD 8.97 0:DiseaseFree 8.97 0:LIVING TCGA-D8-A1JE 1.87 0:DiseaseFree 1.87 0:LIVING -TCGA-D8-A1JF 3.15 0:DiseaseFree 3.15 0:LIVING -TCGA-D8-A1JG 6.14 0:DiseaseFree 6.14 0:LIVING -TCGA-D8-A1JH 9.33 0:DiseaseFree 9.33 0:LIVING TCGA-D8-A1JI 0.69 0:DiseaseFree 0.69 0:LIVING TCGA-D8-A1JJ 9 0:DiseaseFree 9 0:LIVING TCGA-D8-A1JK 3.58 0:DiseaseFree 3.58 0:LIVING @@ -601,9 +666,6 @@ TCGA-D8-A1JL 8.71 0:DiseaseFree 8.71 0:LIVING TCGA-D8-A1JM 7.82 0:DiseaseFree 7.82 0:LIVING TCGA-D8-A1JN 7.13 0:DiseaseFree 7.13 0:LIVING TCGA-D8-A1JP 5.49 0:DiseaseFree 5.49 0:LIVING -TCGA-D8-A1JS 3.45 0:DiseaseFree 3.45 0:LIVING -TCGA-D8-A1JT 4.04 0:DiseaseFree 4.04 0:LIVING -TCGA-D8-A1JU 3.48 0:DiseaseFree 3.48 0:LIVING TCGA-D8-A1X5 5.62 0:DiseaseFree 5.62 0:LIVING TCGA-D8-A1X6 7.75 0:DiseaseFree 7.75 0:LIVING TCGA-D8-A1X7 2.79 0:DiseaseFree 2.79 0:LIVING @@ -619,11 +681,8 @@ TCGA-D8-A1XJ 11.56 0:DiseaseFree 11.56 0:LIVING TCGA-D8-A1XK 10.71 0:DiseaseFree 10.71 0:LIVING TCGA-D8-A1XL 10.48 0:DiseaseFree 10.48 0:LIVING TCGA-D8-A1XM 7.16 0:DiseaseFree 7.16 0:LIVING -TCGA-D8-A1XO 7.95 0:DiseaseFree 7.95 0:LIVING TCGA-D8-A1XQ 5.82 0:DiseaseFree 5.82 0:LIVING TCGA-D8-A1XR 5.52 0:DiseaseFree 5.52 0:LIVING -TCGA-D8-A1XS 0.59 0:DiseaseFree 0.59 0:LIVING -TCGA-D8-A1XT 6.34 0:DiseaseFree 6.34 0:LIVING TCGA-D8-A1XU 4.9 0:DiseaseFree 4.9 0:LIVING TCGA-D8-A1XV 4.8 0:DiseaseFree 4.8 0:LIVING TCGA-D8-A1XW 3.84 0:DiseaseFree 3.84 0:LIVING @@ -647,61 +706,6 @@ TCGA-D8-A27R 2.96 0:DiseaseFree 2.96 0:LIVING TCGA-D8-A27T 4.44 0:DiseaseFree 4.44 0:LIVING TCGA-D8-A27V 2.4 0:DiseaseFree 2.4 0:LIVING TCGA-D8-A27W 0.49 0:DiseaseFree 0.49 0:LIVING -TCGA-E2-A105 38.21 0:DiseaseFree 38.21 0:LIVING -TCGA-E2-A106 51.09 0:DiseaseFree 51.09 0:LIVING -TCGA-E2-A107 1:Recurred/Progressed 25.07 0:LIVING -TCGA-E2-A108 4.07 0:DiseaseFree 4.07 0:LIVING -TCGA-E2-A109 38.5 0:DiseaseFree 38.5 0:LIVING -TCGA-E2-A10A 1:Recurred/Progressed 11.56 0:LIVING -TCGA-E2-A10B 24.57 0:DiseaseFree 24.57 0:LIVING -TCGA-E2-A10C 28.02 0:DiseaseFree 28.02 0:LIVING -TCGA-E2-A10E 13.73 0:DiseaseFree 13.73 0:LIVING -TCGA-E2-A10F 11.83 0:DiseaseFree 11.83 0:LIVING -TCGA-E2-A14N 44.35 0:DiseaseFree 44.35 0:LIVING -TCGA-E2-A14O 38.5 0:DiseaseFree 38.5 0:LIVING -TCGA-E2-A14P 16 0:DiseaseFree 16 0:LIVING -TCGA-E2-A14Q 32 0:DiseaseFree 32 0:LIVING -TCGA-E2-A14R 27.76 0:DiseaseFree 27.76 0:LIVING -TCGA-E2-A14S 27.4 0:DiseaseFree 27.4 0:LIVING -TCGA-E2-A14T 29.24 0:DiseaseFree 29.24 0:LIVING -TCGA-E2-A14V 24.57 0:DiseaseFree 24.57 0:LIVING -TCGA-E2-A14W 27.37 0:DiseaseFree 27.37 0:LIVING -TCGA-E2-A14X 22.73 0:DiseaseFree 22.73 0:LIVING -TCGA-E2-A14Y 22.6 0:DiseaseFree 22.6 0:LIVING -TCGA-E2-A14Z 1:Recurred/Progressed 17.02 0:LIVING -TCGA-E2-A150 19.42 0:DiseaseFree 19.42 0:LIVING -TCGA-E2-A152 1:Recurred/Progressed 19.32 0:LIVING -TCGA-E2-A153 19.25 0:DiseaseFree 19.25 0:LIVING -TCGA-E2-A154 10.68 0:DiseaseFree 10.68 0:LIVING -TCGA-E2-A155 18.17 0:DiseaseFree 18.17 0:LIVING -TCGA-E2-A156 15.8 0:DiseaseFree 15.8 0:LIVING -TCGA-E2-A158 14.78 0:DiseaseFree 14.78 0:LIVING -TCGA-E2-A159 16.92 0:DiseaseFree 16.92 0:LIVING -TCGA-E2-A15A 16.49 0:DiseaseFree 16.49 0:LIVING -TCGA-E2-A15C 16.3 0:DiseaseFree 16.3 0:LIVING -TCGA-E2-A15D 10.35 0:DiseaseFree 10.35 0:LIVING -TCGA-E2-A15E 16.99 0:DiseaseFree 16.99 0:LIVING -TCGA-E2-A15F 15.38 0:DiseaseFree 15.38 0:LIVING -TCGA-E2-A15G 10.35 0:DiseaseFree 10.35 0:LIVING -TCGA-E2-A15H 1.38 0:DiseaseFree 1.38 0:LIVING -TCGA-E2-A15I 13.5 0:DiseaseFree 13.5 0:LIVING -TCGA-E2-A15J 15.21 0:DiseaseFree 15.21 0:LIVING -TCGA-E2-A15K 1.12 0:DiseaseFree 1.12 0:LIVING -TCGA-E2-A15L 10.87 0:DiseaseFree 10.87 0:LIVING -TCGA-E2-A15M 7.69 0:DiseaseFree 7.69 0:LIVING -TCGA-E2-A15O 12.98 0:DiseaseFree 12.98 0:LIVING -TCGA-E2-A15P 10.35 0:DiseaseFree 10.35 0:LIVING -TCGA-E2-A15R 10.84 0:DiseaseFree 10.84 0:LIVING -TCGA-E2-A15S 9 0:DiseaseFree 9 0:LIVING -TCGA-E2-A15T 8.77 0:DiseaseFree 8.77 0:LIVING -TCGA-E2-A1AZ 64.52 0:DiseaseFree 64.52 0:LIVING -TCGA-E2-A1B0 41.76 0:DiseaseFree 41.76 0:LIVING -TCGA-E2-A1B1 44.71 0:DiseaseFree 44.71 0:LIVING -TCGA-E2-A1B4 29.93 0:DiseaseFree 29.93 0:LIVING -TCGA-E2-A1B5 25.43 0:DiseaseFree 25.43 0:LIVING -TCGA-E2-A1B6 11.1 0:DiseaseFree 11.1 0:LIVING -TCGA-E2-A1BC 9.76 0:DiseaseFree 9.76 0:LIVING -TCGA-E2-A1BD 10.41 0:DiseaseFree 10.41 0:LIVING TCGA-E2-A1IE 32.29 0:DiseaseFree 32.29 0:LIVING TCGA-E2-A1IF 31.41 0:DiseaseFree 31.41 0:LIVING TCGA-E2-A1IG 24.8 0:DiseaseFree 24.8 0:LIVING @@ -723,7 +727,6 @@ TCGA-E2-A1LB 31.93 0:DiseaseFree 31.93 0:LIVING TCGA-E2-A1LG 11.5 0:DiseaseFree 11.5 0:LIVING TCGA-E2-A1LH 94.45 0:DiseaseFree 94.45 0:LIVING TCGA-E2-A1LI 90.35 0:DiseaseFree 90.35 0:LIVING -TCGA-E2-A1LK 1:Recurred/Progressed 8.74 1:DECEASED TCGA-E2-A1LL 33.31 0:DiseaseFree 33.31 0:LIVING TCGA-E2-A1LS 7.85 0:DiseaseFree 7.85 0:LIVING TCGA-E9-A1N3 0 0:DiseaseFree 0 0:LIVING @@ -774,7 +777,6 @@ TCGA-E9-A247 0.39 0:DiseaseFree 0.39 0:LIVING TCGA-E9-A248 0.69 0:DiseaseFree 0.69 0:LIVING TCGA-E9-A249 0.92 0:DiseaseFree 0.92 0:LIVING TCGA-E9-A24A 0.33 0:DiseaseFree 0.33 0:LIVING -TCGA-E9-A295 TCGA-EW-A1IW 8.28 0:DiseaseFree 8.28 0:LIVING TCGA-EW-A1IX 35.55 0:DiseaseFree 35.55 0:LIVING TCGA-EW-A1IY 8.48 0:DiseaseFree 8.48 0:LIVING @@ -796,7 +798,6 @@ TCGA-EW-A1P4 16.46 0:DiseaseFree 16.46 0:LIVING TCGA-EW-A1P5 11.99 0:DiseaseFree 11.99 0:LIVING TCGA-EW-A1P6 10.25 0:DiseaseFree 10.25 0:LIVING TCGA-EW-A1P7 20.86 0:DiseaseFree 20.86 0:LIVING -TCGA-EW-A1P8 1:Recurred/Progressed 7.85 1:DECEASED TCGA-EW-A1PA 8.77 0:DiseaseFree 8.77 0:LIVING TCGA-EW-A1PB 19.97 0:DiseaseFree 19.97 0:LIVING TCGA-EW-A1PD 5.72 0:DiseaseFree 5.72 0:LIVING @@ -807,8 +808,6 @@ TCGA-EW-A1PH 4.57 0:DiseaseFree 4.57 0:LIVING TCGA-EW-A2FS TCGA-EW-A2FV TCGA-EW-A2FW -TCGA-GI-A2C8 -TCGA-GM-A2D9 1:Recurred/Progressed 59.53 1:DECEASED TCGA-GM-A2DA 1:Recurred/Progressed 194.13 0:LIVING TCGA-GM-A2DB 53.06 0:DiseaseFree 53.06 0:LIVING TCGA-GM-A2DC 53.49 0:DiseaseFree 53.49 0:LIVING @@ -821,13 +820,15 @@ TCGA-GM-A2DL 90.74 0:DiseaseFree 90.74 0:LIVING TCGA-GM-A2DM 76.58 0:DiseaseFree 76.58 0:LIVING TCGA-GM-A2DN 77.27 0:DiseaseFree 77.27 0:LIVING TCGA-GM-A2DO 53.29 0:DiseaseFree 53.29 0:LIVING +TCGA-AR-A24W +TEST-A2B8 +TEST-A2FF +TEST-A2FB +TEST-A2FG +TCGA-GI-A2C8 +TCGA-E9-A295 +TCGA-A2-A0T2 TEST_PATIENT_1 -TEST_PATIENT_10 -TEST_PATIENT_11 -TEST_PATIENT_12 -TEST_PATIENT_13 -TEST_PATIENT_14 -TEST_PATIENT_15 TEST_PATIENT_2 TEST_PATIENT_3 TEST_PATIENT_4 @@ -836,11 +837,10 @@ TEST_PATIENT_6 TEST_PATIENT_7 TEST_PATIENT_8 TEST_PATIENT_9 +TEST_PATIENT_10 +TEST_PATIENT_11 +TEST_PATIENT_12 +TEST_PATIENT_13 +TEST_PATIENT_14 +TEST_PATIENT_15 TEST_PATIENT_NAMESPACE -TEST-A23C 0.95 0:DiseaseFree 0.95 0:LIVING -TEST-A23E 2.37 0:DiseaseFree 2.37 0:LIVING -TEST-A23H 2.66 0:DiseaseFree 2.66 0:LIVING -TEST-A2B8 -TEST-A2FB -TEST-A2FF -TEST-A2FG diff --git a/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt b/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt index 4451faa17f2..6f008b2d973 100644 --- a/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt +++ b/test/test_data/study_es_0_import_export/data_clinical_sample_attributes.txt @@ -3,420 +3,339 @@ #STRING STRING STRING #1 1 1 PATIENT_ID SAMPLE_ID SUBTYPE -TCGA-A1-A0SB TCGA-A1-A0SB-01 -TCGA-A1-A0SB TCGA-A1-A0SB-02 -TCGA-A1-A0SD TCGA-A1-A0SD-01 Luminal A -TCGA-A1-A0SE TCGA-A1-A0SE-01 Luminal A -TCGA-A1-A0SF TCGA-A1-A0SF-01 -TCGA-A1-A0SG TCGA-A1-A0SG-01 -TCGA-A1-A0SH TCGA-A1-A0SH-01 Luminal A -TCGA-A1-A0SI TCGA-A1-A0SI-01 -TCGA-A1-A0SJ TCGA-A1-A0SJ-01 Luminal A -TCGA-A1-A0SK TCGA-A1-A0SK-01 basal-like -TCGA-A1-A0SM TCGA-A1-A0SM-01 Luminal B -TCGA-A1-A0SN TCGA-A1-A0SN-01 -TCGA-A1-A0SO TCGA-A1-A0SO-01 basal-like -TCGA-A1-A0SP TCGA-A1-A0SP-01 -TCGA-A1-A0SQ TCGA-A1-A0SQ-01 -TCGA-A2-A04N TCGA-A2-A04N-01 Luminal A TCGA-A2-A04P TCGA-A2-A04P-01 basal-like -TCGA-A2-A04Q TCGA-A2-A04Q-01 basal-like -TCGA-A2-A04R TCGA-A2-A04R-01 Luminal B -TCGA-A2-A04T TCGA-A2-A04T-01 -TCGA-A2-A04U TCGA-A2-A04U-01 -TCGA-A2-A04V TCGA-A2-A04V-01 Luminal A -TCGA-A2-A04W TCGA-A2-A04W-01 Her2 enriched -TCGA-A2-A04X TCGA-A2-A04X-01 Her2 enriched -TCGA-A2-A04Y TCGA-A2-A04Y-01 Luminal A -TCGA-A2-A0CL TCGA-A2-A0CL-01 Her2 enriched +TCGA-A1-A0SK TCGA-A1-A0SK-01 basal-like TCGA-A2-A0CM TCGA-A2-A0CM-01 basal-like -TCGA-A2-A0CP TCGA-A2-A0CP-01 Luminal A -TCGA-A2-A0CQ TCGA-A2-A0CQ-01 Luminal A -TCGA-A2-A0CS TCGA-A2-A0CS-01 Luminal A -TCGA-A2-A0CT TCGA-A2-A0CT-01 Luminal B -TCGA-A2-A0CU TCGA-A2-A0CU-01 Luminal A -TCGA-A2-A0CV TCGA-A2-A0CV-01 Luminal A -TCGA-A2-A0CW TCGA-A2-A0CW-01 Luminal B -TCGA-A2-A0CX TCGA-A2-A0CX-01 Her2 enriched -TCGA-A2-A0CY TCGA-A2-A0CY-01 Her2 enriched -TCGA-A2-A0CZ TCGA-A2-A0CZ-01 Luminal A +TCGA-AR-A1AR TCGA-AR-A1AR-01 basal-like +TCGA-B6-A0WX TCGA-B6-A0WX-01 basal-like +TCGA-BH-A1F0 TCGA-BH-A1F0-01 basal-like +TCGA-B6-A0I6 TCGA-B6-A0I6-01 +TCGA-BH-A18V TCGA-BH-A18V-01 basal-like +TCGA-BH-A18Q TCGA-BH-A18Q-01 basal-like +TCGA-BH-A18K TCGA-BH-A18K-01 basal-like +TCGA-BH-A0HL TCGA-BH-A0HL-01 +TCGA-BH-A0E0 TCGA-BH-A0E0-01 basal-like +TCGA-BH-A0RX TCGA-BH-A0RX-01 basal-like +TCGA-A7-A13D TCGA-A7-A13D-01 basal-like +TCGA-BH-A0E6 TCGA-BH-A0E6-01 basal-like +TCGA-AO-A0J4 TCGA-AO-A0J4-01 basal-like +TCGA-A7-A0CE TCGA-A7-A0CE-01 basal-like +TCGA-A7-A13E TCGA-A7-A13E-01 +TCGA-A7-A0DA TCGA-A7-A0DA-01 basal-like +TCGA-D8-A142 TCGA-D8-A142-01 basal-like +TCGA-D8-A143 TCGA-D8-A143-01 +TCGA-AQ-A04J TCGA-AQ-A04J-01 basal-like +TCGA-BH-A0HN TCGA-BH-A0HN-01 +TCGA-A2-A0T0 TCGA-A2-A0T0-01 basal-like +TCGA-A2-A0YE TCGA-A2-A0YE-01 +TCGA-A2-A0YJ TCGA-A2-A0YJ-01 TCGA-A2-A0D0 TCGA-A2-A0D0-01 basal-like -TCGA-A2-A0D1 TCGA-A2-A0D1-01 Her2 enriched +TCGA-A2-A04U TCGA-A2-A04U-01 +TCGA-AO-A0J6 TCGA-AO-A0J6-01 basal-like +TCGA-A2-A0YM TCGA-A2-A0YM-01 basal-like TCGA-A2-A0D2 TCGA-A2-A0D2-01 basal-like -TCGA-A2-A0D3 TCGA-A2-A0D3-01 Luminal A -TCGA-A2-A0D4 TCGA-A2-A0D4-01 Luminal B -TCGA-A2-A0EM TCGA-A2-A0EM-01 Luminal A -TCGA-A2-A0EN TCGA-A2-A0EN-01 Luminal A -TCGA-A2-A0EO TCGA-A2-A0EO-01 Luminal A -TCGA-A2-A0EQ TCGA-A2-A0EQ-01 Her2 enriched -TCGA-A2-A0ER TCGA-A2-A0ER-01 Luminal B -TCGA-A2-A0ES TCGA-A2-A0ES-01 Luminal A -TCGA-A2-A0ET TCGA-A2-A0ET-01 Luminal A -TCGA-A2-A0EU TCGA-A2-A0EU-01 Luminal A -TCGA-A2-A0EV TCGA-A2-A0EV-01 Luminal A -TCGA-A2-A0EW TCGA-A2-A0EW-01 Luminal A -TCGA-A2-A0EX TCGA-A2-A0EX-01 Luminal A -TCGA-A2-A0EY TCGA-A2-A0EY-01 Luminal B -TCGA-A2-A0ST TCGA-A2-A0ST-01 basal-like -TCGA-A2-A0SU TCGA-A2-A0SU-01 Luminal A -TCGA-A2-A0SV TCGA-A2-A0SV-01 Luminal B -TCGA-A2-A0SW TCGA-A2-A0SW-01 Luminal B +TCGA-BH-A0B3 TCGA-BH-A0B3-01 basal-like +TCGA-A2-A04Q TCGA-A2-A04Q-01 basal-like TCGA-A2-A0SX TCGA-A2-A0SX-01 basal-like -TCGA-A2-A0SY TCGA-A2-A0SY-01 Luminal A -TCGA-A2-A0T0 TCGA-A2-A0T0-01 basal-like +TCGA-AO-A0JL TCGA-AO-A0JL-01 basal-like +TCGA-AO-A12F TCGA-AO-A12F-01 basal-like +TCGA-BH-A0B9 TCGA-BH-A0B9-01 basal-like +TCGA-A2-A04T TCGA-A2-A04T-01 +TCGA-B6-A0RT TCGA-B6-A0RT-01 basal-like +TCGA-AO-A128 TCGA-AO-A128-01 +TCGA-AO-A129 TCGA-AO-A129-01 basal-like +TCGA-AO-A124 TCGA-AO-A124-01 basal-like +TCGA-B6-A0RU TCGA-B6-A0RU-01 basal-like +TCGA-B6-A0IQ TCGA-B6-A0IQ-01 basal-like +TCGA-B6-A0I2 TCGA-B6-A0I2-01 basal-like +TCGA-B6-A0IJ TCGA-B6-A0IJ-01 basal-like +TCGA-B6-A0X1 TCGA-B6-A0X1-01 +TCGA-B6-A0RE TCGA-B6-A0RE-01 basal-like +TCGA-A2-A0ST TCGA-A2-A0ST-01 basal-like +TCGA-AR-A0TP TCGA-AR-A0TP-01 basal-like +TCGA-A1-A0SO TCGA-A1-A0SO-01 basal-like +TCGA-A8-A07C TCGA-A8-A07C-01 basal-like +TCGA-A8-A07O TCGA-A8-A07O-01 basal-like +TCGA-A8-A07R TCGA-A8-A07R-01 basal-like +TCGA-A8-A07U TCGA-A8-A07U-01 basal-like +TCGA-A8-A08H TCGA-A8-A08H-01 basal-like +TCGA-A8-A08R TCGA-A8-A08R-01 basal-like +TCGA-AN-A04D TCGA-AN-A04D-01 basal-like +TCGA-AN-A0AL TCGA-AN-A0AL-01 basal-like +TCGA-AN-A0AR TCGA-AN-A0AR-01 basal-like +TCGA-AN-A0AT TCGA-AN-A0AT-01 +TCGA-AN-A0FJ TCGA-AN-A0FJ-01 basal-like +TCGA-AN-A0FL TCGA-AN-A0FL-01 basal-like +TCGA-AN-A0FX TCGA-AN-A0FX-01 basal-like +TCGA-AN-A0G0 TCGA-AN-A0G0-01 +TCGA-AN-A0XU TCGA-AN-A0XU-01 basal-like +TCGA-AR-A0TS TCGA-AR-A0TS-01 basal-like +TCGA-AR-A0TU TCGA-AR-A0TU-01 +TCGA-AR-A0U0 TCGA-AR-A0U0-01 +TCGA-AR-A0U1 TCGA-AR-A0U1-01 basal-like +TCGA-AR-A0U4 TCGA-AR-A0U4-01 basal-like +TCGA-AR-A1AH TCGA-AR-A1AH-01 basal-like +TCGA-AR-A1AI TCGA-AR-A1AI-01 basal-like +TCGA-AR-A1AJ TCGA-AR-A1AJ-01 basal-like +TCGA-AR-A1AQ TCGA-AR-A1AQ-01 basal-like +TCGA-AR-A1AY TCGA-AR-A1AY-01 basal-like +TCGA-BH-A0AV TCGA-BH-A0AV-01 basal-like +TCGA-BH-A0BG TCGA-BH-A0BG-01 basal-like +TCGA-BH-A0BL TCGA-BH-A0BL-01 basal-like +TCGA-BH-A0BW TCGA-BH-A0BW-01 basal-like +TCGA-BH-A0DL TCGA-BH-A0DL-01 basal-like +TCGA-BH-A0WA TCGA-BH-A0WA-01 basal-like +TCGA-BH-A18G TCGA-BH-A18G-01 +TCGA-C8-A12K TCGA-C8-A12K-01 basal-like +TCGA-C8-A12V TCGA-C8-A12V-01 basal-like +TCGA-C8-A131 TCGA-C8-A131-01 basal-like +TCGA-C8-A134 TCGA-C8-A134-01 basal-like +TCGA-D8-A147 TCGA-D8-A147-01 basal-like +TCGA-E2-A14N TCGA-E2-A14N-01 basal-like +TCGA-E2-A14R TCGA-E2-A14R-01 basal-like +TCGA-E2-A14X TCGA-E2-A14X-01 basal-like +TCGA-E2-A14Y TCGA-E2-A14Y-01 basal-like +TCGA-E2-A150 TCGA-E2-A150-01 basal-like +TCGA-E2-A158 TCGA-E2-A158-01 basal-like +TCGA-E2-A159 TCGA-E2-A159-01 basal-like +TCGA-E2-A1AZ TCGA-E2-A1AZ-01 +TCGA-E2-A1B5 TCGA-E2-A1B5-01 basal-like +TCGA-A8-A08L TCGA-A8-A08L-01 Her2 enriched +TCGA-BH-A1EV TCGA-BH-A1EV-01 Her2 enriched +TCGA-B6-A0I9 TCGA-B6-A0I9-01 Her2 enriched +TCGA-A8-A09X TCGA-A8-A09X-01 Her2 enriched +TCGA-B6-A0IK TCGA-B6-A0IK-01 Her2 enriched +TCGA-BH-A18P TCGA-BH-A18P-01 Her2 enriched +TCGA-A8-A08J TCGA-A8-A08J-01 Her2 enriched +TCGA-BH-A18R TCGA-BH-A18R-01 Her2 enriched +TCGA-AR-A1AT TCGA-AR-A1AT-01 Her2 enriched +TCGA-B6-A0RS TCGA-B6-A0RS-01 Her2 enriched +TCGA-BH-A0DZ TCGA-BH-A0DZ-01 Her2 enriched TCGA-A2-A0T1 TCGA-A2-A0T1-01 Her2 enriched -TCGA-A2-A0T2 TCGA-A2-A0T2-01 -TCGA-A2-A0T3 TCGA-A2-A0T3-01 Luminal B -TCGA-A2-A0T4 TCGA-A2-A0T4-01 Luminal B +TCGA-AO-A0J2 TCGA-AO-A0J2-01 Her2 enriched +TCGA-BH-A0AW TCGA-BH-A0AW-01 Her2 enriched +TCGA-BH-A0EE TCGA-BH-A0EE-01 Her2 enriched +TCGA-A2-A0D1 TCGA-A2-A0D1-01 Her2 enriched +TCGA-AO-A03N TCGA-AO-A03N-01 Her2 enriched +TCGA-A2-A0CY TCGA-A2-A0CY-01 Her2 enriched +TCGA-A2-A04X TCGA-A2-A04X-01 Her2 enriched +TCGA-A2-A0CX TCGA-A2-A0CX-01 Her2 enriched +TCGA-A2-A04W TCGA-A2-A04W-01 Her2 enriched +TCGA-AO-A12D TCGA-AO-A12D-01 Her2 enriched +TCGA-A2-A0CL TCGA-A2-A0CL-01 Her2 enriched +TCGA-AO-A0JE TCGA-AO-A0JE-01 Her2 enriched +TCGA-A2-A0EQ TCGA-A2-A0EQ-01 Her2 enriched +TCGA-AO-A03L TCGA-AO-A03L-01 Her2 enriched +TCGA-B6-A0RH TCGA-B6-A0RH-01 Her2 enriched +TCGA-A8-A075 TCGA-A8-A075-01 Her2 enriched +TCGA-A8-A076 TCGA-A8-A076-01 Her2 enriched +TCGA-A8-A07B TCGA-A8-A07B-01 Her2 enriched +TCGA-A8-A07I TCGA-A8-A07I-01 Her2 enriched +TCGA-A8-A081 TCGA-A8-A081-01 Her2 enriched +TCGA-A8-A08B TCGA-A8-A08B-01 Her2 enriched +TCGA-A8-A08X TCGA-A8-A08X-01 Her2 enriched +TCGA-A8-A092 TCGA-A8-A092-01 Her2 enriched +TCGA-A8-A094 TCGA-A8-A094-01 Her2 enriched +TCGA-A8-A09G TCGA-A8-A09G-01 Her2 enriched +TCGA-A8-A0A7 TCGA-A8-A0A7-01 Her2 enriched +TCGA-AN-A04C TCGA-AN-A04C-01 Her2 enriched +TCGA-AN-A0FV TCGA-AN-A0FV-01 Her2 enriched +TCGA-AR-A0TX TCGA-AR-A0TX-01 Her2 enriched +TCGA-BH-A0B7 TCGA-BH-A0B7-01 Her2 enriched +TCGA-BH-A0HY TCGA-BH-A0HY-01 Her2 enriched +TCGA-C8-A12L TCGA-C8-A12L-01 Her2 enriched +TCGA-C8-A12P TCGA-C8-A12P-01 Her2 enriched +TCGA-C8-A12Q TCGA-C8-A12Q-01 Her2 enriched +TCGA-C8-A12T TCGA-C8-A12T-01 Her2 enriched +TCGA-C8-A12Z TCGA-C8-A12Z-01 Her2 enriched +TCGA-C8-A130 TCGA-C8-A130-01 Her2 enriched +TCGA-C8-A135 TCGA-C8-A135-01 Her2 enriched +TCGA-C8-A137 TCGA-C8-A137-01 Her2 enriched +TCGA-C8-A138 TCGA-C8-A138-01 Her2 enriched +TCGA-C8-A1HF TCGA-C8-A1HF-01 Her2 enriched +TCGA-D8-A13Z TCGA-D8-A13Z-01 Her2 enriched +TCGA-E2-A14P TCGA-E2-A14P-01 Her2 enriched +TCGA-E2-A14V TCGA-E2-A14V-01 Her2 enriched +TCGA-E2-A152 TCGA-E2-A152-01 Her2 enriched +TCGA-E2-A1B0 TCGA-E2-A1B0-01 Her2 enriched +TCGA-A2-A0CU TCGA-A2-A0CU-01 Luminal A +TCGA-AR-A0TR TCGA-AR-A0TR-01 Luminal A +TCGA-BH-A18T TCGA-BH-A18T-01 Luminal A +TCGA-B6-A0I8 TCGA-B6-A0I8-01 Luminal A +TCGA-B6-A0X4 TCGA-B6-A0X4-01 Luminal A +TCGA-A8-A06U TCGA-A8-A06U-01 Luminal A +TCGA-BH-A0EA TCGA-BH-A0EA-01 Luminal A +TCGA-BH-A18N TCGA-BH-A18N-01 Luminal A +TCGA-BH-A1EU TCGA-BH-A1EU-01 Luminal A +TCGA-B6-A0X7 TCGA-B6-A0X7-01 Luminal A +TCGA-A2-A04V TCGA-A2-A04V-01 Luminal A +TCGA-BH-A18S TCGA-BH-A18S-01 Luminal A +TCGA-BH-A18M TCGA-BH-A18M-01 Luminal A +TCGA-B6-A0RM TCGA-B6-A0RM-01 Luminal A +TCGA-BH-A1ET TCGA-BH-A1ET-01 Luminal A +TCGA-B6-A0IN TCGA-B6-A0IN-01 Luminal A +TCGA-BH-A1EO TCGA-BH-A1EO-01 Luminal A +TCGA-B6-A0WS TCGA-B6-A0WS-01 Luminal A +TCGA-B6-A0RP TCGA-B6-A0RP-01 Luminal A +TCGA-B6-A0IH TCGA-B6-A0IH-01 Luminal A +TCGA-B6-A0WY TCGA-B6-A0WY-01 Luminal A +TCGA-BH-A1ES TCGA-BH-A1ES-01 Luminal A +TCGA-B6-A0X0 TCGA-B6-A0X0-01 Luminal A +TCGA-B6-A0RQ TCGA-B6-A0RQ-01 Luminal A +TCGA-B6-A0IG TCGA-B6-A0IG-01 Luminal A +TCGA-BH-A0HO TCGA-BH-A0HO-01 Luminal A +TCGA-BH-A0DS TCGA-BH-A0DS-01 Luminal A +TCGA-BH-A0DQ TCGA-BH-A0DQ-01 Luminal A +TCGA-BH-A0HK TCGA-BH-A0HK-01 Luminal A +TCGA-A7-A0CG TCGA-A7-A0CG-01 Luminal A +TCGA-A7-A0CH TCGA-A7-A0CH-01 Luminal A +TCGA-A7-A0DB TCGA-A7-A0DB-01 Luminal A +TCGA-A7-A0D9 TCGA-A7-A0D9-01 Luminal A +TCGA-AO-A0J8 TCGA-AO-A0J8-01 Luminal A +TCGA-BH-A0GZ TCGA-BH-A0GZ-01 Luminal A +TCGA-AO-A0JA TCGA-AO-A0JA-01 Luminal A +TCGA-AO-A0JF TCGA-AO-A0JF-01 Luminal A +TCGA-A7-A0CD TCGA-A7-A0CD-01 Luminal A +TCGA-D8-A145 TCGA-D8-A145-01 Luminal A +TCGA-BH-A0HP TCGA-BH-A0HP-01 Luminal A +TCGA-BH-A0DK TCGA-BH-A0DK-01 Luminal A +TCGA-BH-A0E2 TCGA-BH-A0E2-01 Luminal A +TCGA-A2-A0YI TCGA-A2-A0YI-01 Luminal A +TCGA-A2-A0YL TCGA-A2-A0YL-01 Luminal A +TCGA-AO-A0JG TCGA-AO-A0JG-01 Luminal A +TCGA-A2-A0YF TCGA-A2-A0YF-01 Luminal A +TCGA-BH-A0DP TCGA-BH-A0DP-01 Luminal A +TCGA-BH-A0E1 TCGA-BH-A0E1-01 Luminal A TCGA-A2-A0T5 TCGA-A2-A0T5-01 Luminal A TCGA-A2-A0T6 TCGA-A2-A0T6-01 Luminal A +TCGA-BH-A0HI TCGA-BH-A0HI-01 Luminal A TCGA-A2-A0T7 TCGA-A2-A0T7-01 Luminal A -TCGA-A2-A0YC TCGA-A2-A0YC-01 Luminal A +TCGA-BH-A0BJ TCGA-BH-A0BJ-01 Luminal A +TCGA-BH-A0H7 TCGA-BH-A0H7-01 Luminal A +TCGA-BH-A0HF TCGA-BH-A0HF-01 Luminal A +TCGA-BH-A0EB TCGA-BH-A0EB-01 Luminal A +TCGA-BH-A0H6 TCGA-BH-A0H6-01 Luminal A TCGA-A2-A0YD TCGA-A2-A0YD-01 Luminal A -TCGA-A2-A0YE TCGA-A2-A0YE-01 -TCGA-A2-A0YF TCGA-A2-A0YF-01 Luminal A -TCGA-A2-A0YG TCGA-A2-A0YG-01 Luminal B -TCGA-A2-A0YH TCGA-A2-A0YH-01 Luminal B -TCGA-A2-A0YI TCGA-A2-A0YI-01 Luminal A -TCGA-A2-A0YJ TCGA-A2-A0YJ-01 -TCGA-A2-A0YK TCGA-A2-A0YK-01 -TCGA-A2-A0YL TCGA-A2-A0YL-01 Luminal A -TCGA-A2-A0YM TCGA-A2-A0YM-01 basal-like -TCGA-A2-A0YT TCGA-A2-A0YT-01 Luminal B -TCGA-A2-A1FV TCGA-A2-A1FV-01 -TCGA-A2-A1FW TCGA-A2-A1FW-01 -TCGA-A2-A1FX TCGA-A2-A1FX-01 -TCGA-A2-A1FZ TCGA-A2-A1FZ-01 -TCGA-A2-A1G0 TCGA-A2-A1G0-01 -TCGA-A2-A1G1 TCGA-A2-A1G1-01 -TCGA-A2-A1G4 TCGA-A2-A1G4-01 -TCGA-A2-A1G6 TCGA-A2-A1G6-01 -TCGA-A2-A259 TCGA-A2-A259-01 -TCGA-A2-A25A TCGA-A2-A25A-01 -TCGA-A2-A25B TCGA-A2-A25B-01 -TCGA-A2-A25C TCGA-A2-A25C-01 -TCGA-A2-A25D TCGA-A2-A25D-01 -TCGA-A2-A25E TCGA-A2-A25E-01 -TCGA-A2-A25F TCGA-A2-A25F-01 -TCGA-A7-A0CD TCGA-A7-A0CD-01 Luminal A -TCGA-A7-A0CE TCGA-A7-A0CE-01 basal-like -TCGA-A7-A0CG TCGA-A7-A0CG-01 Luminal A -TCGA-A7-A0CH TCGA-A7-A0CH-01 Luminal A -TCGA-A7-A0CJ TCGA-A7-A0CJ-01 Luminal B -TCGA-A7-A0D9 TCGA-A7-A0D9-01 Luminal A -TCGA-A7-A0DA TCGA-A7-A0DA-01 basal-like -TCGA-A7-A0DB TCGA-A7-A0DB-01 Luminal A -TCGA-A7-A0DC TCGA-A7-A0DC-01 Luminal A -TCGA-A7-A13D TCGA-A7-A13D-01 basal-like -TCGA-A7-A13E TCGA-A7-A13E-01 -TCGA-A7-A13F TCGA-A7-A13F-01 Luminal B -TCGA-A7-A13G TCGA-A7-A13G-01 -TCGA-A7-A26E TCGA-A7-A26E-01 -TCGA-A7-A26F TCGA-A7-A26F-01 -TCGA-A7-A26G TCGA-A7-A26G-01 -TCGA-A7-A26H TCGA-A7-A26H-01 -TCGA-A7-A26I TCGA-A7-A26I-01 -TCGA-A7-A26J TCGA-A7-A26J-01 -TCGA-A8-A06N TCGA-A8-A06N-01 Luminal B -TCGA-A8-A06O TCGA-A8-A06O-01 Luminal B +TCGA-BH-A0HB TCGA-BH-A0HB-01 Luminal A +TCGA-BH-A0HX TCGA-BH-A0HX-01 Luminal A +TCGA-AO-A12H TCGA-AO-A12H-01 Luminal A +TCGA-E2-A10E TCGA-E2-A10E-01 Luminal A +TCGA-A2-A0D3 TCGA-A2-A0D3-01 Luminal A +TCGA-E2-A10F TCGA-E2-A10F-01 Luminal A +TCGA-AO-A03V TCGA-AO-A03V-01 Luminal A +TCGA-A2-A0EW TCGA-A2-A0EW-01 Luminal A +TCGA-BH-A0GY TCGA-BH-A0GY-01 Luminal A +TCGA-A2-A0EV TCGA-A2-A0EV-01 Luminal A +TCGA-BH-A0BC TCGA-BH-A0BC-01 Luminal A +TCGA-A2-A0YC TCGA-A2-A0YC-01 Luminal A +TCGA-A2-A0EU TCGA-A2-A0EU-01 Luminal A +TCGA-A2-A0ET TCGA-A2-A0ET-01 Luminal A +TCGA-A2-A04Y TCGA-A2-A04Y-01 Luminal A +TCGA-BH-A0HQ TCGA-BH-A0HQ-01 Luminal A +TCGA-A2-A0ES TCGA-A2-A0ES-01 Luminal A +TCGA-BH-A0BA TCGA-BH-A0BA-01 Luminal A +TCGA-E2-A10B TCGA-E2-A10B-01 Luminal A +TCGA-BH-A0B1 TCGA-BH-A0B1-01 Luminal A +TCGA-BH-A0DH TCGA-BH-A0DH-01 Luminal A +TCGA-BH-A0B4 TCGA-BH-A0B4-01 Luminal A +TCGA-BH-A0H9 TCGA-BH-A0H9-01 Luminal A +TCGA-AO-A0J9 TCGA-AO-A0J9-01 Luminal A +TCGA-AO-A12G TCGA-AO-A12G-01 Luminal A +TCGA-A2-A0SY TCGA-A2-A0SY-01 Luminal A +TCGA-BH-A0E7 TCGA-BH-A0E7-01 Luminal A +TCGA-AO-A03M TCGA-AO-A03M-01 Luminal A +TCGA-BH-A0BV TCGA-BH-A0BV-01 Luminal A +TCGA-BH-A0B8 TCGA-BH-A0B8-01 Luminal A +TCGA-A2-A0CZ TCGA-A2-A0CZ-01 Luminal A +TCGA-A2-A0SU TCGA-A2-A0SU-01 Luminal A +TCGA-AO-A12E TCGA-AO-A12E-01 Luminal A +TCGA-E2-A106 TCGA-E2-A106-01 Luminal A +TCGA-A2-A0CV TCGA-A2-A0CV-01 Luminal A +TCGA-AO-A12C TCGA-AO-A12C-01 Luminal A +TCGA-B6-A0RG TCGA-B6-A0RG-01 Luminal A +TCGA-A2-A0CS TCGA-A2-A0CS-01 Luminal A +TCGA-A2-A0EO TCGA-A2-A0EO-01 Luminal A +TCGA-A2-A0CQ TCGA-A2-A0CQ-01 Luminal A +TCGA-A2-A0EN TCGA-A2-A0EN-01 Luminal A +TCGA-AO-A12A TCGA-AO-A12A-01 Luminal A +TCGA-A2-A0CP TCGA-A2-A0CP-01 Luminal A +TCGA-AO-A126 TCGA-AO-A126-01 Luminal A +TCGA-AO-A125 TCGA-AO-A125-01 Luminal A +TCGA-A2-A0EM TCGA-A2-A0EM-01 Luminal A +TCGA-A2-A04N TCGA-A2-A04N-01 Luminal A +TCGA-AQ-A04L TCGA-AQ-A04L-01 Luminal A +TCGA-B6-A0IO TCGA-B6-A0IO-01 Luminal A +TCGA-B6-A0IP TCGA-B6-A0IP-01 Luminal A +TCGA-B6-A0WZ TCGA-B6-A0WZ-01 Luminal A +TCGA-B6-A0I5 TCGA-B6-A0I5-01 Luminal A +TCGA-B6-A0RV TCGA-B6-A0RV-01 Luminal A +TCGA-B6-A0RO TCGA-B6-A0RO-01 Luminal A +TCGA-B6-A0RN TCGA-B6-A0RN-01 Luminal A +TCGA-B6-A0WT TCGA-B6-A0WT-01 Luminal A +TCGA-B6-A0IA TCGA-B6-A0IA-01 Luminal A +TCGA-B6-A0RI TCGA-B6-A0RI-01 Luminal A +TCGA-A1-A0SE TCGA-A1-A0SE-01 Luminal A +TCGA-A2-A0EX TCGA-A2-A0EX-01 Luminal A +TCGA-AO-A0JJ TCGA-AO-A0JJ-01 Luminal A +TCGA-E2-A105 TCGA-E2-A105-01 Luminal A +TCGA-A1-A0SD TCGA-A1-A0SD-01 Luminal A +TCGA-A1-A0SH TCGA-A1-A0SH-01 Luminal A +TCGA-A1-A0SJ TCGA-A1-A0SJ-01 Luminal A TCGA-A8-A06P TCGA-A8-A06P-01 Luminal A -TCGA-A8-A06Q TCGA-A8-A06Q-01 Luminal B -TCGA-A8-A06R TCGA-A8-A06R-01 Luminal B TCGA-A8-A06T TCGA-A8-A06T-01 Luminal A -TCGA-A8-A06U TCGA-A8-A06U-01 Luminal A -TCGA-A8-A06X TCGA-A8-A06X-01 Luminal B TCGA-A8-A06Y TCGA-A8-A06Y-01 Luminal A -TCGA-A8-A06Z TCGA-A8-A06Z-01 Luminal B -TCGA-A8-A075 TCGA-A8-A075-01 Her2 enriched -TCGA-A8-A076 TCGA-A8-A076-01 Her2 enriched -TCGA-A8-A079 TCGA-A8-A079-01 Luminal B -TCGA-A8-A07B TCGA-A8-A07B-01 Her2 enriched -TCGA-A8-A07C TCGA-A8-A07C-01 basal-like TCGA-A8-A07E TCGA-A8-A07E-01 Luminal A TCGA-A8-A07F TCGA-A8-A07F-01 Luminal A TCGA-A8-A07G TCGA-A8-A07G-01 Luminal A -TCGA-A8-A07I TCGA-A8-A07I-01 Her2 enriched TCGA-A8-A07J TCGA-A8-A07J-01 Luminal A -TCGA-A8-A07L TCGA-A8-A07L-01 Luminal B -TCGA-A8-A07O TCGA-A8-A07O-01 basal-like TCGA-A8-A07P TCGA-A8-A07P-01 Luminal A -TCGA-A8-A07R TCGA-A8-A07R-01 basal-like -TCGA-A8-A07S TCGA-A8-A07S-01 Luminal B -TCGA-A8-A07U TCGA-A8-A07U-01 basal-like -TCGA-A8-A07W TCGA-A8-A07W-01 Luminal B -TCGA-A8-A07Z TCGA-A8-A07Z-01 Luminal B -TCGA-A8-A081 TCGA-A8-A081-01 Her2 enriched -TCGA-A8-A082 TCGA-A8-A082-01 Luminal B TCGA-A8-A083 TCGA-A8-A083-01 Luminal A -TCGA-A8-A084 TCGA-A8-A084-01 Luminal B -TCGA-A8-A085 TCGA-A8-A085-01 Luminal B TCGA-A8-A086 TCGA-A8-A086-01 Luminal A TCGA-A8-A08A TCGA-A8-A08A-01 Luminal A -TCGA-A8-A08B TCGA-A8-A08B-01 Her2 enriched TCGA-A8-A08C TCGA-A8-A08C-01 Luminal A -TCGA-A8-A08F TCGA-A8-A08F-01 Luminal B -TCGA-A8-A08G TCGA-A8-A08G-01 Luminal B -TCGA-A8-A08H TCGA-A8-A08H-01 basal-like -TCGA-A8-A08I TCGA-A8-A08I-01 Luminal B -TCGA-A8-A08J TCGA-A8-A08J-01 Her2 enriched -TCGA-A8-A08L TCGA-A8-A08L-01 Her2 enriched TCGA-A8-A08O TCGA-A8-A08O-01 Luminal A -TCGA-A8-A08P TCGA-A8-A08P-01 Luminal B -TCGA-A8-A08R TCGA-A8-A08R-01 basal-like -TCGA-A8-A08S TCGA-A8-A08S-01 Luminal B TCGA-A8-A08T TCGA-A8-A08T-01 Luminal A -TCGA-A8-A08X TCGA-A8-A08X-01 Her2 enriched TCGA-A8-A08Z TCGA-A8-A08Z-01 Luminal A TCGA-A8-A090 TCGA-A8-A090-01 Luminal A TCGA-A8-A091 TCGA-A8-A091-01 Luminal A -TCGA-A8-A092 TCGA-A8-A092-01 Her2 enriched TCGA-A8-A093 TCGA-A8-A093-01 Luminal A -TCGA-A8-A094 TCGA-A8-A094-01 Her2 enriched -TCGA-A8-A095 TCGA-A8-A095-01 Luminal B -TCGA-A8-A096 TCGA-A8-A096-01 Luminal B -TCGA-A8-A097 TCGA-A8-A097-01 Luminal B TCGA-A8-A099 TCGA-A8-A099-01 Luminal A TCGA-A8-A09A TCGA-A8-A09A-01 Luminal A TCGA-A8-A09B TCGA-A8-A09B-01 Luminal A -TCGA-A8-A09C TCGA-A8-A09C-01 Luminal B -TCGA-A8-A09D TCGA-A8-A09D-01 Luminal B -TCGA-A8-A09E TCGA-A8-A09E-01 Luminal B -TCGA-A8-A09G TCGA-A8-A09G-01 Her2 enriched -TCGA-A8-A09I TCGA-A8-A09I-01 Luminal B -TCGA-A8-A09K TCGA-A8-A09K-01 Luminal B -TCGA-A8-A09M TCGA-A8-A09M-01 Luminal B -TCGA-A8-A09N TCGA-A8-A09N-01 Luminal B -TCGA-A8-A09Q TCGA-A8-A09Q-01 Luminal B -TCGA-A8-A09R TCGA-A8-A09R-01 Luminal B TCGA-A8-A09T TCGA-A8-A09T-01 Luminal A TCGA-A8-A09V TCGA-A8-A09V-01 Luminal A -TCGA-A8-A09W TCGA-A8-A09W-01 Luminal B -TCGA-A8-A09X TCGA-A8-A09X-01 Her2 enriched -TCGA-A8-A09Z TCGA-A8-A09Z-01 Luminal B TCGA-A8-A0A1 TCGA-A8-A0A1-01 Luminal A TCGA-A8-A0A2 TCGA-A8-A0A2-01 Luminal A TCGA-A8-A0A4 TCGA-A8-A0A4-01 Luminal A TCGA-A8-A0A6 TCGA-A8-A0A6-01 Luminal A -TCGA-A8-A0A7 TCGA-A8-A0A7-01 Her2 enriched -TCGA-A8-A0A9 TCGA-A8-A0A9-01 Luminal B -TCGA-A8-A0AB TCGA-A8-A0AB-01 Luminal B TCGA-A8-A0AD TCGA-A8-A0AD-01 Luminal A TCGA-AN-A03X TCGA-AN-A03X-01 Luminal A -TCGA-AN-A03Y TCGA-AN-A03Y-01 Luminal B -TCGA-AN-A041 TCGA-AN-A041-01 Luminal B TCGA-AN-A046 TCGA-AN-A046-01 Luminal A -TCGA-AN-A049 TCGA-AN-A049-01 Luminal B TCGA-AN-A04A TCGA-AN-A04A-01 Luminal A -TCGA-AN-A04C TCGA-AN-A04C-01 Her2 enriched -TCGA-AN-A04D TCGA-AN-A04D-01 basal-like -TCGA-AN-A0AJ TCGA-AN-A0AJ-01 Luminal B -TCGA-AN-A0AK TCGA-AN-A0AK-01 Luminal B -TCGA-AN-A0AL TCGA-AN-A0AL-01 basal-like -TCGA-AN-A0AM TCGA-AN-A0AM-01 Luminal B -TCGA-AN-A0AR TCGA-AN-A0AR-01 basal-like -TCGA-AN-A0AS TCGA-AN-A0AS-01 Luminal B -TCGA-AN-A0AT TCGA-AN-A0AT-01 TCGA-AN-A0FD TCGA-AN-A0FD-01 Luminal A -TCGA-AN-A0FF TCGA-AN-A0FF-01 Luminal B -TCGA-AN-A0FJ TCGA-AN-A0FJ-01 basal-like -TCGA-AN-A0FK TCGA-AN-A0FK-01 Luminal B -TCGA-AN-A0FL TCGA-AN-A0FL-01 basal-like TCGA-AN-A0FN TCGA-AN-A0FN-01 Luminal A TCGA-AN-A0FS TCGA-AN-A0FS-01 Luminal A TCGA-AN-A0FT TCGA-AN-A0FT-01 Luminal A -TCGA-AN-A0FV TCGA-AN-A0FV-01 Her2 enriched -TCGA-AN-A0FW TCGA-AN-A0FW-01 Luminal A -TCGA-AN-A0FX TCGA-AN-A0FX-01 basal-like -TCGA-AN-A0FY TCGA-AN-A0FY-01 Luminal B -TCGA-AN-A0FZ TCGA-AN-A0FZ-01 Luminal A -TCGA-AN-A0G0 TCGA-AN-A0G0-01 -TCGA-AN-A0XL TCGA-AN-A0XL-01 Luminal A -TCGA-AN-A0XN TCGA-AN-A0XN-01 Luminal A -TCGA-AN-A0XO TCGA-AN-A0XO-01 Luminal A -TCGA-AN-A0XP TCGA-AN-A0XP-01 Luminal A -TCGA-AN-A0XR TCGA-AN-A0XR-01 Luminal B -TCGA-AN-A0XS TCGA-AN-A0XS-01 Luminal A -TCGA-AN-A0XT TCGA-AN-A0XT-01 Luminal A -TCGA-AN-A0XU TCGA-AN-A0XU-01 basal-like -TCGA-AN-A0XV TCGA-AN-A0XV-01 Luminal A -TCGA-AN-A0XW TCGA-AN-A0XW-01 Luminal B -TCGA-AO-A03L TCGA-AO-A03L-01 Her2 enriched -TCGA-AO-A03M TCGA-AO-A03M-01 Luminal A -TCGA-AO-A03N TCGA-AO-A03N-01 Her2 enriched -TCGA-AO-A03O TCGA-AO-A03O-01 Luminal B -TCGA-AO-A03P TCGA-AO-A03P-01 Luminal B -TCGA-AO-A03R TCGA-AO-A03R-01 -TCGA-AO-A03T TCGA-AO-A03T-01 -TCGA-AO-A03U TCGA-AO-A03U-01 -TCGA-AO-A03V TCGA-AO-A03V-01 Luminal A -TCGA-AO-A0J2 TCGA-AO-A0J2-01 Her2 enriched -TCGA-AO-A0J3 TCGA-AO-A0J3-01 Luminal B -TCGA-AO-A0J4 TCGA-AO-A0J4-01 basal-like -TCGA-AO-A0J5 TCGA-AO-A0J5-01 Luminal A -TCGA-AO-A0J6 TCGA-AO-A0J6-01 basal-like -TCGA-AO-A0J7 TCGA-AO-A0J7-01 Luminal B -TCGA-AO-A0J8 TCGA-AO-A0J8-01 Luminal A -TCGA-AO-A0J9 TCGA-AO-A0J9-01 Luminal A -TCGA-AO-A0JA TCGA-AO-A0JA-01 Luminal A -TCGA-AO-A0JB TCGA-AO-A0JB-01 -TCGA-AO-A0JC TCGA-AO-A0JC-01 Luminal B -TCGA-AO-A0JD TCGA-AO-A0JD-01 Luminal B -TCGA-AO-A0JE TCGA-AO-A0JE-01 Her2 enriched -TCGA-AO-A0JF TCGA-AO-A0JF-01 Luminal A -TCGA-AO-A0JG TCGA-AO-A0JG-01 Luminal A -TCGA-AO-A0JI TCGA-AO-A0JI-01 Luminal B -TCGA-AO-A0JJ TCGA-AO-A0JJ-01 Luminal A -TCGA-AO-A0JL TCGA-AO-A0JL-01 basal-like -TCGA-AO-A0JM TCGA-AO-A0JM-01 Luminal B -TCGA-AO-A124 TCGA-AO-A124-01 basal-like -TCGA-AO-A125 TCGA-AO-A125-01 Luminal A -TCGA-AO-A126 TCGA-AO-A126-01 Luminal A -TCGA-AO-A128 TCGA-AO-A128-01 -TCGA-AO-A129 TCGA-AO-A129-01 basal-like -TCGA-AO-A12A TCGA-AO-A12A-01 Luminal A -TCGA-AO-A12B TCGA-AO-A12B-01 Luminal B -TCGA-AO-A12C TCGA-AO-A12C-01 Luminal A -TCGA-AO-A12D TCGA-AO-A12D-01 Her2 enriched -TCGA-AO-A12E TCGA-AO-A12E-01 Luminal A -TCGA-AO-A12F TCGA-AO-A12F-01 basal-like -TCGA-AO-A12G TCGA-AO-A12G-01 Luminal A -TCGA-AO-A12H TCGA-AO-A12H-01 Luminal A -TCGA-AO-A1KO TCGA-AO-A1KO-01 -TCGA-AO-A1KP TCGA-AO-A1KP-01 -TCGA-AO-A1KQ TCGA-AO-A1KQ-01 -TCGA-AO-A1KR TCGA-AO-A1KR-01 -TCGA-AO-A1KS TCGA-AO-A1KS-01 -TCGA-AO-A1KT TCGA-AO-A1KT-01 -TCGA-AQ-A04H TCGA-AQ-A04H-01 Luminal B -TCGA-AQ-A04J TCGA-AQ-A04J-01 basal-like -TCGA-AQ-A04L TCGA-AQ-A04L-01 Luminal A -TCGA-AQ-A0Y5 TCGA-AQ-A0Y5-01 -TCGA-AQ-A1H2 TCGA-AQ-A1H2-01 -TCGA-AQ-A1H3 TCGA-AQ-A1H3-01 -TCGA-AR-A0TP TCGA-AR-A0TP-01 basal-like -TCGA-AR-A0TQ TCGA-AR-A0TQ-01 Luminal B -TCGA-AR-A0TR TCGA-AR-A0TR-01 Luminal A -TCGA-AR-A0TS TCGA-AR-A0TS-01 basal-like -TCGA-AR-A0TT TCGA-AR-A0TT-01 Luminal B -TCGA-AR-A0TU TCGA-AR-A0TU-01 -TCGA-AR-A0TV TCGA-AR-A0TV-01 Luminal B -TCGA-AR-A0TW TCGA-AR-A0TW-01 Luminal A -TCGA-AR-A0TX TCGA-AR-A0TX-01 Her2 enriched -TCGA-AR-A0TY TCGA-AR-A0TY-01 Luminal B -TCGA-AR-A0TZ TCGA-AR-A0TZ-01 Luminal B -TCGA-AR-A0U0 TCGA-AR-A0U0-01 -TCGA-AR-A0U1 TCGA-AR-A0U1-01 basal-like -TCGA-AR-A0U2 TCGA-AR-A0U2-01 Luminal B -TCGA-AR-A0U3 TCGA-AR-A0U3-01 Luminal B -TCGA-AR-A0U4 TCGA-AR-A0U4-01 basal-like -TCGA-AR-A1AH TCGA-AR-A1AH-01 basal-like -TCGA-AR-A1AI TCGA-AR-A1AI-01 basal-like -TCGA-AR-A1AJ TCGA-AR-A1AJ-01 basal-like -TCGA-AR-A1AK TCGA-AR-A1AK-01 Luminal A -TCGA-AR-A1AL TCGA-AR-A1AL-01 Luminal A -TCGA-AR-A1AN TCGA-AR-A1AN-01 Luminal A -TCGA-AR-A1AO TCGA-AR-A1AO-01 Claudin low -TCGA-AR-A1AP TCGA-AR-A1AP-01 Luminal A -TCGA-AR-A1AQ TCGA-AR-A1AQ-01 basal-like -TCGA-AR-A1AR TCGA-AR-A1AR-01 basal-like -TCGA-AR-A1AS TCGA-AR-A1AS-01 Luminal A -TCGA-AR-A1AT TCGA-AR-A1AT-01 Her2 enriched -TCGA-AR-A1AU TCGA-AR-A1AU-01 Luminal A -TCGA-AR-A1AV TCGA-AR-A1AV-01 Luminal B -TCGA-AR-A1AW TCGA-AR-A1AW-01 Luminal A -TCGA-AR-A1AX TCGA-AR-A1AX-01 Luminal A -TCGA-AR-A1AY TCGA-AR-A1AY-01 basal-like -TCGA-AR-A24H TCGA-AR-A24H-01 -TCGA-AR-A24K TCGA-AR-A24K-01 -TCGA-AR-A24L TCGA-AR-A24L-01 -TCGA-AR-A24M TCGA-AR-A24M-01 -TCGA-AR-A24N TCGA-AR-A24N-01 -TCGA-AR-A24O TCGA-AR-A24O-01 -TCGA-AR-A24P TCGA-AR-A24P-01 -TCGA-AR-A24Q TCGA-AR-A24Q-01 -TCGA-AR-A24R TCGA-AR-A24R-01 -TCGA-AR-A24S TCGA-AR-A24S-01 -TCGA-AR-A24T TCGA-AR-A24T-01 -TCGA-AR-A24U TCGA-AR-A24U-01 -TCGA-AR-A24V TCGA-AR-A24V-01 -TCGA-AR-A24W TCGA-AR-A24W-01 -TCGA-AR-A24X TCGA-AR-A24X-01 -TCGA-AR-A24Z TCGA-AR-A24Z-01 -TCGA-AR-A250 TCGA-AR-A250-01 -TCGA-AR-A251 TCGA-AR-A251-01 -TCGA-AR-A252 TCGA-AR-A252-01 -TCGA-AR-A254 TCGA-AR-A254-01 -TCGA-AR-A255 TCGA-AR-A255-01 -TCGA-AR-A256 TCGA-AR-A256-01 -TCGA-B6-A0I2 TCGA-B6-A0I2-01 basal-like -TCGA-B6-A0I5 TCGA-B6-A0I5-01 Luminal A -TCGA-B6-A0I6 TCGA-B6-A0I6-01 -TCGA-B6-A0I8 TCGA-B6-A0I8-01 Luminal A -TCGA-B6-A0I9 TCGA-B6-A0I9-01 Her2 enriched -TCGA-B6-A0IA TCGA-B6-A0IA-01 Luminal A -TCGA-B6-A0IB TCGA-B6-A0IB-01 Luminal B -TCGA-B6-A0IC TCGA-B6-A0IC-01 Luminal B -TCGA-B6-A0IE TCGA-B6-A0IE-01 -TCGA-B6-A0IG TCGA-B6-A0IG-01 Luminal A -TCGA-B6-A0IH TCGA-B6-A0IH-01 Luminal A -TCGA-B6-A0IJ TCGA-B6-A0IJ-01 basal-like -TCGA-B6-A0IK TCGA-B6-A0IK-01 Her2 enriched -TCGA-B6-A0IM TCGA-B6-A0IM-01 Luminal B -TCGA-B6-A0IN TCGA-B6-A0IN-01 Luminal A -TCGA-B6-A0IO TCGA-B6-A0IO-01 Luminal A -TCGA-B6-A0IP TCGA-B6-A0IP-01 Luminal A -TCGA-B6-A0IQ TCGA-B6-A0IQ-01 basal-like -TCGA-B6-A0RE TCGA-B6-A0RE-01 basal-like -TCGA-B6-A0RG TCGA-B6-A0RG-01 Luminal A -TCGA-B6-A0RH TCGA-B6-A0RH-01 Her2 enriched -TCGA-B6-A0RI TCGA-B6-A0RI-01 Luminal A -TCGA-B6-A0RL TCGA-B6-A0RL-01 Luminal B -TCGA-B6-A0RM TCGA-B6-A0RM-01 Luminal A -TCGA-B6-A0RN TCGA-B6-A0RN-01 Luminal A -TCGA-B6-A0RO TCGA-B6-A0RO-01 Luminal A -TCGA-B6-A0RP TCGA-B6-A0RP-01 Luminal A -TCGA-B6-A0RQ TCGA-B6-A0RQ-01 Luminal A -TCGA-B6-A0RS TCGA-B6-A0RS-01 Her2 enriched -TCGA-B6-A0RT TCGA-B6-A0RT-01 basal-like -TCGA-B6-A0RU TCGA-B6-A0RU-01 basal-like -TCGA-B6-A0RV TCGA-B6-A0RV-01 Luminal A -TCGA-B6-A0WS TCGA-B6-A0WS-01 Luminal A -TCGA-B6-A0WT TCGA-B6-A0WT-01 Luminal A -TCGA-B6-A0WV TCGA-B6-A0WV-01 Luminal B -TCGA-B6-A0WW TCGA-B6-A0WW-01 Luminal B -TCGA-B6-A0WX TCGA-B6-A0WX-01 basal-like -TCGA-B6-A0WY TCGA-B6-A0WY-01 Luminal A -TCGA-B6-A0WZ TCGA-B6-A0WZ-01 Luminal A -TCGA-B6-A0X0 TCGA-B6-A0X0-01 Luminal A -TCGA-B6-A0X1 TCGA-B6-A0X1-01 -TCGA-B6-A0X4 TCGA-B6-A0X4-01 Luminal A -TCGA-B6-A0X5 TCGA-B6-A0X5-01 Luminal B -TCGA-B6-A0X7 TCGA-B6-A0X7-01 Luminal A -TCGA-B6-A1KC TCGA-B6-A1KC-01 -TCGA-B6-A1KF TCGA-B6-A1KF-01 -TCGA-B6-A1KI TCGA-B6-A1KI-01 -TCGA-B6-A1KN TCGA-B6-A1KN-01 -TCGA-BH-A0AU TCGA-BH-A0AU-01 Luminal B -TCGA-BH-A0AV TCGA-BH-A0AV-01 basal-like -TCGA-BH-A0AW TCGA-BH-A0AW-01 Her2 enriched -TCGA-BH-A0AY TCGA-BH-A0AY-01 Luminal B +TCGA-AN-A0FW TCGA-AN-A0FW-01 Luminal A +TCGA-AN-A0FZ TCGA-AN-A0FZ-01 Luminal A +TCGA-AN-A0XL TCGA-AN-A0XL-01 Luminal A +TCGA-AN-A0XN TCGA-AN-A0XN-01 Luminal A +TCGA-AN-A0XO TCGA-AN-A0XO-01 Luminal A +TCGA-AN-A0XP TCGA-AN-A0XP-01 Luminal A +TCGA-AN-A0XS TCGA-AN-A0XS-01 Luminal A +TCGA-AN-A0XT TCGA-AN-A0XT-01 Luminal A +TCGA-AN-A0XV TCGA-AN-A0XV-01 Luminal A +TCGA-AR-A0TW TCGA-AR-A0TW-01 Luminal A +TCGA-AR-A1AK TCGA-AR-A1AK-01 Luminal A +TCGA-AR-A1AL TCGA-AR-A1AL-01 Luminal A +TCGA-AR-A1AN TCGA-AR-A1AN-01 Luminal A +TCGA-AR-A1AP TCGA-AR-A1AP-01 Luminal A +TCGA-AR-A1AS TCGA-AR-A1AS-01 Luminal A +TCGA-AR-A1AU TCGA-AR-A1AU-01 Luminal A +TCGA-AR-A1AW TCGA-AR-A1AW-01 Luminal A +TCGA-AR-A1AX TCGA-AR-A1AX-01 Luminal A TCGA-BH-A0AZ TCGA-BH-A0AZ-01 Luminal A TCGA-BH-A0B0 TCGA-BH-A0B0-01 Luminal A -TCGA-BH-A0B1 TCGA-BH-A0B1-01 Luminal A -TCGA-BH-A0B2 TCGA-BH-A0B2-01 Luminal A -TCGA-BH-A0B3 TCGA-BH-A0B3-01 basal-like -TCGA-BH-A0B4 TCGA-BH-A0B4-01 Luminal A -TCGA-BH-A0B5 TCGA-BH-A0B5-01 Luminal B -TCGA-BH-A0B7 TCGA-BH-A0B7-01 Her2 enriched -TCGA-BH-A0B8 TCGA-BH-A0B8-01 Luminal A -TCGA-BH-A0B9 TCGA-BH-A0B9-01 basal-like -TCGA-BH-A0BA TCGA-BH-A0BA-01 Luminal A -TCGA-BH-A0BC TCGA-BH-A0BC-01 Luminal A -TCGA-BH-A0BD TCGA-BH-A0BD-01 Luminal B -TCGA-BH-A0BF TCGA-BH-A0BF-01 Luminal B -TCGA-BH-A0BG TCGA-BH-A0BG-01 basal-like -TCGA-BH-A0BJ TCGA-BH-A0BJ-01 Luminal A -TCGA-BH-A0BL TCGA-BH-A0BL-01 basal-like TCGA-BH-A0BM TCGA-BH-A0BM-01 Luminal A TCGA-BH-A0BO TCGA-BH-A0BO-01 Luminal A TCGA-BH-A0BP TCGA-BH-A0BP-01 Luminal A @@ -424,146 +343,304 @@ TCGA-BH-A0BQ TCGA-BH-A0BQ-01 Luminal A TCGA-BH-A0BR TCGA-BH-A0BR-01 Luminal A TCGA-BH-A0BS TCGA-BH-A0BS-01 Luminal A TCGA-BH-A0BT TCGA-BH-A0BT-01 Luminal A -TCGA-BH-A0BV TCGA-BH-A0BV-01 Luminal A -TCGA-BH-A0BW TCGA-BH-A0BW-01 basal-like -TCGA-BH-A0BZ TCGA-BH-A0BZ-01 Luminal B -TCGA-BH-A0C0 TCGA-BH-A0C0-01 Luminal B TCGA-BH-A0C1 TCGA-BH-A0C1-01 Luminal A -TCGA-BH-A0C3 TCGA-BH-A0C3-01 Luminal B -TCGA-BH-A0C7 TCGA-BH-A0C7-01 Luminal B -TCGA-BH-A0DD TCGA-BH-A0DD-01 Luminal B TCGA-BH-A0DE TCGA-BH-A0DE-01 Luminal A TCGA-BH-A0DG TCGA-BH-A0DG-01 Luminal A -TCGA-BH-A0DH TCGA-BH-A0DH-01 Luminal A TCGA-BH-A0DI TCGA-BH-A0DI-01 Luminal A -TCGA-BH-A0DK TCGA-BH-A0DK-01 Luminal A -TCGA-BH-A0DL TCGA-BH-A0DL-01 basal-like TCGA-BH-A0DO TCGA-BH-A0DO-01 Luminal A -TCGA-BH-A0DP TCGA-BH-A0DP-01 Luminal A -TCGA-BH-A0DQ TCGA-BH-A0DQ-01 Luminal A -TCGA-BH-A0DS TCGA-BH-A0DS-01 Luminal A TCGA-BH-A0DT TCGA-BH-A0DT-01 Luminal A -TCGA-BH-A0DV TCGA-BH-A0DV-01 TCGA-BH-A0DX TCGA-BH-A0DX-01 Luminal A -TCGA-BH-A0DZ TCGA-BH-A0DZ-01 Her2 enriched -TCGA-BH-A0E0 TCGA-BH-A0E0-01 basal-like -TCGA-BH-A0E1 TCGA-BH-A0E1-01 Luminal A -TCGA-BH-A0E2 TCGA-BH-A0E2-01 Luminal A -TCGA-BH-A0E6 TCGA-BH-A0E6-01 basal-like -TCGA-BH-A0E7 TCGA-BH-A0E7-01 Luminal A TCGA-BH-A0E9 TCGA-BH-A0E9-01 Luminal A -TCGA-BH-A0EA TCGA-BH-A0EA-01 Luminal A -TCGA-BH-A0EB TCGA-BH-A0EB-01 Luminal A -TCGA-BH-A0EE TCGA-BH-A0EE-01 Her2 enriched TCGA-BH-A0EI TCGA-BH-A0EI-01 Luminal A -TCGA-BH-A0GY TCGA-BH-A0GY-01 Luminal A -TCGA-BH-A0GZ TCGA-BH-A0GZ-01 Luminal A -TCGA-BH-A0H0 TCGA-BH-A0H0-01 Luminal B TCGA-BH-A0H3 TCGA-BH-A0H3-01 Luminal A TCGA-BH-A0H5 TCGA-BH-A0H5-01 Luminal A -TCGA-BH-A0H6 TCGA-BH-A0H6-01 Luminal A -TCGA-BH-A0H7 TCGA-BH-A0H7-01 Luminal A -TCGA-BH-A0H9 TCGA-BH-A0H9-01 Luminal A TCGA-BH-A0HA TCGA-BH-A0HA-01 Luminal A -TCGA-BH-A0HB TCGA-BH-A0HB-01 Luminal A -TCGA-BH-A0HF TCGA-BH-A0HF-01 Luminal A -TCGA-BH-A0HI TCGA-BH-A0HI-01 Luminal A -TCGA-BH-A0HK TCGA-BH-A0HK-01 Luminal A -TCGA-BH-A0HL TCGA-BH-A0HL-01 -TCGA-BH-A0HN TCGA-BH-A0HN-01 -TCGA-BH-A0HO TCGA-BH-A0HO-01 Luminal A -TCGA-BH-A0HP TCGA-BH-A0HP-01 Luminal A -TCGA-BH-A0HQ TCGA-BH-A0HQ-01 Luminal A -TCGA-BH-A0HU TCGA-BH-A0HU-01 Luminal B -TCGA-BH-A0HW TCGA-BH-A0HW-01 Luminal B -TCGA-BH-A0HX TCGA-BH-A0HX-01 Luminal A -TCGA-BH-A0HY TCGA-BH-A0HY-01 Her2 enriched -TCGA-BH-A0RX TCGA-BH-A0RX-01 basal-like -TCGA-BH-A0W3 TCGA-BH-A0W3-01 Luminal B TCGA-BH-A0W4 TCGA-BH-A0W4-01 Luminal A TCGA-BH-A0W5 TCGA-BH-A0W5-01 Luminal A TCGA-BH-A0W7 TCGA-BH-A0W7-01 Luminal A -TCGA-BH-A0WA TCGA-BH-A0WA-01 basal-like -TCGA-BH-A18F TCGA-BH-A18F-01 Luminal B -TCGA-BH-A18G TCGA-BH-A18G-01 TCGA-BH-A18H TCGA-BH-A18H-01 Luminal A TCGA-BH-A18I TCGA-BH-A18I-01 Luminal A +TCGA-C8-A12N TCGA-C8-A12N-01 Luminal A +TCGA-C8-A12O TCGA-C8-A12O-01 Luminal A +TCGA-C8-A12Y TCGA-C8-A12Y-01 Luminal A +TCGA-C8-A132 TCGA-C8-A132-01 Luminal A +TCGA-C8-A133 TCGA-C8-A133-01 Luminal A +TCGA-C8-A1HI TCGA-C8-A1HI-01 Luminal A +TCGA-D8-A141 TCGA-D8-A141-01 Luminal A +TCGA-E2-A14Q TCGA-E2-A14Q-01 Luminal A +TCGA-E2-A14T TCGA-E2-A14T-01 Luminal A +TCGA-E2-A14Z TCGA-E2-A14Z-01 Luminal A +TCGA-E2-A153 TCGA-E2-A153-01 Luminal A +TCGA-E2-A154 TCGA-E2-A154-01 Luminal A +TCGA-E2-A156 TCGA-E2-A156-01 Luminal A +TCGA-E2-A15C TCGA-E2-A15C-01 Luminal A +TCGA-E2-A15D TCGA-E2-A15D-01 Luminal A +TCGA-E2-A15E TCGA-E2-A15E-01 Luminal A +TCGA-E2-A15F TCGA-E2-A15F-01 Luminal A +TCGA-E2-A15G TCGA-E2-A15G-01 Luminal A +TCGA-E2-A15H TCGA-E2-A15H-01 Luminal A +TCGA-E2-A15I TCGA-E2-A15I-01 Luminal A +TCGA-E2-A15J TCGA-E2-A15J-01 Luminal A +TCGA-E2-A15O TCGA-E2-A15O-01 Luminal A +TCGA-E2-A15P TCGA-E2-A15P-01 Luminal A +TCGA-E2-A15R TCGA-E2-A15R-01 Luminal A +TCGA-E2-A1B1 TCGA-E2-A1B1-01 Luminal A +TCGA-E2-A1B4 TCGA-E2-A1B4-01 Luminal A +TCGA-E2-A1B6 TCGA-E2-A1B6-01 Luminal A +TCGA-E2-A1BC TCGA-E2-A1BC-01 Luminal A +TCGA-E2-A1BD TCGA-E2-A1BD-01 Luminal A +TCGA-A2-A0SV TCGA-A2-A0SV-01 Luminal B +TCGA-AO-A03O TCGA-AO-A03O-01 Luminal B +TCGA-A2-A0SW TCGA-A2-A0SW-01 Luminal B +TCGA-B6-A0WW TCGA-B6-A0WW-01 Luminal B TCGA-BH-A18J TCGA-BH-A18J-01 Luminal B -TCGA-BH-A18K TCGA-BH-A18K-01 basal-like TCGA-BH-A18L TCGA-BH-A18L-01 Luminal B -TCGA-BH-A18M TCGA-BH-A18M-01 Luminal A -TCGA-BH-A18N TCGA-BH-A18N-01 Luminal A -TCGA-BH-A18P TCGA-BH-A18P-01 Her2 enriched -TCGA-BH-A18Q TCGA-BH-A18Q-01 basal-like -TCGA-BH-A18R TCGA-BH-A18R-01 Her2 enriched -TCGA-BH-A18S TCGA-BH-A18S-01 Luminal A -TCGA-BH-A18T TCGA-BH-A18T-01 Luminal A +TCGA-A8-A06X TCGA-A8-A06X-01 Luminal B +TCGA-B6-A0IC TCGA-B6-A0IC-01 Luminal B TCGA-BH-A18U TCGA-BH-A18U-01 Luminal B -TCGA-BH-A18V TCGA-BH-A18V-01 basal-like -TCGA-BH-A1EN TCGA-BH-A1EN-01 -TCGA-BH-A1EO TCGA-BH-A1EO-01 Luminal A -TCGA-BH-A1ES TCGA-BH-A1ES-01 Luminal A -TCGA-BH-A1ET TCGA-BH-A1ET-01 Luminal A -TCGA-BH-A1EU TCGA-BH-A1EU-01 Luminal A -TCGA-BH-A1EV TCGA-BH-A1EV-01 Her2 enriched TCGA-BH-A1EW TCGA-BH-A1EW-01 Luminal B -TCGA-BH-A1EX TCGA-BH-A1EX-01 +TCGA-AR-A0TY TCGA-AR-A0TY-01 Luminal B +TCGA-B6-A0X5 TCGA-B6-A0X5-01 Luminal B +TCGA-B6-A0WV TCGA-B6-A0WV-01 Luminal B +TCGA-B6-A0RL TCGA-B6-A0RL-01 Luminal B +TCGA-AR-A0U2 TCGA-AR-A0U2-01 Luminal B +TCGA-B6-A0IB TCGA-B6-A0IB-01 Luminal B +TCGA-AO-A0J7 TCGA-AO-A0J7-01 Luminal B +TCGA-AO-A0J3 TCGA-AO-A0J3-01 Luminal B +TCGA-D8-A13Y TCGA-D8-A13Y-01 Luminal B +TCGA-A7-A13F TCGA-A7-A13F-01 Luminal B +TCGA-BH-A0HU TCGA-BH-A0HU-01 Luminal B +TCGA-D8-A140 TCGA-D8-A140-01 Luminal B +TCGA-A7-A0CJ TCGA-A7-A0CJ-01 Luminal B +TCGA-AQ-A04H TCGA-AQ-A04H-01 Luminal B +TCGA-BH-A0H0 TCGA-BH-A0H0-01 Luminal B +TCGA-BH-A0BD TCGA-BH-A0BD-01 Luminal B +TCGA-A2-A0T3 TCGA-A2-A0T3-01 Luminal B +TCGA-A2-A0T4 TCGA-A2-A0T4-01 Luminal B +TCGA-A2-A0YH TCGA-A2-A0YH-01 Luminal B +TCGA-A2-A0YG TCGA-A2-A0YG-01 Luminal B +TCGA-A2-A0EY TCGA-A2-A0EY-01 Luminal B +TCGA-A2-A0D4 TCGA-A2-A0D4-01 Luminal B +TCGA-BH-A0AY TCGA-BH-A0AY-01 Luminal B +TCGA-E2-A107 TCGA-E2-A107-01 Luminal B +TCGA-AO-A0JI TCGA-AO-A0JI-01 Luminal B +TCGA-E2-A10C TCGA-E2-A10C-01 Luminal B +TCGA-E2-A10A TCGA-E2-A10A-01 Luminal B +TCGA-BH-A0C0 TCGA-BH-A0C0-01 Luminal B +TCGA-E2-A109 TCGA-E2-A109-01 Luminal B +TCGA-AO-A0JC TCGA-AO-A0JC-01 Luminal B +TCGA-BH-A0HW TCGA-BH-A0HW-01 Luminal B +TCGA-AO-A0JD TCGA-AO-A0JD-01 Luminal B +TCGA-AO-A0JM TCGA-AO-A0JM-01 Luminal B +TCGA-A2-A0CW TCGA-A2-A0CW-01 Luminal B +TCGA-A2-A0ER TCGA-A2-A0ER-01 Luminal B +TCGA-A2-A0CT TCGA-A2-A0CT-01 Luminal B +TCGA-AO-A12B TCGA-AO-A12B-01 Luminal B +TCGA-A2-A04R TCGA-A2-A04R-01 Luminal B +TCGA-B6-A0IM TCGA-B6-A0IM-01 Luminal B +TCGA-AO-A03P TCGA-AO-A03P-01 Luminal B +TCGA-A1-A0SM TCGA-A1-A0SM-01 Luminal B +TCGA-A8-A06N TCGA-A8-A06N-01 Luminal B +TCGA-A8-A06O TCGA-A8-A06O-01 Luminal B +TCGA-A8-A06Q TCGA-A8-A06Q-01 Luminal B +TCGA-A8-A06R TCGA-A8-A06R-01 Luminal B +TCGA-A8-A06Z TCGA-A8-A06Z-01 Luminal B +TCGA-A8-A079 TCGA-A8-A079-01 Luminal B +TCGA-A8-A07L TCGA-A8-A07L-01 Luminal B +TCGA-A8-A07S TCGA-A8-A07S-01 Luminal B +TCGA-A8-A07W TCGA-A8-A07W-01 Luminal B +TCGA-A8-A07Z TCGA-A8-A07Z-01 Luminal B +TCGA-A8-A082 TCGA-A8-A082-01 Luminal B +TCGA-A8-A084 TCGA-A8-A084-01 Luminal B +TCGA-A8-A085 TCGA-A8-A085-01 Luminal B +TCGA-A8-A08F TCGA-A8-A08F-01 Luminal B +TCGA-A8-A08G TCGA-A8-A08G-01 Luminal B +TCGA-A8-A08I TCGA-A8-A08I-01 Luminal B +TCGA-A8-A08P TCGA-A8-A08P-01 Luminal B +TCGA-A8-A095 TCGA-A8-A095-01 Luminal B +TCGA-A8-A096 TCGA-A8-A096-01 Luminal B +TCGA-A8-A097 TCGA-A8-A097-01 Luminal B +TCGA-A8-A09C TCGA-A8-A09C-01 Luminal B +TCGA-A8-A09D TCGA-A8-A09D-01 Luminal B +TCGA-A8-A09I TCGA-A8-A09I-01 Luminal B +TCGA-A8-A09M TCGA-A8-A09M-01 Luminal B +TCGA-A8-A09N TCGA-A8-A09N-01 Luminal B +TCGA-A8-A09Q TCGA-A8-A09Q-01 Luminal B +TCGA-A8-A09R TCGA-A8-A09R-01 Luminal B +TCGA-A8-A09W TCGA-A8-A09W-01 Luminal B +TCGA-A8-A09Z TCGA-A8-A09Z-01 Luminal B +TCGA-A8-A0A9 TCGA-A8-A0A9-01 Luminal B +TCGA-A8-A0AB TCGA-A8-A0AB-01 Luminal B +TCGA-AN-A03Y TCGA-AN-A03Y-01 Luminal B +TCGA-AN-A041 TCGA-AN-A041-01 Luminal B +TCGA-AN-A049 TCGA-AN-A049-01 Luminal B +TCGA-AN-A0AJ TCGA-AN-A0AJ-01 Luminal B +TCGA-AN-A0AK TCGA-AN-A0AK-01 Luminal B +TCGA-AN-A0AM TCGA-AN-A0AM-01 Luminal B +TCGA-AN-A0AS TCGA-AN-A0AS-01 Luminal B +TCGA-AN-A0FF TCGA-AN-A0FF-01 Luminal B +TCGA-AN-A0FK TCGA-AN-A0FK-01 Luminal B +TCGA-AN-A0FY TCGA-AN-A0FY-01 Luminal B +TCGA-AN-A0XR TCGA-AN-A0XR-01 Luminal B +TCGA-AN-A0XW TCGA-AN-A0XW-01 Luminal B +TCGA-AR-A0TQ TCGA-AR-A0TQ-01 Luminal B +TCGA-AR-A0TT TCGA-AR-A0TT-01 Luminal B +TCGA-AR-A0TV TCGA-AR-A0TV-01 Luminal B +TCGA-AR-A0TZ TCGA-AR-A0TZ-01 Luminal B +TCGA-AR-A0U3 TCGA-AR-A0U3-01 Luminal B +TCGA-AR-A1AV TCGA-AR-A1AV-01 Luminal B +TCGA-BH-A0AU TCGA-BH-A0AU-01 Luminal B +TCGA-BH-A0B5 TCGA-BH-A0B5-01 Luminal B +TCGA-BH-A0BF TCGA-BH-A0BF-01 Luminal B +TCGA-BH-A0BZ TCGA-BH-A0BZ-01 Luminal B +TCGA-BH-A0C3 TCGA-BH-A0C3-01 Luminal B +TCGA-BH-A0C7 TCGA-BH-A0C7-01 Luminal B +TCGA-BH-A0DD TCGA-BH-A0DD-01 Luminal B +TCGA-BH-A0W3 TCGA-BH-A0W3-01 Luminal B +TCGA-BH-A18F TCGA-BH-A18F-01 Luminal B +TCGA-C8-A12M TCGA-C8-A12M-01 Luminal B +TCGA-C8-A12U TCGA-C8-A12U-01 Luminal B +TCGA-C8-A12W TCGA-C8-A12W-01 Luminal B +TCGA-C8-A12X TCGA-C8-A12X-01 Luminal B +TCGA-C8-A1HG TCGA-C8-A1HG-01 Luminal B +TCGA-C8-A1HL TCGA-C8-A1HL-01 Luminal B +TCGA-C8-A1HM TCGA-C8-A1HM-01 Luminal B +TCGA-C8-A1HN TCGA-C8-A1HN-01 Luminal B +TCGA-E2-A14O TCGA-E2-A14O-01 Luminal B +TCGA-E2-A14S TCGA-E2-A14S-01 Luminal B +TCGA-E2-A14W TCGA-E2-A14W-01 Luminal B +TCGA-E2-A155 TCGA-E2-A155-01 Luminal B +TCGA-E2-A15A TCGA-E2-A15A-01 Luminal B +TCGA-E2-A15K TCGA-E2-A15K-01 Luminal B +TCGA-E2-A15L TCGA-E2-A15L-01 Luminal B +TCGA-E2-A15M TCGA-E2-A15M-01 Luminal B +TCGA-E2-A15S TCGA-E2-A15S-01 Luminal B +TCGA-E2-A15T TCGA-E2-A15T-01 Luminal B +TCGA-AO-A03U TCGA-AO-A03U-01 +TCGA-B6-A0IE TCGA-B6-A0IE-01 +TCGA-A2-A0YK TCGA-A2-A0YK-01 +TCGA-E2-A108 TCGA-E2-A108-01 Claudin low +TCGA-AO-A0JB TCGA-AO-A0JB-01 +TCGA-AO-A03R TCGA-AO-A03R-01 +TCGA-AO-A03T TCGA-AO-A03T-01 +TCGA-AR-A1AO TCGA-AR-A1AO-01 Claudin low +TCGA-A2-A0YT TCGA-A2-A0YT-01 Luminal B +TCGA-AQ-A0Y5 TCGA-AQ-A0Y5-01 +TCGA-EW-A1P8 TCGA-EW-A1P8-01 +TCGA-E2-A1LK TCGA-E2-A1LK-01 TCGA-BH-A1EY TCGA-BH-A1EY-01 -TCGA-BH-A1F0 TCGA-BH-A1F0-01 basal-like -TCGA-BH-A1F2 TCGA-BH-A1F2-01 -TCGA-BH-A1F5 TCGA-BH-A1F5-01 -TCGA-BH-A1F6 TCGA-BH-A1F6-01 TCGA-BH-A1F8 TCGA-BH-A1F8-01 -TCGA-BH-A1FB TCGA-BH-A1FB-01 -TCGA-BH-A1FC TCGA-BH-A1FC-01 +TCGA-BH-A1F2 TCGA-BH-A1F2-01 TCGA-BH-A1FD TCGA-BH-A1FD-01 -TCGA-BH-A1FE TCGA-BH-A1FE-01 -TCGA-BH-A1FG TCGA-BH-A1FG-01 TCGA-BH-A1FH TCGA-BH-A1FH-01 -TCGA-BH-A1FJ TCGA-BH-A1FJ-01 -TCGA-BH-A1FL TCGA-BH-A1FL-01 +TCGA-BH-A203 TCGA-BH-A203-01 TCGA-BH-A1FM TCGA-BH-A1FM-01 +TCGA-BH-A1EX TCGA-BH-A1EX-01 +TCGA-BH-A1FL TCGA-BH-A1FL-01 +TCGA-BH-A208 TCGA-BH-A208-01 +TCGA-GM-A2D9 TCGA-GM-A2D9-01 +TCGA-BH-A1FJ TCGA-BH-A1FJ-01 +TCGA-BH-A1EN TCGA-BH-A1EN-01 TCGA-BH-A1FN TCGA-BH-A1FN-01 -TCGA-BH-A1FR TCGA-BH-A1FR-01 TCGA-BH-A1FU TCGA-BH-A1FU-01 -TCGA-BH-A201 TCGA-BH-A201-01 -TCGA-BH-A202 TCGA-BH-A202-01 -TCGA-BH-A203 TCGA-BH-A203-01 +TCGA-BH-A1FE TCGA-BH-A1FE-01 TCGA-BH-A204 TCGA-BH-A204-01 -TCGA-BH-A208 TCGA-BH-A208-01 +TCGA-BH-A1F5 TCGA-BH-A1F5-01 +TCGA-AR-A256 TCGA-AR-A256-01 +TCGA-BH-A1F6 TCGA-BH-A1F6-01 +TCGA-BH-A1FC TCGA-BH-A1FC-01 +TCGA-BH-A1FB TCGA-BH-A1FB-01 +TCGA-BH-A1FG TCGA-BH-A1FG-01 TCGA-BH-A209 TCGA-BH-A209-01 +TCGA-BH-A1FR TCGA-BH-A1FR-01 +TCGA-AO-A1KS TCGA-AO-A1KS-01 +TCGA-A7-A13G TCGA-A7-A13G-01 +TCGA-D8-A1JS TCGA-D8-A1JS-01 +TCGA-A7-A0DC TCGA-A7-A0DC-01 Luminal A +TCGA-D8-A1JT TCGA-D8-A1JT-01 +TCGA-A7-A26E TCGA-A7-A26E-01 +TCGA-D8-A1JH TCGA-D8-A1JH-01 +TCGA-D8-A1JU TCGA-D8-A1JU-01 +TCGA-AO-A1KO TCGA-AO-A1KO-01 +TCGA-AO-A1KT TCGA-AO-A1KT-01 +TCGA-AO-A0J5 TCGA-AO-A0J5-01 Luminal A +TCGA-B6-A1KC TCGA-B6-A1KC-01 +TCGA-AO-A1KQ TCGA-AO-A1KQ-01 +TCGA-B6-A1KI TCGA-B6-A1KI-01 +TCGA-AO-A1KP TCGA-AO-A1KP-01 +TCGA-B6-A1KF TCGA-B6-A1KF-01 +TCGA-B6-A1KN TCGA-B6-A1KN-01 +TCGA-D8-A1XO TCGA-D8-A1XO-01 +TCGA-D8-A1XT TCGA-D8-A1XT-01 +TCGA-A1-A0SP TCGA-A1-A0SP-01 +TCGA-D8-A1J8 TCGA-D8-A1J8-01 +TCGA-D8-A1JF TCGA-D8-A1JF-01 +TCGA-D8-A1JG TCGA-D8-A1JG-01 +TCGA-D8-A1XS TCGA-D8-A1XS-01 +TCGA-A1-A0SB TCGA-A1-A0SB-01 +TCGA-A1-A0SB TCGA-A1-A0SB-02 +TCGA-A1-A0SF TCGA-A1-A0SF-01 +TCGA-A1-A0SG TCGA-A1-A0SG-01 +TCGA-A1-A0SI TCGA-A1-A0SI-01 +TCGA-A1-A0SN TCGA-A1-A0SN-01 +TCGA-A1-A0SQ TCGA-A1-A0SQ-01 +TCGA-A2-A1FV TCGA-A2-A1FV-01 +TCGA-A2-A1FW TCGA-A2-A1FW-01 +TCGA-A2-A1FX TCGA-A2-A1FX-01 +TCGA-A2-A1FZ TCGA-A2-A1FZ-01 +TCGA-A2-A1G0 TCGA-A2-A1G0-01 +TCGA-A2-A1G1 TCGA-A2-A1G1-01 +TCGA-A2-A1G4 TCGA-A2-A1G4-01 +TCGA-A2-A1G6 TCGA-A2-A1G6-01 +TCGA-A2-A259 TCGA-A2-A259-01 +TCGA-A2-A25A TCGA-A2-A25A-01 +TCGA-A2-A25B TCGA-A2-A25B-01 +TCGA-A2-A25C TCGA-A2-A25C-01 +TCGA-A2-A25D TCGA-A2-A25D-01 +TCGA-A2-A25E TCGA-A2-A25E-01 +TCGA-A2-A25F TCGA-A2-A25F-01 +TCGA-A7-A26F TCGA-A7-A26F-01 +TCGA-A7-A26G TCGA-A7-A26G-01 +TCGA-A7-A26H TCGA-A7-A26H-01 +TCGA-A7-A26I TCGA-A7-A26I-01 +TCGA-A7-A26J TCGA-A7-A26J-01 +TCGA-A8-A08S TCGA-A8-A08S-01 Luminal B +TCGA-A8-A09E TCGA-A8-A09E-01 Luminal B +TCGA-A8-A09K TCGA-A8-A09K-01 Luminal B +TEST-A23C TEST-A23C-01 +TEST-A23E TEST-A23E-01 +TEST-A23H TEST-A23H-01 +TCGA-AO-A1KR TCGA-AO-A1KR-01 +TCGA-AQ-A1H2 TCGA-AQ-A1H2-01 +TCGA-AQ-A1H3 TCGA-AQ-A1H3-01 +TCGA-AR-A24H TCGA-AR-A24H-01 +TCGA-AR-A24K TCGA-AR-A24K-01 +TCGA-AR-A24L TCGA-AR-A24L-01 +TCGA-AR-A24M TCGA-AR-A24M-01 +TCGA-AR-A24N TCGA-AR-A24N-01 +TCGA-AR-A24O TCGA-AR-A24O-01 +TCGA-AR-A24P TCGA-AR-A24P-01 +TCGA-AR-A24Q TCGA-AR-A24Q-01 +TCGA-AR-A24R TCGA-AR-A24R-01 +TCGA-AR-A24S TCGA-AR-A24S-01 +TCGA-AR-A24T TCGA-AR-A24T-01 +TCGA-AR-A24U TCGA-AR-A24U-01 +TCGA-AR-A24V TCGA-AR-A24V-01 +TCGA-AR-A24X TCGA-AR-A24X-01 +TCGA-AR-A24Z TCGA-AR-A24Z-01 +TCGA-AR-A250 TCGA-AR-A250-01 +TCGA-AR-A251 TCGA-AR-A251-01 +TCGA-AR-A252 TCGA-AR-A252-01 +TCGA-AR-A254 TCGA-AR-A254-01 +TCGA-AR-A255 TCGA-AR-A255-01 +TCGA-BH-A0B2 TCGA-BH-A0B2-01 Luminal A +TCGA-BH-A0DV TCGA-BH-A0DV-01 +TCGA-BH-A201 TCGA-BH-A201-01 +TCGA-BH-A202 TCGA-BH-A202-01 TCGA-BH-A28Q TCGA-BH-A28Q-01 -TCGA-C8-A12K TCGA-C8-A12K-01 basal-like -TCGA-C8-A12L TCGA-C8-A12L-01 Her2 enriched -TCGA-C8-A12M TCGA-C8-A12M-01 Luminal B -TCGA-C8-A12N TCGA-C8-A12N-01 Luminal A -TCGA-C8-A12O TCGA-C8-A12O-01 Luminal A -TCGA-C8-A12P TCGA-C8-A12P-01 Her2 enriched -TCGA-C8-A12Q TCGA-C8-A12Q-01 Her2 enriched -TCGA-C8-A12T TCGA-C8-A12T-01 Her2 enriched -TCGA-C8-A12U TCGA-C8-A12U-01 Luminal B -TCGA-C8-A12V TCGA-C8-A12V-01 basal-like -TCGA-C8-A12W TCGA-C8-A12W-01 Luminal B -TCGA-C8-A12X TCGA-C8-A12X-01 Luminal B -TCGA-C8-A12Y TCGA-C8-A12Y-01 Luminal A -TCGA-C8-A12Z TCGA-C8-A12Z-01 Her2 enriched -TCGA-C8-A130 TCGA-C8-A130-01 Her2 enriched -TCGA-C8-A131 TCGA-C8-A131-01 basal-like -TCGA-C8-A132 TCGA-C8-A132-01 Luminal A -TCGA-C8-A133 TCGA-C8-A133-01 Luminal A -TCGA-C8-A134 TCGA-C8-A134-01 basal-like -TCGA-C8-A135 TCGA-C8-A135-01 Her2 enriched -TCGA-C8-A137 TCGA-C8-A137-01 Her2 enriched -TCGA-C8-A138 TCGA-C8-A138-01 Her2 enriched TCGA-C8-A1HE TCGA-C8-A1HE-01 -TCGA-C8-A1HF TCGA-C8-A1HF-01 Her2 enriched -TCGA-C8-A1HG TCGA-C8-A1HG-01 Luminal B -TCGA-C8-A1HI TCGA-C8-A1HI-01 Luminal A TCGA-C8-A1HJ TCGA-C8-A1HJ-01 TCGA-C8-A1HK TCGA-C8-A1HK-01 -TCGA-C8-A1HL TCGA-C8-A1HL-01 Luminal B -TCGA-C8-A1HM TCGA-C8-A1HM-01 Luminal B -TCGA-C8-A1HN TCGA-C8-A1HN-01 Luminal B TCGA-C8-A1HO TCGA-C8-A1HO-01 TCGA-C8-A26V TCGA-C8-A26V-01 TCGA-C8-A26W TCGA-C8-A26W-01 @@ -576,25 +653,13 @@ TCGA-C8-A275 TCGA-C8-A275-01 TCGA-C8-A278 TCGA-C8-A278-01 TCGA-C8-A27A TCGA-C8-A27A-01 TCGA-C8-A27B TCGA-C8-A27B-01 -TCGA-D8-A13Y TCGA-D8-A13Y-01 Luminal B -TCGA-D8-A13Z TCGA-D8-A13Z-01 Her2 enriched -TCGA-D8-A140 TCGA-D8-A140-01 Luminal B -TCGA-D8-A141 TCGA-D8-A141-01 Luminal A -TCGA-D8-A142 TCGA-D8-A142-01 basal-like -TCGA-D8-A143 TCGA-D8-A143-01 -TCGA-D8-A145 TCGA-D8-A145-01 Luminal A TCGA-D8-A146 TCGA-D8-A146-01 Luminal A -TCGA-D8-A147 TCGA-D8-A147-01 basal-like -TCGA-D8-A1J8 TCGA-D8-A1J8-01 TCGA-D8-A1J9 TCGA-D8-A1J9-01 TCGA-D8-A1JA TCGA-D8-A1JA-01 TCGA-D8-A1JB TCGA-D8-A1JB-01 TCGA-D8-A1JC TCGA-D8-A1JC-01 TCGA-D8-A1JD TCGA-D8-A1JD-01 TCGA-D8-A1JE TCGA-D8-A1JE-01 -TCGA-D8-A1JF TCGA-D8-A1JF-01 -TCGA-D8-A1JG TCGA-D8-A1JG-01 -TCGA-D8-A1JH TCGA-D8-A1JH-01 TCGA-D8-A1JI TCGA-D8-A1JI-01 TCGA-D8-A1JJ TCGA-D8-A1JJ-01 TCGA-D8-A1JK TCGA-D8-A1JK-01 @@ -602,9 +667,6 @@ TCGA-D8-A1JL TCGA-D8-A1JL-01 TCGA-D8-A1JM TCGA-D8-A1JM-01 TCGA-D8-A1JN TCGA-D8-A1JN-01 TCGA-D8-A1JP TCGA-D8-A1JP-01 -TCGA-D8-A1JS TCGA-D8-A1JS-01 -TCGA-D8-A1JT TCGA-D8-A1JT-01 -TCGA-D8-A1JU TCGA-D8-A1JU-01 TCGA-D8-A1X5 TCGA-D8-A1X5-01 TCGA-D8-A1X6 TCGA-D8-A1X6-01 TCGA-D8-A1X7 TCGA-D8-A1X7-01 @@ -620,11 +682,8 @@ TCGA-D8-A1XJ TCGA-D8-A1XJ-01 TCGA-D8-A1XK TCGA-D8-A1XK-01 TCGA-D8-A1XL TCGA-D8-A1XL-01 TCGA-D8-A1XM TCGA-D8-A1XM-01 -TCGA-D8-A1XO TCGA-D8-A1XO-01 TCGA-D8-A1XQ TCGA-D8-A1XQ-01 TCGA-D8-A1XR TCGA-D8-A1XR-01 -TCGA-D8-A1XS TCGA-D8-A1XS-01 -TCGA-D8-A1XT TCGA-D8-A1XT-01 TCGA-D8-A1XU TCGA-D8-A1XU-01 TCGA-D8-A1XV TCGA-D8-A1XV-01 TCGA-D8-A1XW TCGA-D8-A1XW-01 @@ -648,62 +707,6 @@ TCGA-D8-A27R TCGA-D8-A27R-01 TCGA-D8-A27T TCGA-D8-A27T-01 TCGA-D8-A27V TCGA-D8-A27V-01 TCGA-D8-A27W TCGA-D8-A27W-01 -TCGA-E2-A105 TCGA-E2-A105-01 Luminal A -TCGA-E2-A106 TCGA-E2-A106-01 Luminal A -TCGA-E2-A107 TCGA-E2-A107-01 Luminal B -TCGA-E2-A108 TCGA-E2-A108-01 Claudin low -TCGA-E2-A109 TCGA-E2-A109-01 Luminal B -TCGA-E2-A10A TCGA-E2-A10A-01 Luminal B -TCGA-E2-A10B TCGA-E2-A10B-01 Luminal A -TCGA-E2-A10C TCGA-E2-A10C-01 Luminal B -TCGA-E2-A10E TCGA-E2-A10E-01 Luminal A -TCGA-E2-A10F TCGA-E2-A10F-01 Luminal A -TCGA-E2-A14N TCGA-E2-A14N-01 basal-like -TCGA-E2-A14O TCGA-E2-A14O-01 Luminal B -TCGA-E2-A14P TCGA-E2-A14P-01 Her2 enriched -TCGA-E2-A14Q TCGA-E2-A14Q-01 Luminal A -TCGA-E2-A14R TCGA-E2-A14R-01 basal-like -TCGA-E2-A14S TCGA-E2-A14S-01 Luminal B -TCGA-E2-A14T TCGA-E2-A14T-01 Luminal A -TCGA-E2-A14V TCGA-E2-A14V-01 Her2 enriched -TCGA-E2-A14W TCGA-E2-A14W-01 Luminal B -TCGA-E2-A14X TCGA-E2-A14X-01 basal-like -TCGA-E2-A14Y TCGA-E2-A14Y-01 basal-like -TCGA-E2-A14Z TCGA-E2-A14Z-01 Luminal A -TCGA-E2-A150 TCGA-E2-A150-01 basal-like -TCGA-E2-A152 TCGA-E2-A152-01 Her2 enriched -TCGA-E2-A153 TCGA-E2-A153-01 Luminal A -TCGA-E2-A154 TCGA-E2-A154-01 Luminal A -TCGA-E2-A155 TCGA-E2-A155-01 Luminal B -TCGA-E2-A156 TCGA-E2-A156-01 Luminal A -TCGA-E2-A158 TCGA-E2-A158-01 basal-like -TCGA-E2-A159 TCGA-E2-A159-01 basal-like -TCGA-E2-A15A TCGA-E2-A15A-01 Luminal B -TCGA-E2-A15C TCGA-E2-A15C-01 Luminal A -TCGA-E2-A15D TCGA-E2-A15D-01 Luminal A -TCGA-E2-A15E TCGA-E2-A15E-01 Luminal A -TCGA-E2-A15E TCGA-E2-A15E-06 -TCGA-E2-A15F TCGA-E2-A15F-01 Luminal A -TCGA-E2-A15G TCGA-E2-A15G-01 Luminal A -TCGA-E2-A15H TCGA-E2-A15H-01 Luminal A -TCGA-E2-A15I TCGA-E2-A15I-01 Luminal A -TCGA-E2-A15J TCGA-E2-A15J-01 Luminal A -TCGA-E2-A15K TCGA-E2-A15K-01 Luminal B -TCGA-E2-A15L TCGA-E2-A15L-01 Luminal B -TCGA-E2-A15M TCGA-E2-A15M-01 Luminal B -TCGA-E2-A15O TCGA-E2-A15O-01 Luminal A -TCGA-E2-A15P TCGA-E2-A15P-01 Luminal A -TCGA-E2-A15R TCGA-E2-A15R-01 Luminal A -TCGA-E2-A15S TCGA-E2-A15S-01 Luminal B -TCGA-E2-A15T TCGA-E2-A15T-01 Luminal B -TCGA-E2-A1AZ TCGA-E2-A1AZ-01 -TCGA-E2-A1B0 TCGA-E2-A1B0-01 Her2 enriched -TCGA-E2-A1B1 TCGA-E2-A1B1-01 Luminal A -TCGA-E2-A1B4 TCGA-E2-A1B4-01 Luminal A -TCGA-E2-A1B5 TCGA-E2-A1B5-01 basal-like -TCGA-E2-A1B6 TCGA-E2-A1B6-01 Luminal A -TCGA-E2-A1BC TCGA-E2-A1BC-01 Luminal A -TCGA-E2-A1BD TCGA-E2-A1BD-01 Luminal A TCGA-E2-A1IE TCGA-E2-A1IE-01 TCGA-E2-A1IF TCGA-E2-A1IF-01 TCGA-E2-A1IG TCGA-E2-A1IG-01 @@ -725,7 +728,6 @@ TCGA-E2-A1LB TCGA-E2-A1LB-01 TCGA-E2-A1LG TCGA-E2-A1LG-01 TCGA-E2-A1LH TCGA-E2-A1LH-01 TCGA-E2-A1LI TCGA-E2-A1LI-01 -TCGA-E2-A1LK TCGA-E2-A1LK-01 TCGA-E2-A1LL TCGA-E2-A1LL-01 TCGA-E2-A1LS TCGA-E2-A1LS-01 TCGA-E9-A1N3 TCGA-E9-A1N3-01 @@ -776,7 +778,6 @@ TCGA-E9-A247 TCGA-E9-A247-01 TCGA-E9-A248 TCGA-E9-A248-01 TCGA-E9-A249 TCGA-E9-A249-01 TCGA-E9-A24A TCGA-E9-A24A-01 -TCGA-E9-A295 TCGA-E9-A295-01 TCGA-EW-A1IW TCGA-EW-A1IW-01 TCGA-EW-A1IX TCGA-EW-A1IX-01 TCGA-EW-A1IY TCGA-EW-A1IY-01 @@ -798,7 +799,6 @@ TCGA-EW-A1P4 TCGA-EW-A1P4-01 TCGA-EW-A1P5 TCGA-EW-A1P5-01 TCGA-EW-A1P6 TCGA-EW-A1P6-01 TCGA-EW-A1P7 TCGA-EW-A1P7-01 -TCGA-EW-A1P8 TCGA-EW-A1P8-01 TCGA-EW-A1PA TCGA-EW-A1PA-01 TCGA-EW-A1PB TCGA-EW-A1PB-01 TCGA-EW-A1PD TCGA-EW-A1PD-01 @@ -809,8 +809,6 @@ TCGA-EW-A1PH TCGA-EW-A1PH-01 TCGA-EW-A2FS TCGA-EW-A2FS-01 TCGA-EW-A2FV TCGA-EW-A2FV-01 TCGA-EW-A2FW TCGA-EW-A2FW-01 -TCGA-GI-A2C8 TCGA-GI-A2C8-01 -TCGA-GM-A2D9 TCGA-GM-A2D9-01 TCGA-GM-A2DA TCGA-GM-A2DA-01 TCGA-GM-A2DB TCGA-GM-A2DB-01 TCGA-GM-A2DC TCGA-GM-A2DC-01 @@ -823,13 +821,16 @@ TCGA-GM-A2DL TCGA-GM-A2DL-01 TCGA-GM-A2DM TCGA-GM-A2DM-01 TCGA-GM-A2DN TCGA-GM-A2DN-01 TCGA-GM-A2DO TCGA-GM-A2DO-01 +TCGA-AR-A24W TCGA-AR-A24W-01 +TEST-A2B8 TEST-A2B8-01 +TEST-A2FF TEST-A2FF-01 +TEST-A2FB TEST-A2FB-01 +TEST-A2FG TEST-A2FG-01 +TCGA-GI-A2C8 TCGA-GI-A2C8-01 +TCGA-E9-A295 TCGA-E9-A295-01 +TCGA-E2-A15E TCGA-E2-A15E-06 +TCGA-A2-A0T2 TCGA-A2-A0T2-01 TEST_PATIENT_1 TEST_SAMPLE_1 -TEST_PATIENT_10 TEST_SAMPLE_10 -TEST_PATIENT_11 TEST_SAMPLE_11 -TEST_PATIENT_12 TEST_SAMPLE_12 -TEST_PATIENT_13 TEST_SAMPLE_13 -TEST_PATIENT_14 TEST_SAMPLE_14 -TEST_PATIENT_15 TEST_SAMPLE_15 TEST_PATIENT_2 TEST_SAMPLE_2 TEST_PATIENT_3 TEST_SAMPLE_3 TEST_PATIENT_4 TEST_SAMPLE_4 @@ -838,13 +839,12 @@ TEST_PATIENT_6 TEST_SAMPLE_6 TEST_PATIENT_7 TEST_SAMPLE_7 TEST_PATIENT_8 TEST_SAMPLE_8 TEST_PATIENT_9 TEST_SAMPLE_9 -TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HETEROZYGOUS +TEST_PATIENT_10 TEST_SAMPLE_10 +TEST_PATIENT_11 TEST_SAMPLE_11 +TEST_PATIENT_12 TEST_SAMPLE_12 +TEST_PATIENT_13 TEST_SAMPLE_13 +TEST_PATIENT_14 TEST_SAMPLE_14 +TEST_PATIENT_15 TEST_SAMPLE_15 TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HOMOZYGOUS +TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_HETEROZYGOUS TEST_PATIENT_NAMESPACE TEST_SAMPLE_SOMATIC_UNDEFINED -TEST-A23C TEST-A23C-01 -TEST-A23E TEST-A23E-01 -TEST-A23H TEST-A23H-01 -TEST-A2B8 TEST-A2B8-01 -TEST-A2FB TEST-A2FB-01 -TEST-A2FF TEST-A2FF-01 -TEST-A2FG TEST-A2FG-01 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt new file mode 100644 index 00000000000..7274cc65e91 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt @@ -0,0 +1,3 @@ +ENTITY_STABLE_ID description name TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SD-01 +test_patient_generic_assay_1 0.370266873 0.370266873 0.010373016 +test_patient_generic_assay_2 test_patient_generic_assay_2 test_patient_generic_assay_2 0.002709404 0.002709404 0.009212318 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt new file mode 100644 index 00000000000..63bc2d5755b --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt @@ -0,0 +1,61 @@ +ENTITY_STABLE_ID confidenceStatement description name TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 +mean_1 0.370266873 0.010373016 0.005419294 0.022753384 0.037687823 0.016708976 0.100042446 0.104214723 +mean_10 Signature 10, the POLE signature, is detected in this case. It is associated with functions to the exonucleus domain of the POLE gene and enormous mutational burden. Oftentimes MMR signatures 6, 14,16, 20,21 and 26 co-occur with the POLE signature. mean_10 mean_10 0.002709404 0.009212318 0.002650657 0.005475484 0.074175715 0.033049207 0.027323826 0.008861145 +mean_11 Signature 11, the Temozolomide (TMZ) signature, is detected in this case. mean_11 mean_11 0.006035782 0.010095773 0.011926486 0.010637541 0.012168938 0.006641113 0.025730547 0.020463421 +mean_12 Signature 12 is detected in this case. We are not confident that we are able to detect signature 9 in the IMPACT cohort. In the literature it is found in liver cancer. mean_12 mean_12 0.026432791 0.012953054 0.002587003 0.02225923 0.031026708 0.01642898 0.022392184 0.013437576 +mean_13 Signature 13, the APOBEC signature, is detected in this case. This signature often coccurs with signature 2, the other APOBEC signature. mean_13 mean_13 0.002533773 0.012080707 0.06750656 0.403672528 0.011124 0.007631916 0.018970187 0.006076126 +mean_14 Signature 14, the signature of simultaneous MMR and POLE dysfunction is detected in this case. This signature usually occurs in cases with the POLE signature (signature 10) and other MMR signatures (6, 15, 20, 21 26). mean_14 mean_14 0.006562519 0.009705064 0.005008429 0.01169992 0.02000342 0.014500145 0.034613722 0.030906098 +mean_15 Signature 15, a MMR signature, is detected in this case. It is usually associated with high mutational burden. mean_15 mean_15 0.011970661 0.013967505 0.003583145 0.066176992 0.024139531 0.012422269 0.035150854 0.024233274 +mean_16 Signature 16 is detected in this case. We are not confident that we are able to detect signature 16 in the IMPACT cohort. In the literature it is associated with Liver cancer and alcohol consumption. mean_16 mean_16 0.018075581 0.016174795 0.004085478 0.044836595 0.021500178 0.033960161 0.017962899 0.018849434 +mean_17 Signature 17 is detected in this case. The aetiology of this signature is unknown. It is predominantly found in gastric cancers. mean_17 mean_17 0.004132642 0.017328434 0.001582939 0.00748642 0.018217142 0.008715209 0.029658706 0.021823903 +mean_18 Signature 18 is detected in this case. This signature is associated with MUTYH dysfunction and neuroblastoma. mean_18 mean_18 0.005101312 0.027691339 0.078176692 0.007035636 0.016781154 0.226542324 0.030862216 0.05876765 +mean_19 Signature 19 is detected in this case. We are not confident that we are able to detect signature 19 in the IMPACT cohort. mean_19 mean_19 0.018196853 0.016768977 0.010922822 0.014000266 0.011772131 0.011231503 0.035316214 0.094947481 +mean_2 Signature 2, the APOBEC signature, is detected in this case. This signature often coccurs with signature 13, the other APOBEC signature. mean_2 mean_2 0.002663685 0.009194336 0.003716748 0.067693367 0.019050891 0.008820839 0.024258107 0.005814542 +mean_20 Signature 20 is detected in this case. This signature is associated with MMR and usually occurs in cases with the POLE signature (signature 10) and other MMR signatures (6, 14, 15, 21, 26). mean_20 mean_20 0.03066836 0.012905178 0.003569324 0.014119672 0.022474579 0.014813438 0.055457368 0.030155165 +mean_21 Signature 21 is detected in this case. This signature is associated with MMR and usually co-occurs with other MMR signatures (6, 14, 15, 21, 26). mean_21 mean_21 0.010964959 0.011272353 0.002258851 0.051853446 0.281501917 0.01281546 0.044179589 0.008190074 +mean_22 Signature 22 is detected in this case. We are not confident that we are able to detect signature 22 in the IMPACT cohort. In the literature it is associated with exposure to Aristolochic Acid. mean_22 mean_22 0.028491957 0.010217024 0.004586289 0.011222009 0.019770493 0.008535491 0.024637853 0.020913163 +mean_23 Signature 23 is detected in this case. We are not confident that we are able to detect signature 23 in the IMPACT cohort. mean_23 mean_23 0.00396734 0.010046981 0.01277244 0.007964559 0.011004478 0.008391836 0.034836096 0.03286779 +mean_24 Signature 24 is detected in this case. We are not confident that we are able to detect signature 24 in the IMPACT cohort. In the literature it is associated with aflatoxin exposure. In our cohort we believe it is detected by accident in cases with the smoking signature (signature 4). mean_24 mean_24 0.032792827 0.078245387 0.066150339 0.014742662 0.017324086 0.061761186 0.017605536 0.051708779 +mean_25 Signature 25 is detected in this case. We are not confident that we are able to detect signature 25 in the IMPACT cohort. mean_25 mean_25 0.011646217 0.048154399 0.03076214 0.013605822 0.038587852 0.013944057 0.023546505 0.037501919 +mean_26 Signature 26 is detected in this case. This signature is associated with MMR and usually co-occurs with other MMR signatures (6, 14, 15, 20, 21). mean_26 mean_26 0.015537112 0.013825612 0.002464907 0.028813826 0.070298683 0.01999462 0.030799083 0.009143951 +mean_27 Signature 27 is detected in this case. We are not confident that we are able to detect signature 27 in the IMPACT cohort. mean_27 mean_27 0.003465676 0.012766477 0.004909123 0.00658944 0.010038977 0.008511252 0.023474418 0.009076485 +mean_28 Signature 28 is detected in this case. We are not confident that we are able to detect signature 28 in the IMPACT cohort. It often co-occurs with signature 28. mean_28 mean_28 0.003755223 0.011667726 0.001739293 0.005067195 0.012723938 0.007772049 0.021565925 0.007837668 +mean_29 Signature 29, the mutational signature of chewing tobacco is detected in this case. mean_29 mean_29 0.010813509 0.013306168 0.034629865 0.011708457 0.01498353 0.042949985 0.030807758 0.04361619 +mean_3 Signature 3, the signature of Homologous Recombination Repair deficiency is detected in this case. This signature is most commonly associated with BRCA mutations. mean_3 mean_3 0.012076334 0.399378181 0.058149399 0.024712129 0.022463858 0.069775315 0.022253226 0.023919542 +mean_30 Signature 30 is detected in this case. We are not confident that we are able to detect signature 30 in the IMPACT cohort. mean_30 mean_30 0.021187235 0.019180665 0.007104322 0.015637667 0.021432941 0.020436345 0.036460701 0.022300431 +mean_4 Signature 4, the smoking signature is detected in this case. mean_4 mean_4 0.02998631 0.05161966 0.066550323 0.017921856 0.016096543 0.179497941 0.024659786 0.097992724 +mean_5 Signature 5 is detected in this case. We are not confident that we are able to detect signature 5 in the IMPACT cohort. It is a 'flat' signature--when it is detected it is more likely to be an artefact. In the literature it is associated with age. mean_5 mean_5 0.065346508 0.065105663 0.005317173 0.039082099 0.025806853 0.071908149 0.028765511 0.030413987 +mean_6 Signature 6, a MMR signature, is detected in this case. It is usually associated with high mutational burden. This signature often co-occurs with other MMR signatures (14, 15, 20, 21 26). mean_6 mean_6 0.215904676 0.009298163 0.004855268 0.020464262 0.030032579 0.01055262 0.094946543 0.100148333 +mean_7 Signature 7, the UV light signature, is detected in this case. mean_7 mean_7 0.008428142 0.011008883 0.009634254 0.010727403 0.037470752 0.007375711 0.036357093 0.025096172 +mean_8 Signature 8 is detected in this case. We are not confident that we are able to detect signature 8 in the IMPACT cohort. It is a 'flat' signature--when it is detected it is more likely to be an artefact. In the literature it is associated with HRD defects. mean_8 mean_8 0.009033066 0.04154581 0.483003282 0.014265047 0.029063134 0.028977736 0.026974185 0.031083861 +mean_9 Signature 9 is detected in this case. We are not confident that we are able to detect signature 9 in the IMPACT cohort. In the literature it is associated with POLH. mean_9 mean_9 0.011252674 0.014910352 0.004377151 0.007775086 0.021277177 0.015334168 0.020390915 0.009638392 +confidence_1 NA confidence_1 confidence_1 0.653 0.066 0.05 0.129 0.1415 0.079 0.234 0.274 +confidence_10 NA confidence_10 confidence_10 0.0235 0.0645 0.022 0.0465 0.2595 0.1505 0.1 0.062 +confidence_11 NA confidence_11 confidence_11 0.0465 0.067 0.115 0.0775 0.0745 0.0535 0.0995 0.098 +confidence_12 NA confidence_12 confidence_12 0.1375 0.068 0.024 0.1275 0.1165 0.0945 0.09 0.074 +confidence_13 NA confidence_13 confidence_13 0.0185 0.0685 0.5655 0.936 0.0665 0.052 0.083 0.0515 +confidence_14 NA confidence_14 confidence_14 0.054 0.067 0.0405 0.0785 0.0845 0.0755 0.119 0.1415 +confidence_15 NA confidence_15 confidence_15 0.0745 0.0745 0.034 0.284 0.092 0.0745 0.1185 0.1215 +confidence_16 NA confidence_16 confidence_16 0.1025 0.0795 0.031 0.196 0.1 0.139 0.0815 0.0895 +confidence_17 NA confidence_17 confidence_17 0.036 0.0825 0.011 0.0605 0.094 0.0555 0.11 0.1105 +confidence_18 NA confidence_18 confidence_18 0.0445 0.1105 0.297 0.0615 0.069 0.434 0.1055 0.1965 +confidence_19 NA confidence_19 confidence_19 0.0955 0.073 0.0885 0.086 0.0725 0.065 0.114 0.2685 +confidence_2 NA confidence_2 confidence_2 0.0235 0.0525 0.0325 0.293 0.0945 0.057 0.1015 0.0415 +confidence_20 NA confidence_20 confidence_20 0.14 0.0745 0.0305 0.0835 0.101 0.0725 0.1505 0.1325 +confidence_21 NA confidence_21 confidence_21 0.0725 0.072 0.0215 0.24 0.5255 0.09 0.131 0.0635 +confidence_22 NA confidence_22 confidence_22 0.2335 0.0685 0.0415 0.09 0.0865 0.063 0.103 0.126 +confidence_23 NA confidence_23 confidence_23 0.0365 0.0605 0.12 0.0635 0.064 0.0615 0.112 0.1525 +confidence_24 NA confidence_24 confidence_24 0.1975 0.1925 0.297 0.0905 0.081 0.215 0.08 0.195 +confidence_25 NA confidence_25 confidence_25 0.0695 0.134 0.132 0.083 0.123 0.079 0.094 0.1365 +confidence_26 NA confidence_26 confidence_26 0.0955 0.073 0.023 0.1475 0.183 0.0995 0.109 0.067 +confidence_27 NA confidence_27 confidence_27 0.0305 0.0795 0.05 0.053 0.0675 0.0605 0.0955 0.064 +confidence_28 NA confidence_28 confidence_28 0.0325 0.077 0.0135 0.044 0.0785 0.0555 0.1 0.0605 +confidence_29 NA confidence_29 confidence_29 0.0835 0.0725 0.172 0.074 0.08 0.138 0.111 0.164 +confidence_3 NA confidence_3 confidence_3 0.083 0.629 0.1835 0.12 0.101 0.21 0.0845 0.1215 +confidence_30 NA confidence_30 confidence_30 0.123 0.096 0.0625 0.091 0.0995 0.107 0.1145 0.107 +confidence_4 NA confidence_4 confidence_4 0.1685 0.1485 0.2155 0.1005 0.08 0.382 0.0995 0.2815 +confidence_5 NA confidence_5 confidence_5 0.218 0.1645 0.0445 0.1665 0.1045 0.187 0.114 0.1155 +confidence_6 NA confidence_6 confidence_6 0.4325 0.062 0.043 0.1275 0.113 0.069 0.2225 0.2885 +confidence_7 NA confidence_7 confidence_7 0.0705 0.075 0.0975 0.0765 0.137 0.0545 0.1105 0.1225 +confidence_8 NA confidence_8 confidence_8 0.07 0.132 0.859 0.0935 0.106 0.123 0.106 0.131 +confidence_9 NA confidence_9 confidence_9 0.081 0.0775 0.033 0.0615 0.0845 0.082 0.09 0.064 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt new file mode 100644 index 00000000000..ae8493a425e --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt @@ -0,0 +1,10 @@ +ENTITY_STABLE_ID DESCRIPTION NAME URL TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 +17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 +AEW541 Desc of AEW541 Name of AEW541 Url of AEW541 > 8 2.329924107 2.68212986 5.002314091 1.736181378 4.260821819 > 8 7.613147736 +AZD0530 Desc of AZD0530 Name of AZD0530 Url of AZD0530 > 8 > 8 4.597949505 3.192236662 > 8 7.261883259 1.071310043 > 8 +AZD6244 Desc of AZD6244 Name of AZD6244 Url of AZD6244 > 8 > 8 > 8 > 8 > 8 > 8 > 8 > 8 +Erlotinib Desc of Erlotinib Name of Erlotinib Url of Erlotinib > 8 > 8 > 8 2.439512491 > 8 4.232964516 2.325097322 > 8 +Irinotecan Desc of Irinotecan Name of Irinotecan Url of Irinotecan NA 0.080764666 NA 0.06704437 0.069568723 0.034992039 0.740817904 0.209220141 +L-685458 Desc of L-685458 Name of L-685458 Url of L-685458 > 8 > 8 3.267752409 > 8 > 8 0.332892686 > 8 > 8 +Lapatinib Desc of Lapatinib Name of Lapatinib Url of Lapatinib > 8 7.847305298 > 8 2.30776763 > 8 0.849476227 1.057461143 7.178035259 +Nilotinib NA > 8 NA 7.475354671 > 8 1.910434365 > 8 > 8 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt new file mode 100644 index 00000000000..410ec33ccd7 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt @@ -0,0 +1,10 @@ +ENTITY_STABLE_ID DESCRIPTION NAME URL TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 +17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 +AEW541 Desc of AEW541 Name of AEW541 Url of AEW541 >8 2.329924107 2.68212986 5.002314091 1.736181378 4.260821819 >8 7.613147736 +AZD0530 Desc of AZD0530 Name of AZD0530 Url of AZD0530 >8 >8 4.597949505 3.192236662 >8 7.261883259 0.123 >8 +AZD6244 Desc of AZD6244 Name of AZD6244 Url of AZD6244 >8 >8 >8 >8 >8 >8 >8 >8 +Erlotinib Desc of Erlotinib Name of Erlotinib Url of Erlotinib >8 >8 >8 2.439512491 >8 4.232964516 2.325097322 >8 +Irinotecan Desc of Irinotecan Name of Irinotecan Url of Irinotecan NA 0.080764666 NA 0.06704437 0.069568723 0.034992039 0.740817904 0.209220141 +L-685458 Desc of L-685458 Name of L-685458 Url of L-685458 >8 >8 3.267752409 >8 >8 0.332892686 >8 >8 +Lapatinib Desc of Lapatinib Name of Lapatinib Url of Lapatinib >8 7.847305298 >8 2.30776763 >8 0.849476227 1.057461143 7.178035259 +Nilotinib NA >8 NA 7.475354671 >8 1.910434365 >8 >8 diff --git a/test/test_data/study_es_0_import_export/data_mrna_expression_continuous_mrna.txt b/test/test_data/study_es_0_import_export/data_mrna_expression_continuous_mrna.txt new file mode 100644 index 00000000000..a0cc43a1a0f --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_mrna_expression_continuous_mrna.txt @@ -0,0 +1,7 @@ +Hugo_Symbol Entrez_Gene_Id TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0CY-01 TCGA-A2-A0CZ-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07C-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09K-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0G0-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XP-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12C-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TU-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AT-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I6-01 TCGA-B6-A0I8-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IG-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B1-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B8-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HF-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HL-01 TCGA-BH-A0HN-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HQ-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0HY-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1F0-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12O-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A140-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-E2-A105-01 TCGA-E2-A106-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14T-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15C-01 TCGA-E2-A15D-01 TCGA-E2-A15F-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A15S-01 TCGA-E2-A15T-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 +ZHX3 23051 0.0433333333333333 -0.0436666666666667 0.4205 0.251 -1.3315 0.0598333333333333 -0.9075 -1.09066666666667 -0.183666666666667 -0.253833333333333 -0.603333333333333 -0.356666666666667 -0.549166666666667 -0.13 -0.0201666666666667 0.386333333333333 -0.450333333333333 -0.18 -0.0393333333333333 -0.471 0.08 -0.00700000000000001 -0.166166666666667 0.0711666666666667 -0.419333333333333 -0.326333333333333 -0.709 -0.234 0.416166666666667 -0.2335 -0.142166666666667 0.0315 -0.368166666666667 -0.7885 0.145333333333333 0.00833333333333335 -0.437833333333333 -0.141833333333333 -0.464 -0.333666666666667 -0.0966666666666667 -0.500166666666667 0.0106666666666667 0.478 0.00849999999999997 -0.102666666666667 0.321166666666667 -1.05916666666667 -0.432166666666667 -0.626166666666667 -0.1345 -1.35 -0.390333333333333 0.0145 -0.8165 -0.189 -1.07033333333333 -0.193166666666667 -0.361 -0.353333333333333 -0.178333333333333 -0.295 -0.419 0.382166666666667 -0.859 0.407666666666667 -0.296666666666667 -0.626666666666667 -0.0355 -0.308833333333333 -0.396833333333333 -1.23416666666667 -0.00666666666666666 -0.371166666666667 -1.482 -0.222 0.207166666666667 0.6575 -0.1385 -0.437666666666667 0.00466666666666667 0.202666666666667 -0.753 1.2275 0.019 -0.316333333333333 -0.6735 -0.2895 -0.148333333333333 0.1425 0.491333333333333 -0.359833333333333 0.406166666666667 -0.417833333333333 -0.0508333333333333 -0.0283333333333333 0.480333333333333 -0.689333333333333 -0.986 -0.198833333333333 -0.194333333333333 0.4725 -0.909333333333333 -0.2125 -0.156 -0.351166666666667 -1.45883333333333 -0.473166666666667 -0.6185 -0.2855 0.0218333333333333 0.623166666666667 0.379666666666667 -0.960333333333333 -0.493333333333333 0.108666666666667 -0.366666666666667 0.2095 0.3285 -0.454666666666667 -0.554 0.0995 0.205333333333333 0.440166666666667 -0.0261666666666667 -0.0781666666666667 -0.6125 -0.0106666666666667 -0.135666666666667 -1.07283333333333 0.555833333333333 -0.027 -0.425333333333333 -0.232 -0.0496666666666667 -0.343333333333333 0.0501666666666667 0.437666666666667 0.852833333333333 0.078 -0.673833333333333 -0.396333333333333 -0.243333333333333 0.435666666666667 0.0325 -0.0761666666666667 -0.0341666666666667 0.0371666666666667 -0.2895 0.0221666666666667 0.798166666666667 1.17716666666667 0.359666666666667 -0.562666666666667 0.228 -0.114666666666667 -0.848666666666667 -0.637166666666667 -0.447 -0.682333333333333 -0.201 0.1435 -0.728333333333333 -0.881333333333333 -0.207 -0.929833333333333 -0.139 0.186833333333333 0.247833333333333 -0.641 -0.592333333333333 -0.466166666666667 -0.4005 -0.146833333333333 -0.418833333333333 -0.798333333333333 -0.302833333333333 -0.233666666666667 -0.431333333333333 0.450833333333333 -0.354833333333333 -0.437833333333333 -0.827666666666667 -0.505833333333333 -0.678666666666667 -1.7375 -1.4125 0.333 -0.407666666666667 0.0176666666666667 -0.619666666666667 0.0193333333333334 -0.0298333333333333 -0.0976666666666667 -0.318166666666667 -0.0915 -0.814833333333333 -0.0191666666666667 -0.123666666666667 0.0315 0.383833333333333 -0.403833333333333 0.453833333333333 -0.319166666666667 -0.574833333333333 -0.221666666666667 -0.700333333333333 -1.11316666666667 -0.494333333333333 0.520333333333333 0.317833333333333 0.210833333333333 -0.389666666666667 0.7695 -0.200333333333333 -0.793333333333333 -0.166666666666667 0.1135 -0.757666666666667 -0.0121666666666667 0.662333333333333 -0.417833333333333 -0.627166666666667 0.0116666666666667 0.312333333333333 0.195666666666667 -0.819666666666667 0.104333333333333 -0.242666666666667 -0.544833333333333 -0.282333333333333 0.612833333333333 -0.486166666666667 0.596833333333333 -0.368333333333333 -1.37816666666667 0.187 0.471 -0.4125 -0.8995 -0.426 -0.62 -0.4245 -0.4465 -0.245333333333333 -0.142166666666667 0.508833333333333 0.136833333333333 0.0276666666666667 -0.5665 0.55 -0.0203333333333333 -0.637166666666667 0.170833333333333 -0.3645 -0.9975 -0.657 0.948833333333333 0.068 -0.6155 -0.562 -0.8555 -0.656333333333333 -0.260833333333333 0.304666666666667 -1.292 -0.497833333333333 0.258166666666667 -0.596666666666667 -0.317 -0.642166666666667 -0.647666666666667 -0.247333333333333 -0.127166666666667 -0.201666666666667 -0.919833333333333 -0.957666666666667 -0.0328333333333333 -0.788833333333333 -0.319666666666667 -0.761833333333333 -0.749666666666667 -0.735166666666667 -0.132166666666667 0.181666666666667 0.388166666666667 -0.299333333333333 0.282 0.428166666666667 0.477833333333333 0.248166666666667 0.156833333333333 -0.158833333333333 0.479166666666667 0.0548333333333333 -0.0673333333333333 0.1475 -0.217166666666667 0.0805 -0.1135 0.1915 -0.464333333333333 -0.0286666666666667 0.131333333333333 0.309666666666667 -0.506 0.519333333333333 -0.0186666666666667 0.0641666666666667 0.291833333333333 -0.602166666666667 -0.326333333333333 -0.636 -0.963 0.677666666666667 -0.661833333333333 -0.7665 0.0211666666666667 0.484666666666667 -0.125666666666667 -0.255333333333333 0.00966666666666667 0.566833333333333 -0.480333333333333 -0.174166666666667 0.0548333333333333 0.168833333333333 -0.246166666666667 0.358 -0.7455 -0.0595 0.319333333333333 0.0435 -0.6115 -0.391 -0.233 -0.232666666666667 -0.1275 -0.806 1.18566666666667 -1.393 -0.2595 -0.205166666666667 -0.376166666666667 -0.2425 -1.1825 -0.229333333333333 -0.5225 -0.4665 -0.391166666666667 -0.294666666666667 -0.365666666666667 -0.2735 -0.0403333333333333 -0.4205 -0.576 -0.661666666666667 -0.169333333333333 0.036 -0.320333333333333 0.167666666666667 0.056 0.00816666666666666 -0.4555 -0.306333333333333 -0.238833333333333 0.120333333333333 -1.11516666666667 0.0401666666666667 -0.826833333333333 -0.0605 -0.0683333333333333 -0.298 -0.447333333333333 -0.395333333333333 -0.43 -0.0568333333333333 -0.256333333333333 -0.357833333333333 -0.4415 0.1765 0.204666666666667 -0.205833333333333 -0.567666666666667 -1.69266666666667 0.0783333333333333 1.20216666666667 0.586166666666667 -0.755666666666667 0.1945 -0.424 -0.636333333333333 -0.0475 0.4245 -0.475166666666667 0.145333333333333 -0.006 -0.595166666666667 -0.6605 0.129333333333333 -0.566166666666667 -0.4605 -0.229 0.0978333333333333 0.102 -0.564666666666667 -0.0775 -0.418833333333333 -0.290166666666667 -0.0383333333333333 0.0245 -0.448 -0.590666666666667 -0.579833333333333 0.0601666666666667 0.212833333333333 -1.266 -0.686166666666667 -0.0358333333333333 -0.291 0.056 0.00483333333333333 0.146 0.507666666666667 0.032 -0.341333333333333 -0.598 0.291166666666667 -0.246833333333333 -1.48816666666667 -0.205333333333333 -0.4025 -0.217333333333333 0.145666666666667 0.0828333333333334 -0.658833333333333 0.118166666666667 -1.40933333333333 -0.224333333333333 -0.967333333333333 -0.284 -0.329 -0.345166666666667 -0.234166666666667 -0.558666666666667 -0.276 -0.9315 -0.6765 -1.53866666666667 0.291666666666667 -0.0246666666666667 -0.219 0.1135 -0.1135 0.176 1.15648231731787e-18 -0.538666666666667 -0.101833333333333 0.858 -0.0326666666666667 0.268166666666667 0.293 -0.408333333333333 -0.0943333333333334 -0.0911666666666667 0.743 -0.724 -0.048 -0.281166666666667 0.1775 -0.278333333333333 0.0883333333333333 -0.2 -0.181166666666667 0.5265 -1.20266666666667 -1.01283333333333 -0.1835 0.285 -1.01583333333333 0.4915 0.1485 0.3265 0.0523333333333333 -0.2865 0.333666666666667 -0.850333333333333 -0.451833333333333 -0.750166666666667 1.163 0.00866666666666667 -0.129833333333333 0.802 0.0925 -0.5065 -0.2365 -0.221166666666667 0.675833333333333 -0.04 -0.545833333333333 -0.627333333333333 -0.278333333333333 1.36166666666667 0.0543333333333333 0.103 -0.4705 -0.898 0.0783333333333333 -0.510666666666667 -0.383333333333333 -0.272833333333333 -0.0331666666666667 -0.731666666666667 -0.511 -0.272666666666667 0.9535 -0.218666666666667 -1.26566666666667 -0.342666666666667 0.1985 -0.458166666666667 0.604333333333333 -0.852833333333333 -0.569166666666667 -0.101833333333333 0.0931666666666667 +RPS11 6205 0.765 0.716 0.417125 0.115 0.492875 -0.525 -0.169 0.396 0.50475 0.400875 0.393125 0.9165 0.627125 0.337125 0.705 0.16425 0.325 0.11175 0.155625 0.285625 0.703 0.406625 0.136 0.02525 -0.158875 0.771125 0.446 0.164 1.2165 1.161875 -0.381125 0.592625 1.46475 0.25075 0.05725 0.60175 0.2965 0.578875 1.034625 0.195625 0.475875 0.615875 0.418 0.05625 1.202625 1.515875 0.28125 1.0045 0.51175 -0.247125 -0.14225 -0.46775 0.8855 0.65775 0.647 0.349125 1.219125 0.24375 0.935625 0.893 -0.519875 -0.21625 0.4815 0.404875 0.2785 0.02825 0.1195 0.62475 -0.688125 0.623625 0.8535 -0.047125 -0.115125 0.428625 -0.067875 1.1065 0.10175 0.347625 -0.306125 -0.528125 0.424125 1.377875 -0.077375 0.458375 0.190875 0.651375 0.524 0.42575 0.029625 -0.100625 -0.34075 -0.5165 0.477875 -0.395875 0.245 -0.425 0.3625 1.235375 0.668625 0.435375 0.055625 -0.02625 -0.337125 0.0815 0.231625 -0.359125 0.24025 0.15 0.26125 0.021375 -0.059125 0.118 0.2695 0.088875 0.173625 -0.135 0.688625 0.548125 0.435375 0.111875 0.722375 -0.26075 -0.61125 0.770875 0.082875 -0.27725 -0.701125 0.552125 0.06325 -0.550875 -0.38075 0.7395 0.456125 0.331625 -0.016375 0.20475 0.3815 0.928375 0.053 0.525125 0.717875 0.40825 -0.03925 -0.089375 -0.07675 0.4825 0.722375 0.1355 0.5345 0.083625 -0.037875 0.208125 -0.387125 1.080375 0.06425 0.34775 0.36525 0.178125 0.09575 0.618125 0.05575 0.05075 0.648125 0.4325 0.962375 0.53925 0.677 0.226 0.261125 -0.095875 -0.385875 0.77525 0.13175 0.28425 0.604125 0.163125 0.214875 0.19625 -0.073875 0.66375 1.26775 0.6305 0.6045 1.210375 0.02 1.147875 0.40325 0.898375 0.549875 0.39075 0.323 -0.165375 0.70925 1.140875 1.130375 0.042625 0.427375 0.01275 0.9345 0.65325 0.750375 0.740625 0.633625 1.632125 0.44975 0.236 0.632625 0.738125 0.448375 -0.01125 0.582875 2.193375 0.014125 -0.18275 0.917875 2.522 -0.330125 -0.334125 0.74575 0.46625 0.11375 0.877 0.419875 0.58175 0.384 1.447875 1.00025 0.713875 0.554625 0.47025 0.41775 0.838875 0.953375 0.4605 -0.26975 0.86075 0.501625 0.913125 0.722375 0.48725 1.1905 1.22575 1.728875 0.063125 0.41225 1.049875 2.340125 0.403875 -0.67475 0.294375 -0.074125 0.372625 0.347875 0.44975 0.84525 0.16 -0.016 -0.137875 0.2645 -0.121625 0.996125 -0.35725 -0.129125 0.39525 -0.3735 -0.245375 -0.017375 0.94775 0.543875 0.069375 0.72925 0.764625 1.04775 1.217125 0.47475 0.417375 0.943 0.314375 0.997625 1.243625 0.512375 0.35925 1.101 -1.025875 0.7845 0.9285 0.528375 0.335875 0.0455 0.43575 0.234125 0.416 0.234 0.51475 0.6885 0.2685 0.317875 0.4315 1.201125 0.564875 0.55675 1.1135 -0.236125 -0.23275 0.22025 0.25 -0.081 0.358625 0.540375 0.06025 0.597375 0.533125 0.820875 0.241875 1.031625 1.006125 0.18575 0.08525 0.204 -0.238625 0.08475 0.597875 1.248625 1.0245 -0.0985 0.753625 0.713625 0.54275 0.296875 0.298375 0.971875 0.148375 0.762125 0.54425 0.217375 0.306 0.538625 0.79975 0.018625 0.923875 1.100375 0.252 0.95175 0.27975 0.65725 1.045625 0.78425 0.410125 1.04275 0.2495 0.008625 0.258875 -0.297875 0.322375 0.564375 0.10325 -0.299125 0.223125 -0.2525 0.300875 0.41825 0.130125 0.930375 0.401125 0.5985 0.180125 0.541625 0.41575 -0.060625 1.115 0.898375 -0.443625 0.406375 1.01825 0.11725 0.7035 0.9775 0.44075 1.082 0.429 -0.220625 -0.12225 0.3035 0.255125 0.235125 -0.192375 0.541125 -0.56975 0.658 0.385625 1.349125 -0.03825 0.128375 -0.00649999999999999 0.7575 0.046875 0.75175 0.13675 1.8195 0.676625 -0.78175 0.857875 0.860125 0.864875 0.78025 0.890875 -0.074375 0.71825 0.367 0.43625 0.895125 0.13325 0.432375 -0.084875 0.225875 1.173625 2.4975 0.089625 0.3735 -0.6225 0.483875 0.995375 0.313875 0.47975 0.62125 0.24675 0.16325 0.29875 0.312625 -0.28925 0.85275 -0.2925 0.29375 0.550875 0.241625 0.582875 0.840375 0.60725 0.08675 0.340125 0.428375 0.045625 -0.2225 0.248 1.4685 -0.5035 0.70075 0.71875 -0.03875 0.2465 -0.053875 0.583375 0.892 -0.211125 0.695375 -0.119625 0.665625 -0.238875 -0.182625 1.026875 0.707375 -0.161875 0.236 1.429 0.548125 -0.708875 0.087375 0.6965 0.258 -0.118375 -0.285375 0.156 -0.2945 0.648875 0.8375 -0.019125 -0.178625 0.85925 0.185 -0.022375 0.531875 0.347125 0.357625 0.573625 0.116625 0.2675 0.466125 1.178 0.477375 0.489 -0.28425 0.50875 0.68675 -0.024875 0.92225 0.185875 0.166375 0.1415 0.78025 0.384625 0.119625 -0.1565 1.737125 -0.69175 0.90125 0.20975 1.413 -0.22075 0.067375 0.7555 1.042125 0.05925 0.926625 0.176375 0.06375 0.04525 -0.32875 -0.438625 0.781 0.226875 0.35225 0.326125 0.603625 1.406625 0.64975 0.60075 +CREB3L1 90993 1.4345 0.89075 2.25925 0.43775 -0.63725 2.58 -0.7075 0.16675 1.18425 0.9665 0.2375 0.9585 -0.33475 0.245 1.007 2.64625 2.32225 1.49375 0.48275 0.30725 1.51075 1.02225 1.94525 -0.45525 -0.358 1.0775 1.89475 0.95 2.235 1.30775 -0.25 1.56525 0.1715 0.617 1.1595 1.359 1.5575 0.88325 0.9935 1.48075 0.60725 1.45025 0.59725 0.50375 1.28775 0.73225 1.487 1.81475 1.00925 1.28875 1.132 0.36375 0.71475 0.99875 1.5635 0.7605 1.81775 1.28225 1.4765 1.1355 0.60525 0.11375 1.5675 0.02925 2.20675 1.553 0.6525 1.78475 -0.131 1.24125 0.7295 -0.15175 0.1135 1.3855 -0.60925 1.92575 1.1805 0.289 0.15275 0.622 1.24175 0.273 -0.12175 1.39375 -0.425 0.0655 0.577 0.952 1.503 0.4445 0.6555 0.0105 0.58125 -0.693 2.1165 1.62675 -0.07 1.34975 -0.3545 1.7375 1.88225 1.29375 1.75725 1.0415 0.316 0.15575 0.7305 0.15275 0.8875 0.958 0.51025 0.888 1.781 0.98575 0.81575 1.83025 0.61275 0.6095 1.08375 3.06975 0.5335 0.2215 0.63475 1.39125 -0.89025 0.84575 0.827 0.88775 0.88825 0.16475 1.209 0.79425 0.71225 1.355 0.23875 -0.24225 1.603 0.6855 1.6825 1.43475 2.12325 0.6965 1.60875 0.23275 0.7395 0.47425 1.38275 0.494 1.12325 1.9075 -1.17575 -0.0435 1.27925 0.3065 0.75325 0.99875 1.00075 1.1055 1.91575 -0.15225 0.9155 1.28275 0.2965 3.02975 1.04275 1.0815 0.5645 1.9115 1.422 -0.0035 1.17975 0.9485 0.87425 1.34925 1.0015 -0.493 1.1195 0.54825 0.59275 0.82125 -0.66525 2.876 -0.43475 0.99725 1.2855 -0.25275 2.0695 0.59775 1.92075 0.4545 2.31225 1.16375 0.51825 0.3925 0.72625 1.2555 0.2175 1.1395 1.63575 1.12225 1.72 1.32425 0.717 -0.23625 -0.232 0.89075 1.54225 1.924 0.405 3.22025 1.162 -0.15225 0.85375 0.6295 2.30925 1.5605 0.397 0.2015 0.0055 1.58275 0.685 0.69525 1.60925 2.012 1.0935 1.917 -0.51575 -0.504 1.716 0.516 0.56925 -0.41575 1.60775 1.20875 1.9795 -0.4945 1.2565 1.7765 0.64275 0.63325 1.9195 1.70725 1.18925 2.9135 0.78125 0.29875 0.39325 1.755 -0.43675 0.13425 1.43325 -0.22975 0.92025 -1.41275 -0.556 0.3445 -0.71675 0.04775 -0.3405 1.99225 0.26 1.1955 -0.1875 0.89925 1.427 1.95675 0.14175 -0.1295 0.18775 0.248 -0.273 1.9945 1.13225 1.1225 0.601 0.1075 0.61075 1.1935 2.002 0.10325 0.30125 1.62575 1.70525 0.75425 1.25825 1.592 0.5405 1.96275 0.87075 0.6815 1.8075 0.40225 0.2 2.8465 1.03925 0.11425 1.21075 1.1185 1.5025 0.657 0.80475 -0.4015 0.603 0.442 1.7575 0.709 0.624 -0.038 1.2605 1.446 1.545 -0.319 1.793 0.14575 0.547 0.8775 1.16075 1.5215 0.25625 0.976 1.27125 0.8535 1.527 1.368 1.53975 2.13725 1.997 1.2315 0.948 1.144 1.72 1.317 1.7905 2.26325 0.3255 0.6665 0.65625 0.7665 1.4275 1.23175 0.065 1.12375 0.887 0.82025 1.40175 0.57775 1.04 0.64925 2.61275 1.1205 0.6875 1.09025 1.27325 2.3835 1.17725 1.952 -0.11825 1.0545 0.534 1.99425 0.852 0.7615 -0.0245 1.042 1.99125 1.331 1.37125 1.0215 0.36825 1.94775 1.50125 1.03725 1.88875 0.4175 1.51725 1.82775 1.2905 2.56925 1.00225 0.57 0.85275 0.10275 1.20275 1.6305 1.59775 1.15725 0.99675 0.9015 -0.2805 1.76825 -0.018 1.6335 1.80375 1.5485 1.68075 0.265 1.754 1.3655 1.33875 0.54825 -0.41025 2.35425 1.6965 1.837 0.6325 -0.96875 0.16175 1.2115 0.51725 1.021 1.36775 0.25675 1.87925 0.02775 1.495 1.58625 0.8205 1.91225 1.516 0.71875 0.90825 1.32225 -0.24275 2.21275 -0.82025 0.203 1.338 2.37775 0.54975 0.14875 1.06025 0.61475 2.34625 1.31525 3.08775 0.14625 0.321 -0.05175 -0.11525 -0.9365 1.2725 1.4655 1.2845 0.755 0.862 -1.026 1.018 0.64225 1.31425 1.04875 3.00975 0.689 1.1395 0.68575 2.4265 -0.495 0.754 1.943 2.36475 1.581 0.171 0.529 2.633 0.21575 0.17375 -0.269 2.3075 -0.234 0.90625 0.2665 -0.56375 1.02675 1.81775 -0.36275 0.01325 2.12 0.3975 0.5035 0.777 1.93125 0.92225 2.021 1.89225 0.875 0.0375 1.0165 -0.42475 0.9895 -0.318 -0.43575 0.26525 2.0955 0.0605 -0.618 0.5315 1.03325 0.50375 2.011 1.423 1.39175 -0.86325 -0.54425 -0.2965 0.4765 0.511 1.11 0.0855 0.73175 0.7875 1.70175 1.37825 1.48425 1.60025 0.724 1.13775 -0.312 0.20625 0.3375 0.42825 0.96825 1.89825 1.71825 -0.07175 1.40025 1.63025 0.46525 +PNMA1 9240 0.526 0.13175 0.325 0.75775 0.94325 0.64175 -0.06425 0.026 0.53325 -1.72625 -0.077 1.1715 -0.6355 -0.41175 0.435 -0.76825 -0.95425 -0.702 -0.13275 0.14875 0.682 -1.308 0.38025 0.95775 1.071 -0.23325 -1.13575 -0.583 -0.3825 0.529 -0.91275 0.177 -0.26525 -0.98725 -0.008 1.265 0.32225 0.371 -0.96925 1.021 0.46025 1.361 0.8765 -0.119 0.1095 0.703 -0.46475 -0.29125 0.46525 -0.32075 -0.7435 0.14575 0.61725 -0.732 0.26225 -0.8345 0.91675 0.51125 -0.71525 0.882 0.46375 0.07425 0.48575 0.4755 0.23425 -0.21 0.86675 0.18075 -0.63725 -0.071 0.39925 0.2675 -0.398 0.269 -0.5325 -0.36375 0.0965 1.1145 -0.183 0.13025 0.46925 -0.401 -0.71575 -1.7145 1.15825 0.366 0.728 -0.78575 0.0315 -0.1675 0.30225 -0.1215 -0.1195 -0.9135 0.42075 0.4815 0.9785 0.10625 -0.37025 0.657 -0.026 0.14425 0.49575 0.2165 -0.49925 -0.94925 0.633 -0.09375 0.44875 -0.229 0.0245 0 0.14975 1.58675 -0.19775 -0.46575 -0.00425 1.01875 0.18075 0.27025 0.4275 -0.37725 0.17975 0.49225 0.688 0.338 -0.1975 0.4415 0.32275 0.51075 0.6915 0.284 -0.10075 0.8105 0.01375 1.168 0.71925 0.451 -0.69025 0.482 0.32275 -0.10525 -0.64825 0.2525 0.44825 0.4875 0.32575 -1.17075 -0.921 0.48925 0.35675 0.23975 -0.66775 0.65975 0.1795 1.0485 1.05875 -0.34875 -0.6265 -0.384 0.553 0.785 0.61675 -0.6525 -0.61775 0.51775 0.046 0.2045 0.12 0.20525 0.4635 -0.15175 0.361 0.9885 -0.4425 -1.61675 0.67975 -1.035 -1.23675 -0.74575 0.396 -0.31575 0.5125 0.4715 0.36125 -1.1295 0.44725 -1.0705 0.58575 0.61275 -0.69625 -0.0385 -0.08075 -0.10675 -0.56825 0.66125 -1.0245 0.61775 0.397 -0.1975 -0.42475 -0.121 0.44225 0.111 0.6825 -0.0085 0.03125 0.43975 0.758 -0.75875 1.00275 -0.21875 -0.34125 -0.8485 -0.45125 0.098 -1.5 1.6005 0.294 1.0505 -0.59325 1.31625 0.18175 0.04625 0.26125 -1.021 -0.31625 -0.9375 -0.03825 0.46075 0.652 1.57475 -0.02075 -0.856 0.81575 -0.982 -1.03975 -0.262 -0.9175 -1.3145 -0.25975 0.912 0.06725 -0.63575 0.5055 -0.24725 0.48475 0.50325 0.98975 -0.649 -1.026 -0.8655 0.503 0.10525 0.28125 0.01025 -0.55575 0.311 0.05175 -0.4855 0.48625 1.44225 -1.21225 -0.2415 -0.03525 0.2895 0.29825 -0.778 -0.7775 0.037 0.47125 -0.40375 -0.02275 -0.14425 -0.69875 -1.22175 0.0395 0.4135 -0.0675 -0.28475 0.09425 -0.49725 -0.44875 -0.751 -0.936 0.212 -0.68425 -0.70625 -1.2215 0.2475 1.145 0.1985 0.39225 0.1585 0.17425 -0.692 0.41775 0.32925 -0.15025 -0.1935 0.28025 -0.19025 -0.75375 0.8425 -0.74075 0.80625 0.37275 1.31975 0.738 0.43075 0.19 0.2285 0.17825 0.0175 0.29375 0.89425 0.19375 -0.288 -0.15025 0.088 0.07675 -0.20775 0.13875 -0.716 -0.88 0.59275 0.48425 0.30425 0.07025 -0.5355 -0.21925 0.5985 -0.3725 -0.36875 0.1195 -0.234 0.686 0.24425 -0.3125 0.89725 -1.05375 0.39525 0.39425 0.40125 -0.23 -0.3715 0.297 0.19 -0.634 0.368 0.29375 -0.05175 -0.52425 1.11325 0.14725 0.15775 -0.706 0.01825 0.459 -0.306 0.20175 -1.6445 0.8445 -0.0385 0.4825 0.9835 -0.04075 0.567 -0.51875 0.218 0.29425 0.694 -0.2465 0.2005 -0.366 -0.37625 -0.53025 -0.05025 -0.104 -0.23125 0.55625 0.64875 -0.36625 -0.4425 -0.2675 0.3445 0.848 0.6355 0.18425 -0.542 0.1815 0.99225 0.25925 0.83475 -0.6765 0.43325 0.16875 -0.00475 0.007 0.24925 -0.86075 -0.55875 0.20225 -0.06075 -0.07975 0.85925 -0.056 0.51125 -0.49675 0.093 0.62125 0.94575 1.23725 0.23375 0.309 -1.0355 -0.73025 0.581 0.4015 -0.99925 0.28275 0.01025 0.345 0.29425 -0.918 -0.34925 0.16725 -0.07 -0.46575 -0.11675 0.58275 0.50725 -1.16625 0.06025 0.2205 -0.4305 -0.59475 -0.91425 -0.13 0.65425 -0.44325 0.13625 0.108 -0.84625 -0.195 -0.00325 -0.088 0.061 -0.29 0.15675 -0.333 0.21675 -0.5755 -0.21475 -0.567 -0.545 -0.55475 -1.09075 1.04325 -0.24 -0.487 0.0025 -0.29025 -1.14275 -0.8345 0.81075 -0.166 0.08675 0.7985 0.45425 -0.393 0.491 0.599 -0.344 1.4005 0.14475 -0.513 0.56775 0.9455 -0.35775 0.62425 0.32775 -0.65525 0.15425 -0.965 0.0075 0.536 0.9785 -1.40525 0.295 -0.54425 -0.08125 -0.61325 -0.118 -0.527 -0.08275 0.0295 -0.2295 0.175 0.669 0.0925 0.262 -0.747 -1.132 0.73225 -0.01525 0.11075 0.1975 0.223 -0.5125 -1.2515 -0.00825 0.27225 1.41425 -0.08375 1.33525 0.14925 1.00925 -0.20925 -0.03675 0.50025 -0.3635 -1.2445 -0.42125 -0.44975 -0.20225 +ERCC5 2073 -0.10725 -0.2385 0.00725 0.03525 0.791 -0.17725 -0.1365 -0.56675 0.46675 0.423 0.1915 -0.3015 1.1275 -0.753 0.658 0.51975 -0.09975 0.555 0.2145 -0.698 0.48725 0.68825 0.09675 -1.143 -0.43 0.027 -0.2095 0.312 0.42225 0.73025 0.0205 -0.971 0.17325 0.6425 0.05725 -0.13325 0.43375 0.17825 -0.02 0.00350000000000001 0.424 -0.029 -0.467 -0.4125 0.059 0.0275 0.50625 0.5415 -0.00225 -0.76125 -0.15025 0.432 -0.00125 0.22125 -0.389 -0.31475 0.24275 0.531 0.2065 0.10925 0.11375 0.23575 0.41175 -0.46375 0.57175 -0.425 -0.22125 -0.05325 -0.3155 0.477 0.06775 -0.17725 -1.016 -0.33 0.34225 0.29075 0.4295 -0.68175 -0.0045 0.94825 0.1835 -0.61925 -0.01225 -0.7125 -0.415 -0.65625 0.29575 0.0335 -0.55825 -0.90075 -0.6455 1.1105 0.7045 -0.2015 -0.09525 -0.32325 -0.932 -0.925 0.30525 0.01925 -0.73925 -0.4025 0.30875 0.48075 -0.82875 -1.51125 -1.3415 0.0975 0.201 -0.27675 -0.7365 -0.336 -0.23675 -0.02725 0.532 0.593 -0.8755 -0.6995 0.2845 -0.00999999999999999 0.09875 -0.416 0.37825 0.3615 0.892 0.45625 0.1975 -0.3145 -0.237 -0.5685 -0.17825 0.312 -0.691 0.1375 -0.5595 0.224 -0.92675 -0.15425 -0.30875 0.29425 0.31175 -0.01775 -0.29525 0.27025 -0.05075 0.91825 -0.11625 -0.0285 -0.26275 -0.81925 -0.209 0.4065 -0.0265 -0.77875 -0.1775 0.19425 0.39125 -0.08175 0.01025 0.72825 0.75325 -0.19625 -0.436 0.07675 0.0105 0.04075 -0.1035 -0.40025 -0.8415 0.18925 0.8825 0.06375 0.30425 -0.33125 -0.0625 1.1855 -0.84175 0.45525 0.47325 0.5185 0.4565 0.193 -0.6935 0.47525 0.286 0.58275 0.12175 0.07925 0.492 -0.096 1.23475 0.224 0.49575 0.887 0.399 -0.02225 -1.13675 0.011 -0.3955 -0.0645 0.4825 0.4785 0.43075 0.8375 -0.0495 0.12275 0.01725 -0.018 -0.246 0.12425 -0.61975 0.42975 -0.10775 0.752 0.22925 1.2405 0.104 0.06175 -0.22975 0.44 -0.792 0.449 0.46775 -0.017 0.18125 1.94175 1.2005 -0.274 -0.385 -0.2285 0.61025 -0.83925 -0.096 -0.19825 -0.36125 0.18775 0.87075 0.82475 -0.0795 0.61975 0.4035 0.000499999999999994 0.37825 0.6855 -0.446 -0.96275 -0.24075 0.92325 -0.82075 1.1945 0.000750000000000004 -0.12325 0.10025 -0.0695 -0.296 0.58575 -0.0555 -0.85825 0.05325 -0.43525 0.25675 -0.55725 -0.4905 0.4315 -0.6865 0.4325 -0.96425 -0.1055 -0.74475 -0.09975 -0.04175 1.14075 -0.039 0.03275 0.356 0.31875 -0.16775 0.2005 0.086 -0.36675 -0.041 0.0615 -0.000499999999999997 0.03525 0.27975 0.67325 0.738 -0.64125 -0.139 -0.031 0.4665 0.3335 0.03475 0.53075 0.24775 0.2905 0.53475 -0.4755 0.23175 0.99575 0.12275 -0.30425 -0.259 0.5735 0.38875 -0.0445 -0.553 -0.024 -0.06175 -0.02575 -0.3205 0.48725 0.34875 0.877 0.08825 0.029 -0.487 0.71825 -0.54225 -0.14725 -0.12375 0.15825 0.445 0.32475 -0.43975 0.53225 -0.741 0.60375 -0.26825 -0.01675 -0.1055 -0.07125 0.67575 0.26925 -0.742 -0.33375 -0.48875 0.2825 -0.26825 -0.81825 0.76625 -0.1485 -0.4765 -0.13475 0.434 0.087 -0.5675 0.06825 0.53825 -0.1995 -0.3095 0.31575 -0.3845 0.9395 -0.298 -0.236 -0.43525 -0.58375 -0.4505 -0.32075 0.41925 1.33825 -1.3815 0.5595 0.38425 -0.51075 0.18525 0.04125 0.02675 0.253 -0.1065 -0.0735 0.07025 0.16425 0.195 0.04725 0.46625 0.1325 0.86375 0.637 -0.000749999999999999 -0.0275 0.168 0.6915 0.174 -0.26475 -0.5495 -0.46175 -0.56575 0.6595 0.51725 0.36 -0.5345 -0.2325 -0.33625 -0.34775 -0.44825 0.323 0.2365 0.24525 -0.2555 -0.32225 0.4255 0.239 -0.32 0.15725 -0.57325 0.1085 -0.31 -0.26075 0.17525 0.762 -0.24475 -0.73125 0.27975 0.58575 0.09325 0.137 0.13975 -0.41125 -0.3295 -0.04375 0.126 0.23725 0.675 0.18175 -0.3285 -0.009 -0.80975 0.52325 -0.27475 0.21675 0.491 0.27025 -0.3395 -0.37875 0.08425 0.25875 0.30625 0.47025 0.25025 -0.902 -0.76775 0.41375 -0.4555 -0.1345 0.43075 -0.82575 -0.173 -0.66225 -0.00525 -0.43725 0.207 0.371 0.48325 0.40125 -0.64975 -0.00525000000000002 0.9705 0.282 -0.5695 0.1985 1.1405 0.04475 -0.418 -0.45 -0.1535 0.409 0.567 -0.51825 -0.182 -0.0695 0.012 -0.0605 -0.12925 0.0405 -0.11725 0.381 -0.281 0.205 -0.16475 0.29675 -0.164 0.095 0.065 -0.103 -0.17475 0.276 1.03675 0.17625 0.536 -0.103 0.436 0.491 -0.2995 0.065 -0.6105 -0.7055 0.5385 0.53775 -0.98125 0.168 0.2745 -0.083 0.16225 0.13575 -0.022 0.4595 0.65675 1.045 -0.124 -0.07 0.15975 -0.26125 -0.02725 -1.1205 -0.40575 -0.1075 -0.05475 -0.27925 0.903 0.7085 1.27775 0.917 0.4055 1.32325 +MMP2 4313 1.506 0.957833333333333 2.2855 -0.0893333333333333 -1.23316666666667 1.5915 -1.3965 -0.2605 0.583 -0.716333333333333 1.62883333333333 -0.39 -0.466166666666667 -0.550666666666667 1.00166666666667 1.399 -0.4545 -0.492833333333333 0.695166666666667 0.397666666666667 0.861 -0.7395 1.26866666666667 -0.118 -0.4305 1.11283333333333 -1.00166666666667 0.502666666666667 -0.946333333333333 1.50116666666667 -0.329 -0.256333333333333 0.222666666666667 0.340166666666667 -1.264 0.028 1.38916666666667 1.208 -0.316666666666667 -0.893 1.234 -1.59766666666667 0.312333333333333 1.06416666666667 1.5815 0.735166666666667 0.1255 -0.2315 0.463333333333333 1.274 0.567166666666667 1.4875 0.687166666666667 0.992 0.92 -0.166 0.100333333333333 1.191 -0.0263333333333333 1.50483333333333 1.76866666666667 0.593166666666667 1.37283333333333 0.552333333333333 -0.428833333333333 0.177666666666667 1.31566666666667 0.7935 -0.538166666666667 0.788166666666667 1.55033333333333 -0.101333333333333 -0.132 -0.201333333333333 0.0548333333333333 0.585666666666667 1.31466666666667 -1.0005 0.195833333333333 1.5885 0.544833333333333 0.680333333333333 -0.3305 1.991 -2.05583333333333 0.1105 1.07 -1.85033333333333 1.30383333333333 -0.206 0.0506666666666667 0.919666666666667 -1.61083333333333 -1.0865 0.9315 0.822666666666667 -0.736166666666667 0.902833333333333 -0.692166666666667 1.81116666666667 0.970166666666667 1.74716666666667 0.913666666666667 1.96866666666667 0.323 0.194333333333333 -0.4055 -0.880666666666667 -0.318 0.3325 -0.285666666666667 0.0351666666666667 -1.07316666666667 0.157666666666667 -1.0005 1.20733333333333 0.0853333333333333 0.755 0.421833333333333 -0.3065 -0.283666666666667 0.4945 1.19766666666667 0.293833333333333 -1.15816666666667 0.643333333333333 -0.3865 0.822333333333333 1.02316666666667 0.348666666666667 -0.0968333333333333 -0.435833333333333 1.557 1.814 0.3535 0.144 0.5345 1.06216666666667 1.1475 0.702833333333333 1.00466666666667 1.38316666666667 0.440833333333333 0.916 0.682333333333333 -0.198833333333333 0.184166666666667 0.23 -0.378 0.563166666666667 -1.344 -1.13016666666667 0.188333333333333 -0.252833333333333 1.05183333333333 1.26333333333333 1.024 0.102833333333333 0.511666666666667 -0.893 1.185 0.764833333333333 0.6065 0.172666666666667 0.594666666666667 0.4885 -0.263166666666667 1.34866666666667 1.52316666666667 0.296333333333333 1.213 1.26133333333333 0.61 1.33483333333333 -0.913333333333333 -0.95 0.520166666666667 -0.752166666666667 0.494333333333333 0.134666666666667 -0.9765 2.2325 0.142 0.4215 -0.36 0.9545 -0.681 -1.54683333333333 2.02283333333333 0.42 0.359 1.0665 -0.515333333333333 0.156 0.579 -0.530333333333333 -0.0781666666666666 0.712333333333333 1.98316666666667 0.806833333333333 0.339833333333333 0.0591666666666666 1.1955 -0.505 0.227166666666667 1.341 1.87033333333333 0.738333333333333 0.243166666666667 0.676666666666667 -0.249833333333333 -0.148666666666667 -0.6155 -0.3835 0.4215 0.851 -0.268833333333333 -1.53233333333333 0.168833333333333 1.72783333333333 -1.18916666666667 -0.0923333333333333 0.9515 0.2415 1.11033333333333 0.0811666666666667 -0.436333333333333 -0.536166666666667 1.57283333333333 1.25 -0.0136666666666667 -1.471 0.729333333333333 -0.3 0.951833333333333 -1.3305 -2.00716666666667 1.69583333333333 -1.07183333333333 0.606333333333333 1.03533333333333 -1.4945 1.38866666666667 1.84966666666667 -0.366833333333333 -0.0553333333333333 0.4 -0.142166666666667 -0.5395 0.324333333333333 0.686166666666667 -0.994333333333333 0.208333333333333 -2.28466666666667 -0.520166666666667 0.483333333333333 -1.34816666666667 -0.476333333333333 0.137166666666667 1.02433333333333 -0.241333333333333 0.969333333333333 -0.877333333333333 0.0493333333333333 -0.0741666666666667 -0.318333333333333 0.028 0.0151666666666666 -0.348666666666667 0.467166666666667 0.328 1.80366666666667 2.0565 1.31983333333333 0.900666666666667 0.760166666666667 1.00183333333333 1.01033333333333 0.725 1.265 0.774 0.6045 1.31716666666667 1.563 -1.75483333333333 -0.642166666666667 0.303666666666667 0.4235 -0.544833333333333 -1.16883333333333 -0.892 -1.97766666666667 -0.5115 0.811166666666667 1.5105 -0.849333333333333 -0.0925 0.6835 -0.219333333333333 -0.3855 0.542666666666667 -1.30483333333333 0.446 0.710166666666667 1.56483333333333 1.3545 -2.251 -0.962333333333333 1.18416666666667 -0.727166666666667 1.12533333333333 -0.5205 0.716166666666667 0.4425 0.2785 -0.105166666666667 1.5195 1.60516666666667 0.134833333333333 0.789 1.5935 0.935166666666667 0.6675 -0.346833333333333 -1.53166666666667 -1.205 -0.910833333333333 1.15366666666667 1.19716666666667 2.45866666666667 0.505 1.0035 2.1515 2.80116666666667 1.59783333333333 1.30083333333333 0.677333333333333 1.25916666666667 1.44316666666667 0.165666666666667 -0.9985 0.9065 0.469666666666667 0.302833333333333 2.52066666666667 -0.0466666666666666 0.724166666666667 1.1205 0.478333333333333 1.7775 0.4855 1.8325 1.39516666666667 0.371666666666667 -0.753333333333333 0.577166666666667 -0.0185 1.636 -0.343166666666667 1.90883333333333 1.49 0.566666666666667 -0.200666666666667 0.871166666666667 1.14 -0.240166666666667 2.685 0.633666666666667 -0.184666666666667 0.223333333333333 0.9025 1.32266666666667 0.104 -0.0323333333333333 1.863 1.616 -0.817833333333333 -0.0816666666666667 0.0898333333333333 -0.273333333333333 -0.409333333333333 1.23783333333333 1.18716666666667 1.23666666666667 -1.33016666666667 1.30833333333333 1.32416666666667 1.16716666666667 -1.34233333333333 1.8015 -0.0686666666666667 1.55183333333333 1.70516666666667 -0.052 2.16166666666667 -0.266666666666667 1.08233333333333 0.898666666666667 0.193 -0.0773333333333333 -0.123166666666667 -0.695666666666667 0.727 0.671666666666667 -0.589166666666667 -1.86483333333333 0.420166666666667 1.05116666666667 1.467 -0.95 1.18716666666667 1.20066666666667 1.177 0.635833333333333 0.618833333333333 0.916833333333333 -0.103666666666667 1.8225 1.033 -0.130333333333333 -1.54866666666667 0.925 -0.565 0.411666666666667 -1.143 0.107666666666667 -0.408666666666667 0.973 1.6185 -0.018 1.86216666666667 1.21316666666667 0.8145 1.5585 1.54766666666667 0.588833333333333 1.49516666666667 -0.247166666666667 -0.107333333333333 -0.569666666666667 2.5045 1.08166666666667 1.15883333333333 0.697166666666667 1.70283333333333 -1.73683333333333 -0.62 0.934666666666667 0.360666666666667 0.139333333333333 0.587 0.415333333333333 1.1945 1.00733333333333 -1.27983333333333 -1.032 0.921833333333333 0.663333333333333 1.87366666666667 1.17616666666667 -0.2885 0.4495 0.628666666666667 -0.963833333333333 -0.1925 -0.941 0.9215 -0.5155 1.577 1.4225 -0.326166666666667 1.961 1.728 -0.524 -0.34 -1.01233333333333 -0.512833333333333 1.0665 -0.00666666666666669 -0.0908333333333333 0.653166666666667 -0.5795 0.105166666666667 1.34416666666667 -1.4535 0.7625 -0.4385 0.333 -1.02233333333333 -0.9625 -0.566 0.720166666666667 -0.549 0.3345 -0.728166666666667 0.519833333333333 0.304833333333333 1.6235 2.31616666666667 1.45883333333333 -1.78716666666667 -1.07483333333333 -1.68716666666667 1.19283333333333 0.494 0.813 -0.783333333333333 -0.4585 1.0045 0.668333333333333 -0.104166666666667 1.256 0.979666666666667 -0.323166666666667 0.243666666666667 -0.136333333333333 -1.5675 0.123 1.54416666666667 1.27916666666667 2.484 0.400666666666667 -1.006 -0.217166666666667 1.63716666666667 1.505 diff --git a/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt index 594c8bb4449..e9006e3dae2 100644 --- a/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt +++ b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt @@ -1,14 +1,14 @@ Hugo_Symbol Entrez_Gene_Id Center NCBI_Build Chromosome Start_Position End_Position Strand Variant_Classification Variant_Type Reference_Allele Tumor_Seq_Allele1 Tumor_Seq_Allele2 dbSNP_RS dbSNP_Val_Status Tumor_Sample_Barcode Matched_Norm_Sample_Barcode Match_Norm_Seq_Allele1 Match_Norm_Seq_Allele2 Tumor_Validation_Allele1 Tumor_Validation_Allele2 Match_Norm_Validation_Allele1 Match_Norm_Validation_Allele2 Verification_Status Validation_Status Mutation_Status Sequencing_Phase Sequence_Source Validation_Method Score BAM_File Sequencer HGVSp_Short t_alt_count t_ref_count n_alt_count n_ref_count ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_1 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA -ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_15 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_2 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_3 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_4 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA +ACP3 55 genome.wustl.edu GRCh37 3 132047117 132047117 + Missense_Mutation SNP C T T NA NA TEST_SAMPLE_15 NA NA NA NA NA NA NA NA NA Somatic NA NA NA NA NA NA ATM 472 genome.wustl.edu GRCh37 11 108173702 108173702 + Frame_Shift_Del DEL G - - NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 - G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx ATM 472 genome.wustl.edu GRCh37 11 108106472 108106472 + Frame_Shift_Del DEL T - - novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Nonsense_Mutation SNP G A A rs80357262 NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HETEROZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HOMOZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_HETEROZYGOUS TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx BRCA1 672 genome.wustl.edu GRCh37 17 41243581 41243581 + Missense_Mutation SNP G A A rs80357262 NA TEST_SAMPLE_SOMATIC_UNDEFINED TCGA-A1-A0SB-10 A G NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP IlluminaGAIIx BRCA1 672 genome.wustl.edu GRCh37 17 41201181 41201181 + Missense_Mutation SNP C A A rs80357069 byCluster TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 C C NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx BRCA2 675 genome.wustl.edu GRCh37 13 108106473 108106473 + Nonsense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 NA NA NA NA NA NA NA NA Germline NA NA NA NA NA NA @@ -27,8 +27,8 @@ DTNB 1838 genome.wustl.edu GRCh37 2 25678299 25678299 + Missense_Mutation SNP C ABLIM1 3983 genome.wustl.edu GRCh37 10 116247760 116247760 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MSH3 4437 genome.wustl.edu GRCh37 5 80024722 80024722 + Frame_Shift_Del DEL T - - NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MYB 4602 genome.wustl.edu GRCh37 6 135507043 135507044 + Frame_Shift_Ins INS - A A NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 - - NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx +TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx TP53 7157 genome.wustl.edu GRCh37 17 7578253 7578253 + Missense_Mutation SNP C A A NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A C NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx -TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx PIEZO1 9780 genome.wustl.edu GRCh37 16 88790292 88790292 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx ADAMTS20 80070 genome.wustl.edu GRCh37 12 43944926 43944926 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx OR11H1 81061 genome.wustl.edu GRCh37 22 16449539 16449539 + Missense_Mutation SNP A G G NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx diff --git a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt new file mode 100644 index 00000000000..3de445bf6c2 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt @@ -0,0 +1,11 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: GENERIC_ASSAY +datatype: LIMIT-VALUE +stable_id: generic_assay_patient_test +show_profile_in_analysis_tab: true +profile_name: generic assay patient test profile +profile_description: test patient profile for generic assay +patient_level: true +generic_assay_type: GENERIC_ASSAY_PATIENT_TEST +generic_entity_meta_properties: description,name +data_filename: data_generic_assay_limit-value_generic_assay_patient_test.txt diff --git a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_mutational_signature.txt b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_mutational_signature.txt new file mode 100644 index 00000000000..a7ca824ce93 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_mutational_signature.txt @@ -0,0 +1,11 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: GENERIC_ASSAY +datatype: LIMIT-VALUE +stable_id: mutational_signature +show_profile_in_analysis_tab: true +profile_name: generic assay test profile +profile_description: test profile for generic assay +patient_level: false +generic_assay_type: MUTATIONAL_SIGNATURE +generic_entity_meta_properties: confidenceStatement,description,name +data_filename: data_generic_assay_limit-value_mutational_signature.txt diff --git a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ec50.txt b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ec50.txt new file mode 100644 index 00000000000..3a9e576903e --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ec50.txt @@ -0,0 +1,13 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: GENERIC_ASSAY +datatype: LIMIT-VALUE +stable_id: treatment_ec50 +show_profile_in_analysis_tab: true +profile_name: EC50 values of compounds on cellular phenotype readout +profile_description: EC50 (compound concentration resulting in half maximal activation) of compounds on cellular phenotype readout of cultured mutant cell lines. +pivot_threshold_value: 0.1 +value_sort_order: ASC +patient_level: false +generic_assay_type: TREATMENT_RESPONSE +generic_entity_meta_properties: DESCRIPTION,NAME,URL +data_filename: data_generic_assay_limit-value_treatment_ec50.txt diff --git a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ic50.txt b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ic50.txt new file mode 100644 index 00000000000..f0baca73094 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_treatment_ic50.txt @@ -0,0 +1,13 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: GENERIC_ASSAY +datatype: LIMIT-VALUE +stable_id: treatment_ic50 +show_profile_in_analysis_tab: true +profile_name: IC50 values of compounds on cellular phenotype readout +profile_description: IC50 (compound concentration resulting in half maximal inhibition) of compounds on cellular phenotype readout of cultured mutant cell lines. +pivot_threshold_value: 0.1 +value_sort_order: ASC +patient_level: false +generic_assay_type: TREATMENT_RESPONSE +generic_entity_meta_properties: DESCRIPTION,NAME,URL +data_filename: data_generic_assay_limit-value_treatment_ic50.txt diff --git a/test/test_data/study_es_0_import_export/meta_mrna_expression_continuous_mrna.txt b/test/test_data/study_es_0_import_export/meta_mrna_expression_continuous_mrna.txt new file mode 100644 index 00000000000..b433ee85aba --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_mrna_expression_continuous_mrna.txt @@ -0,0 +1,9 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: MRNA_EXPRESSION +datatype: CONTINUOUS +stable_id: mrna +show_profile_in_analysis_tab: false +profile_name: mRNA expression (microarray) +profile_description: Expression levels (Agilent microarray). +patient_level: false +data_filename: data_mrna_expression_continuous_mrna.txt From d06861b35755124c7ba877c23ed1d4c95712de85 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 15 Apr 2025 09:52:12 +0200 Subject: [PATCH 27/69] Remove patient level generic assay data to fix the build --- ...c_assay_limit-value_generic_assay_patient_test.txt | 3 --- ...c_assay_limit-value_generic_assay_patient_test.txt | 11 ----------- 2 files changed, 14 deletions(-) delete mode 100644 test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt delete mode 100644 test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt deleted file mode 100644 index 7274cc65e91..00000000000 --- a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_generic_assay_patient_test.txt +++ /dev/null @@ -1,3 +0,0 @@ -ENTITY_STABLE_ID description name TCGA-A1-A0SB-01 TCGA-A1-A0SB-02 TCGA-A1-A0SD-01 -test_patient_generic_assay_1 0.370266873 0.370266873 0.010373016 -test_patient_generic_assay_2 test_patient_generic_assay_2 test_patient_generic_assay_2 0.002709404 0.002709404 0.009212318 diff --git a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt b/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt deleted file mode 100644 index 3de445bf6c2..00000000000 --- a/test/test_data/study_es_0_import_export/meta_generic_assay_limit-value_generic_assay_patient_test.txt +++ /dev/null @@ -1,11 +0,0 @@ -cancer_study_identifier: study_es_0_import_export -genetic_alteration_type: GENERIC_ASSAY -datatype: LIMIT-VALUE -stable_id: generic_assay_patient_test -show_profile_in_analysis_tab: true -profile_name: generic assay patient test profile -profile_description: test patient profile for generic assay -patient_level: true -generic_assay_type: GENERIC_ASSAY_PATIENT_TEST -generic_entity_meta_properties: description,name -data_filename: data_generic_assay_limit-value_generic_assay_patient_test.txt From afe269fc269e755bb8a6163979a68604d9c236b0 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 15 Apr 2025 15:35:15 +0200 Subject: [PATCH 28/69] Fix special attribute values not showing for the first line toRow() gave different results on the first and subsequent calls. The first calls were made for getting the header only. --- ...enericAssayLimitValueDatatypeExporter.java | 48 +++++++++---------- .../MrnaExpressionDatatypeExporter.java | 16 +++---- 2 files changed, 30 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java index d30acb2ce3f..05373b7acd7 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java @@ -84,35 +84,33 @@ public TableRow next() { if (data.getValues().size() != sampleStableIds.size()) { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } - return () -> { - var row = new LinkedHashMap(); - row.put("ENTITY_STABLE_ID", data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); - if (!genericEntitiesMetaProperties.isEmpty()) { - var propertyMap = new HashMap(); - GenericEntityProperty property = null; - while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId().equals(data.getGeneticEntity().getGeneticEntityId())) { - property = propertyPeekingIterator.next(); - if (property.getName() == null) { - throw new IllegalStateException("Property name is null"); - } - if (property.getValue() == null) { - throw new IllegalStateException("Property value is null"); - } - propertyMap.put(property.getName(), property.getValue()); + var row = new LinkedHashMap(); + row.put("ENTITY_STABLE_ID", data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); + if (!genericEntitiesMetaProperties.isEmpty()) { + var propertyMap = new HashMap(); + GenericEntityProperty property = null; + while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId().equals(data.getGeneticEntity().getGeneticEntityId())) { + property = propertyPeekingIterator.next(); + if (property.getName() == null) { + throw new IllegalStateException("Property name is null"); } - if (property != null && propertyPeekingIterator.hasNext() && property.getGeneticEntityId() > propertyPeekingIterator.peek().getGeneticEntityId()) { - throw new IllegalStateException("Genetic entity ID is not in ascending order for properties"); - } - // Add the properties to the row in the order of genericEntitiesMetaProperties - for (String propertyName : genericEntitiesMetaProperties) { - row.put(propertyName, propertyMap.get(propertyName)); + if (property.getValue() == null) { + throw new IllegalStateException("Property value is null"); } + propertyMap.put(property.getName(), property.getValue()); + } + if (property != null && propertyPeekingIterator.hasNext() && property.getGeneticEntityId() > propertyPeekingIterator.peek().getGeneticEntityId()) { + throw new IllegalStateException("Genetic entity ID is not in ascending order for properties"); } - for (int i = 0; i < sampleStableIds.size(); i++) { - row.put(sampleStableIds.get(i), data.getValues().get(i)); + // Add the properties to the row in the order of genericEntitiesMetaProperties + for (String propertyName : genericEntitiesMetaProperties) { + row.put(propertyName, propertyMap.get(propertyName)); } - return row; - }; + } + for (int i = 0; i < sampleStableIds.size(); i++) { + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return () -> row; } }; } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java index 1a86dc3fd48..f6b21174b5e 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java @@ -63,15 +63,13 @@ public TableRow next() { if (data.getValues().size() != sampleStableIds.size()) { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } - return () -> { - var row = new LinkedHashMap(); - row.put("Hugo_Symbol", data.getGene() == null ? null : data.getGene().getHugoGeneSymbol()); - row.put("Entrez_Gene_Id", data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); - for (int i = 0; i < sampleStableIds.size(); i++) { - row.put(sampleStableIds.get(i), data.getValues().get(i)); - } - return row; - }; + var row = new LinkedHashMap(); + row.put("Hugo_Symbol", data.getGene() == null ? null : data.getGene().getHugoGeneSymbol()); + row.put("Entrez_Gene_Id", data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); + for (int i = 0; i < sampleStableIds.size(); i++) { + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return () -> row; } }; } From e67414b037b4d86da997447743706d1ab262a316 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 15 Apr 2025 16:08:21 +0200 Subject: [PATCH 29/69] Skip generic properties with mistmatching id They were blocking for the followup rows --- .../exporters/GenericAssayLimitValueDatatypeExporter.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java index 05373b7acd7..924ad97ba60 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java @@ -20,6 +20,7 @@ public class GenericAssayLimitValueDatatypeExporter extends GeneticProfileDatatypeExporter { + private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(GenericAssayLimitValueDatatypeExporter.class); private final GeneticProfileDataService geneticProfileDataService; public GenericAssayLimitValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { @@ -89,7 +90,12 @@ public TableRow next() { if (!genericEntitiesMetaProperties.isEmpty()) { var propertyMap = new HashMap(); GenericEntityProperty property = null; - while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId().equals(data.getGeneticEntity().getGeneticEntityId())) { + while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId() <= data.getGeneticEntity().getGeneticEntityId()) { + if (propertyPeekingIterator.peek().getGeneticEntityId() < data.getGeneticEntity().getGeneticEntityId()) { + LOG.warn("Skipping {} property with genetic entity ID {} as such ID is not present in the result set.", propertyPeekingIterator.peek().getName(), propertyPeekingIterator.peek().getGeneticEntityId()); + propertyPeekingIterator.next(); + continue; + } property = propertyPeekingIterator.next(); if (property.getName() == null) { throw new IllegalStateException("Property name is null"); From 95308d8901e9fa5d15a3041401a96bcf9885e1bc Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 15 Apr 2025 21:48:21 +0200 Subject: [PATCH 30/69] Fix skipping rows in generic assay data MyBatis does not like if result does not have If it is not specified, it picks first field as a key. Rows that would have the same key will be skipped! --- .../GenericAssayLimitValueDatatypeExporter.java | 5 +---- .../mappers/export/CaseListMetadataMapper.xml | 12 +++++++----- .../mappers/export/GeneticProfileDataMapper.xml | 2 ++ 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java index 924ad97ba60..b3967852184 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java @@ -20,7 +20,6 @@ public class GenericAssayLimitValueDatatypeExporter extends GeneticProfileDatatypeExporter { - private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger(GenericAssayLimitValueDatatypeExporter.class); private final GeneticProfileDataService geneticProfileDataService; public GenericAssayLimitValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { @@ -92,9 +91,7 @@ public TableRow next() { GenericEntityProperty property = null; while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId() <= data.getGeneticEntity().getGeneticEntityId()) { if (propertyPeekingIterator.peek().getGeneticEntityId() < data.getGeneticEntity().getGeneticEntityId()) { - LOG.warn("Skipping {} property with genetic entity ID {} as such ID is not present in the result set.", propertyPeekingIterator.peek().getName(), propertyPeekingIterator.peek().getGeneticEntityId()); - propertyPeekingIterator.next(); - continue; + throw new IllegalStateException(String.format("%s property with genetic entity ID %d is not present in the result set.", propertyPeekingIterator.peek().getName(), propertyPeekingIterator.peek().getGeneticEntityId())); } property = propertyPeekingIterator.next(); if (property.getName() == null) { diff --git a/src/main/resources/mappers/export/CaseListMetadataMapper.xml b/src/main/resources/mappers/export/CaseListMetadataMapper.xml index 9d0a9229526..160190cf3a1 100644 --- a/src/main/resources/mappers/export/CaseListMetadataMapper.xml +++ b/src/main/resources/mappers/export/CaseListMetadataMapper.xml @@ -3,6 +3,7 @@ + @@ -15,11 +16,12 @@ id="getCaseListsMetadata" resultMap="CaseListMetadataResultMap"> SELECT - cs.CANCER_STUDY_IDENTIFIER as cancerStudyIdentifier, - sl.STABLE_ID as stableId, - sl.NAME as name, - sl.DESCRIPTION as description, - s.STABLE_ID as sampleId + sl.LIST_ID, + cs.CANCER_STUDY_IDENTIFIER as cancerStudyIdentifier, + sl.STABLE_ID as stableId, + sl.NAME as name, + sl.DESCRIPTION as description, + s.STABLE_ID as sampleId FROM sample_list sl JOIN cancer_study cs ON cs.CANCER_STUDY_ID = sl.CANCER_STUDY_ID JOIN sample_list_list sll ON sll.LIST_ID = sl.LIST_ID diff --git a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml index dd9c76907b3..f8a02279522 100644 --- a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml +++ b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml @@ -19,6 +19,7 @@ ORDER BY jt.idx ASC + @@ -46,6 +47,7 @@ ORDER BY ga.GENETIC_ENTITY_ID + From d44cbdc9d40b67f685df57bd2f00a925e62a736c Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 15 Apr 2025 22:04:55 +0200 Subject: [PATCH 31/69] Update import/export test study to new fixes --- .../data_generic_assay_limit-value_mutational_signature.txt | 2 +- .../data_generic_assay_limit-value_treatment_ec50.txt | 5 +++-- .../data_generic_assay_limit-value_treatment_ic50.txt | 5 +++-- .../data_mutation_extended_maf_mutations.txt | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt index 63bc2d5755b..531ab575804 100644 --- a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_mutational_signature.txt @@ -1,5 +1,5 @@ ENTITY_STABLE_ID confidenceStatement description name TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 -mean_1 0.370266873 0.010373016 0.005419294 0.022753384 0.037687823 0.016708976 0.100042446 0.104214723 +mean_1 Signature 1, the aging signature, is detected in this case. mean_1 mean_1 0.370266873 0.010373016 0.005419294 0.022753384 0.037687823 0.016708976 0.100042446 0.104214723 mean_10 Signature 10, the POLE signature, is detected in this case. It is associated with functions to the exonucleus domain of the POLE gene and enormous mutational burden. Oftentimes MMR signatures 6, 14,16, 20,21 and 26 co-occur with the POLE signature. mean_10 mean_10 0.002709404 0.009212318 0.002650657 0.005475484 0.074175715 0.033049207 0.027323826 0.008861145 mean_11 Signature 11, the Temozolomide (TMZ) signature, is detected in this case. mean_11 mean_11 0.006035782 0.010095773 0.011926486 0.010637541 0.012168938 0.006641113 0.025730547 0.020463421 mean_12 Signature 12 is detected in this case. We are not confident that we are able to detect signature 9 in the IMPACT cohort. In the literature it is found in liver cancer. mean_12 mean_12 0.026432791 0.012953054 0.002587003 0.02225923 0.031026708 0.01642898 0.022392184 0.013437576 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt index ae8493a425e..a93fec2e588 100644 --- a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ec50.txt @@ -1,5 +1,5 @@ ENTITY_STABLE_ID DESCRIPTION NAME URL TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 -17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 +17-AAG Desc of 17-AAG Name of 17-AAG Url of 17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 AEW541 Desc of AEW541 Name of AEW541 Url of AEW541 > 8 2.329924107 2.68212986 5.002314091 1.736181378 4.260821819 > 8 7.613147736 AZD0530 Desc of AZD0530 Name of AZD0530 Url of AZD0530 > 8 > 8 4.597949505 3.192236662 > 8 7.261883259 1.071310043 > 8 AZD6244 Desc of AZD6244 Name of AZD6244 Url of AZD6244 > 8 > 8 > 8 > 8 > 8 > 8 > 8 > 8 @@ -7,4 +7,5 @@ Erlotinib Desc of Erlotinib Name of Erlotinib Url of Erlotinib > 8 > 8 > 8 2.439 Irinotecan Desc of Irinotecan Name of Irinotecan Url of Irinotecan NA 0.080764666 NA 0.06704437 0.069568723 0.034992039 0.740817904 0.209220141 L-685458 Desc of L-685458 Name of L-685458 Url of L-685458 > 8 > 8 3.267752409 > 8 > 8 0.332892686 > 8 > 8 Lapatinib Desc of Lapatinib Name of Lapatinib Url of Lapatinib > 8 7.847305298 > 8 2.30776763 > 8 0.849476227 1.057461143 7.178035259 -Nilotinib NA > 8 NA 7.475354671 > 8 1.910434365 > 8 > 8 +LBW242 Desc of LBW242 Name of LBW242 Url of LBW242 > 8 > 8 > 8 > 8 > 8 > 8 > 8 > 8 +Nilotinib Desc of Nilotinib Name of Nilotinib Url of Nilotinib NA > 8 NA 7.475354671 > 8 1.910434365 > 8 > 8 diff --git a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt index 410ec33ccd7..c82f49fd1e6 100644 --- a/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt +++ b/test/test_data/study_es_0_import_export/data_generic_assay_limit-value_treatment_ic50.txt @@ -1,5 +1,5 @@ ENTITY_STABLE_ID DESCRIPTION NAME URL TCGA-A1-A0SB-01 TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A2-A04U-01 TCGA-B6-A0RS-01 TCGA-BH-A0HP-01 TCGA-BH-A18P-01 -17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 +17-AAG Desc of 17-AAG Name of 17-AAG Url of 17-AAG 0.22807844 0.329701692 0.053038094 0.07082279 0.150094494 0.422571242 0.1517988 0.279530227 AEW541 Desc of AEW541 Name of AEW541 Url of AEW541 >8 2.329924107 2.68212986 5.002314091 1.736181378 4.260821819 >8 7.613147736 AZD0530 Desc of AZD0530 Name of AZD0530 Url of AZD0530 >8 >8 4.597949505 3.192236662 >8 7.261883259 0.123 >8 AZD6244 Desc of AZD6244 Name of AZD6244 Url of AZD6244 >8 >8 >8 >8 >8 >8 >8 >8 @@ -7,4 +7,5 @@ Erlotinib Desc of Erlotinib Name of Erlotinib Url of Erlotinib >8 >8 >8 2.439512 Irinotecan Desc of Irinotecan Name of Irinotecan Url of Irinotecan NA 0.080764666 NA 0.06704437 0.069568723 0.034992039 0.740817904 0.209220141 L-685458 Desc of L-685458 Name of L-685458 Url of L-685458 >8 >8 3.267752409 >8 >8 0.332892686 >8 >8 Lapatinib Desc of Lapatinib Name of Lapatinib Url of Lapatinib >8 7.847305298 >8 2.30776763 >8 0.849476227 1.057461143 7.178035259 -Nilotinib NA >8 NA 7.475354671 >8 1.910434365 >8 >8 +LBW242 Desc of LBW242 Name of LBW242 Url of LBW242 >8 >8 >8 >8 >8 >8 >8 >8 +Nilotinib Desc of Nilotinib Name of Nilotinib Url of Nilotinib NA >8 NA 7.475354671 >8 1.910434365 >8 >8 diff --git a/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt index e9006e3dae2..39befb67777 100644 --- a/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt +++ b/test/test_data/study_es_0_import_export/data_mutation_extended_maf_mutations.txt @@ -27,8 +27,8 @@ DTNB 1838 genome.wustl.edu GRCh37 2 25678299 25678299 + Missense_Mutation SNP C ABLIM1 3983 genome.wustl.edu GRCh37 10 116247760 116247760 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MSH3 4437 genome.wustl.edu GRCh37 5 80024722 80024722 + Frame_Shift_Del DEL T - - NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx MYB 4602 genome.wustl.edu GRCh37 6 135507043 135507044 + Frame_Shift_Ins INS - A A NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 - - NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx -TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx TP53 7157 genome.wustl.edu GRCh37 17 7578253 7578253 + Missense_Mutation SNP C A A NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A C NA NA NA NA Unknown NA Germline Phase_IV Capture NA 1 dbGAP IlluminaGAIIx +TP53 7157 genome.wustl.edu GRCh37 17 7576851 7576851 + Splice_Site SNP A C C novel unknown TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown NA Somatic Phase_IV Capture NA 1 dbGAP Illumina GAIIx PIEZO1 9780 genome.wustl.edu GRCh37 16 88790292 88790292 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-02 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx ADAMTS20 80070 genome.wustl.edu GRCh37 12 43944926 43944926 + Missense_Mutation SNP T C C NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 T T NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx OR11H1 81061 genome.wustl.edu GRCh37 22 16449539 16449539 + Missense_Mutation SNP A G G NA NA TCGA-A1-A0SB-01 TCGA-A1-A0SB-10 A A NA NA NA NA Unknown Untested Somatic Phase_IV WXS none 1 dbGAP Illumina GAIIx From ab4f2b1227ec36eb193525f2bd7584c261913ddf Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 16 Apr 2025 09:33:38 +0200 Subject: [PATCH 32/69] Fix metadata tests --- .../application/file/export/ToMetadataKeyValuesTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java index 411b9ca7901..090c845e5e7 100644 --- a/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java +++ b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java @@ -6,6 +6,7 @@ import org.junit.Test; import java.util.LinkedHashMap; +import java.util.List; import static org.junit.Assert.assertEquals; @@ -100,6 +101,7 @@ public void testGeneticProfileDatatypeMetadata() { geneticProfileMetadata.setGenericAssayType("genericAssayType"); geneticProfileMetadata.setCancerStudyIdentifier("study_id1"); geneticProfileMetadata.setSortOrder("ASC"); + geneticProfileMetadata.setGenericEntitiesMetaProperties(List.of("property1", "property2")); var expectedMetadata = new LinkedHashMap(); expectedMetadata.put("cancer_study_identifier", "study_id1"); @@ -114,6 +116,7 @@ public void testGeneticProfileDatatypeMetadata() { expectedMetadata.put("value_sort_order", "ASC"); expectedMetadata.put("patient_level", "false"); expectedMetadata.put("generic_assay_type", "genericAssayType"); + expectedMetadata.put("generic_entities_meta_properties", "property1,property2"); assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); } @@ -135,6 +138,7 @@ public void testGeneticProfileDatatypeMetadataNulls() { expectedMetadata.put("value_sort_order", null); expectedMetadata.put("patient_level", null); expectedMetadata.put("generic_assay_type", null); + expectedMetadata.put("generic_entities_meta_properties", null); assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); } From 46f372cb7c70f4f11d66b0699497df931ea2f2f4 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 18 Apr 2025 12:05:47 +0200 Subject: [PATCH 33/69] Fix unit tests --- .../java/org/cbioportal/application/file/model/Table.java | 2 +- .../application/file/export/ToMetadataKeyValuesTest.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/model/Table.java b/src/main/java/org/cbioportal/application/file/model/Table.java index 673042d58da..6cecaad9b0c 100644 --- a/src/main/java/org/cbioportal/application/file/model/Table.java +++ b/src/main/java/org/cbioportal/application/file/model/Table.java @@ -33,7 +33,7 @@ public Table(CloseableIterator rows) { public Table(CloseableIterator rows, SequencedSet header) { this(rows); - if (this.rows.peek().toRow().size() != header.size()) { + if (this.rows.hasNext() && this.rows.peek().toRow().size() != header.size()) { throw new IllegalArgumentException("Header size does not match row size"); } this.header = header; diff --git a/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java index 090c845e5e7..2d8e549d997 100644 --- a/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java +++ b/src/test/java/org/cbioportal/application/file/export/ToMetadataKeyValuesTest.java @@ -116,7 +116,7 @@ public void testGeneticProfileDatatypeMetadata() { expectedMetadata.put("value_sort_order", "ASC"); expectedMetadata.put("patient_level", "false"); expectedMetadata.put("generic_assay_type", "genericAssayType"); - expectedMetadata.put("generic_entities_meta_properties", "property1,property2"); + expectedMetadata.put("generic_entity_meta_properties", "property1,property2"); assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); } @@ -138,7 +138,7 @@ public void testGeneticProfileDatatypeMetadataNulls() { expectedMetadata.put("value_sort_order", null); expectedMetadata.put("patient_level", null); expectedMetadata.put("generic_assay_type", null); - expectedMetadata.put("generic_entities_meta_properties", null); + expectedMetadata.put("generic_entity_meta_properties", null); assertEquals(expectedMetadata, geneticProfileMetadata.toMetadataKeyValues()); } From 66eeafa264d77c73c6185e911468f6b4398589b4 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 18 Apr 2025 14:48:01 +0200 Subject: [PATCH 34/69] Improve test coverage for all exporters --- ...enericAssayLimitValueDatatypeExporter.java | 17 +- .../MrnaExpressionDatatypeExporter.java | 18 +- .../CancerStudyMetadataExporterTests.java | 61 +++ .../file/export/CaseListsExporterTests.java | 82 ++++ ...linicalAttributeDataTypeExporterTests.java | 39 +- ...cAssayLimitValueDatatypeExporterTests.java | 354 ++++++++++++++++++ ...est.java => MafDataTypeExporterTests.java} | 35 +- .../MrnaExpressionDatatypeExporterTests.java | 176 +++++++++ 8 files changed, 772 insertions(+), 10 deletions(-) create mode 100644 src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java create mode 100644 src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java create mode 100644 src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java rename src/test/java/org/cbioportal/application/file/export/{MafDataTypeExporterTest.java => MafDataTypeExporterTests.java} (84%) create mode 100644 src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java index b3967852184..9c48553ac95 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayLimitValueDatatypeExporter.java @@ -14,9 +14,11 @@ import java.io.IOException; import java.util.HashMap; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.function.Function; public class GenericAssayLimitValueDatatypeExporter extends GeneticProfileDatatypeExporter { @@ -42,6 +44,11 @@ protected String getDatatype() { return "LIMIT-VALUE"; } + private static final LinkedHashMap> ROW = new LinkedHashMap<>(); + + static { + ROW.put("ENTITY_STABLE_ID", data -> data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); + } private class LimitValueGenericProfileExporter extends GeneticProfileExporter { private final GeneticProfileDatatypeMetadata metatdata; @@ -85,7 +92,9 @@ public TableRow next() { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } var row = new LinkedHashMap(); - row.put("ENTITY_STABLE_ID", data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); + for (String columnName : ROW.keySet()) { + row.put(columnName, ROW.get(columnName).apply(data)); + } if (!genericEntitiesMetaProperties.isEmpty()) { var propertyMap = new HashMap(); GenericEntityProperty property = null; @@ -136,7 +145,11 @@ protected CloseableIterator> getData(String studyId if (!this.metatdata.getGenericEntitiesMetaProperties().isEmpty()) { properties = geneticProfileDataService.getGenericEntityMetaProperties(metatdata.getStableId()); } - return new Table(composeRows(geneticProfileData, sampleStableIds, metatdata.getGenericEntitiesMetaProperties(), properties)); + var header = new LinkedHashSet(); + header.addAll(ROW.keySet()); + header.addAll(this.metatdata.getGenericEntitiesMetaProperties()); + header.addAll(sampleStableIds); + return new Table(composeRows(geneticProfileData, sampleStableIds, metatdata.getGenericEntitiesMetaProperties(), properties), header); } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java index f6b21174b5e..2ed4008e6f5 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java @@ -10,9 +10,11 @@ import java.io.IOException; import java.util.LinkedHashMap; +import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.function.Function; public class MrnaExpressionDatatypeExporter extends GeneticProfileDatatypeExporter { @@ -38,6 +40,12 @@ protected String getDatatype() { return "CONTINUOUS"; } + private static final LinkedHashMap> MRNA_ROW = new LinkedHashMap<>(); + + static { + MRNA_ROW.put("Hugo_Symbol", data -> data.getGene() == null ? null : data.getGene().getHugoGeneSymbol()); + MRNA_ROW.put("Entrez_Gene_Id", data -> data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); + } private class MrnaExpressionGeneticProfileExporter extends GeneticProfileExporter { private final GeneticProfileDatatypeMetadata metatdata; @@ -64,8 +72,9 @@ public TableRow next() { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } var row = new LinkedHashMap(); - row.put("Hugo_Symbol", data.getGene() == null ? null : data.getGene().getHugoGeneSymbol()); - row.put("Entrez_Gene_Id", data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); + for (var entry : MRNA_ROW.entrySet()) { + row.put(entry.getKey(), entry.getValue().apply(data)); + } for (int i = 0; i < sampleStableIds.size(); i++) { row.put(sampleStableIds.get(i), data.getValues().get(i)); } @@ -88,7 +97,10 @@ protected CloseableIterator> getData(String studyId } } var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); - return new Table(composeRows(geneticProfileData, sampleStableIds)); + var header = new LinkedHashSet(); + header.addAll(MRNA_ROW.keySet()); + header.addAll(sampleStableIds); + return new Table(composeRows(geneticProfileData, sampleStableIds), header); } } } diff --git a/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java new file mode 100644 index 00000000000..6fd41b2fa8c --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java @@ -0,0 +1,61 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.CancerStudyMetadataExporter; +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; +import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class CancerStudyMetadataExporterTests { + String studyId = "STUDY_ID"; + + @Test + public void testNoData() { + var factory = new InMemoryFileWriterFactory(); + CancerStudyMetadataExporter exporter = new CancerStudyMetadataExporter(new CancerStudyMetadataService(null) { + @Override + public CancerStudyMetadata getCancerStudyMetadata(String studyId) { + return null; + } + }); + + boolean exported = exporter.exportData(factory, studyId); + + assertTrue("No data should be exported", !exported); + var fileContents = factory.getFileContents(); + assertTrue(fileContents.isEmpty()); + } + + @Test + public void testExport() { + var factory = new InMemoryFileWriterFactory(); + CancerStudyMetadataExporter exporter = new CancerStudyMetadataExporter(cancerStudyMetadataService); + + boolean exported = exporter.exportData(factory, studyId); + + assertTrue("Data should be exported", exported); + var fileContents = factory.getFileContents(); + assertEquals(1, fileContents.size()); + assertTrue(fileContents.containsKey("meta_study.txt")); + assertEquals("cancer_study_identifier: STUDY_ID\n" + "type_of_cancer: Breast Cancer\n" + "name: Breast Cancer Study\n" + "description: A study on breast cancer\n" + "citation: Foo et al. 2023\n" + "pmid: 12345678\n" + "groups: Group1, Group2\n" + "add_global_case_list: true\n" + "reference_genome: GRCh38\n", fileContents.get("meta_study.txt").toString()); + } + + CancerStudyMetadataService cancerStudyMetadataService = new CancerStudyMetadataService(null) { + @Override + public CancerStudyMetadata getCancerStudyMetadata(String studyId) { + var cancerStudyMetadata = new CancerStudyMetadata(); + cancerStudyMetadata.setCancerStudyIdentifier(studyId); + cancerStudyMetadata.setTypeOfCancer("Breast Cancer"); + cancerStudyMetadata.setCitation("Foo et al. 2023"); + cancerStudyMetadata.setGroups("Group1, Group2"); + cancerStudyMetadata.setName("Breast Cancer Study"); + cancerStudyMetadata.setDescription("A study on breast cancer"); + cancerStudyMetadata.setAddGlobalCaseList(true); + cancerStudyMetadata.setPmid("12345678"); + cancerStudyMetadata.setReferenceGenome("GRCh38"); + return cancerStudyMetadata; + } + }; +} diff --git a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java new file mode 100644 index 00000000000..5a531d8bddd --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java @@ -0,0 +1,82 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.CaseListsExporter; +import org.cbioportal.application.file.export.services.CaseListMetadataService; +import org.cbioportal.application.file.model.CaseListMetadata; +import org.junit.Test; + +import java.util.LinkedHashSet; +import java.util.List; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +public class CaseListsExporterTests { + + String studyId = "STUDY_ID"; + + @Test + public void testNoCaseLists() { + var factory = new InMemoryFileWriterFactory(); + CaseListsExporter exporter = new CaseListsExporter(new CaseListMetadataService(null) { + @Override + public List getCaseListsMetadata(String studyId) { + return List.of(); + } + }); + + boolean exported = exporter.exportData(factory, studyId); + + assertTrue("No case lists should be exported", !exported); + assertTrue("No files should be created", factory.getFileContents().isEmpty()); + } + + @Test + public void testExportCaseLists() { + var factory = new InMemoryFileWriterFactory(); + CaseListsExporter exporter = new CaseListsExporter(caseListMetadataService); + + boolean exported = exporter.exportData(factory, studyId); + + var fileContents = factory.getFileContents(); + assertTrue("Case lists should be exported", exported); + assertEquals(2, fileContents.size()); + assertTrue(fileContents.containsKey("case_lists/cases_stable_id_1.txt")); + assertTrue(fileContents.containsKey("case_lists/cases_stable_id_2.txt")); + + assertEquals("cancer_study_identifier: STUDY_ID\n" + + "stable_id: " + studyId + "_stable_id_1\n" + + "case_list_name: Case List 1\n" + + "case_list_description: Description for Case List 1\n" + + "case_list_ids: SAMPLE_1\tSAMPLE_2\n", + fileContents.get("case_lists/cases_stable_id_1.txt").toString()); //note: the study id is excluded from the stable id in the file name + + assertEquals("cancer_study_identifier: STUDY_ID\n" + + "stable_id: stable_id_2\n" + + "case_list_name: Case List 2\n" + + "case_list_description: Description for Case List 2\n" + + "case_list_ids: SAMPLE_3\tSAMPLE_4\n", + fileContents.get("case_lists/cases_stable_id_2.txt").toString()); + } + + CaseListMetadataService caseListMetadataService = new CaseListMetadataService(null) { + @Override + public List getCaseListsMetadata(String studyId) { + var caseList1 = new CaseListMetadata(); + caseList1.setCancerStudyIdentifier(studyId); + caseList1.setStableId(studyId + "_" +"stable_id_1"); + caseList1.setName("Case List 1"); + caseList1.setDescription("Description for Case List 1"); + caseList1.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_1", "SAMPLE_2"))); + + var caseList2 = new CaseListMetadata(); + caseList2.setCancerStudyIdentifier(studyId); + caseList2.setStableId("stable_id_2"); + caseList2.setName("Case List 2"); + caseList2.setDescription("Description for Case List 2"); + caseList2.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_3", "SAMPLE_4"))); + + return List.of(caseList1, caseList2); + } + }; +} \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java index 9672009a04d..33817a3f3b8 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java @@ -12,16 +12,34 @@ import java.util.Set; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; public class ClinicalAttributeDataTypeExporterTests { + @Test + public void testNoClinicalSampleAttributeData() { + var factory = new InMemoryFileWriterFactory(); + + boolean exported = new ClinicalSampleAttributesDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public boolean hasClinicalSampleAttributes(String studyId) { + return false; + } + }).exportData(factory, "TEST_STUDY_ID"); + + assertFalse("No data should be exported", exported); + var fileContents = factory.getFileContents(); + assertTrue(fileContents.isEmpty()); + } @Test public void testGetClinicalSampleAttributeData() { var factory = new InMemoryFileWriterFactory(); - new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + boolean exported = new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + assertTrue("Data should be exported", exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_clinical_sample_attributes.txt", "data_clinical_sample_attributes.txt"), fileContents.keySet()); @@ -44,12 +62,29 @@ public void testGetClinicalSampleAttributeData() { fileContents.get("data_clinical_sample_attributes.txt").toString()); } + @Test + public void testNoClinicalPatientAttributeData() { + var factory = new InMemoryFileWriterFactory(); + + boolean exported = new ClinicalPatientAttributesDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public boolean hasClinicalPatientAttributes(String studyId) { + return false; + } + }).exportData(factory, "TEST_STUDY_ID"); + + assertFalse("No data should be exported", exported); + var fileContents = factory.getFileContents(); + assertTrue(fileContents.isEmpty()); + } + @Test public void testGetClinicalPatientAttributeData() { var factory = new InMemoryFileWriterFactory(); - new ClinicalPatientAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + boolean exported = new ClinicalPatientAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + assertTrue("Data should be exported", exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_clinical_patient_attributes.txt", "data_clinical_patient_attributes.txt"), fileContents.keySet()); diff --git a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java new file mode 100644 index 00000000000..e7a08da8274 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java @@ -0,0 +1,354 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.GenericEntityProperty; +import org.cbioportal.application.file.model.GeneticEntity; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import static java.util.Collections.emptyList; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +public class GenericAssayLimitValueDatatypeExporterTests { + + @Test + public void testNullSampleStableId() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public List getSampleStableIds(String molecularProfileStableId) { + var list = new ArrayList(); + list.add("SAMPLE_1"); + list.add(null); // Adding a null sample ID + return list; + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return emptyList(); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Sample stable ID is null")); + } + + @Test + public void testMismatchedSampleSizes() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + var geneticEntity = new GeneticEntity(); + geneticEntity.setGeneticEntityId(1); + geneticEntity.setStableId("GENETIC_ENTITY_1"); + data.setGeneticEntity(geneticEntity); + data.setCommaSeparatedValues("1.23"); // Only one value + return new SimpleCloseableIterator<>(List.of(data)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); // Two sample IDs + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return emptyList(); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Number of values does not match number of sample stable IDs")); + } + + @Test + public void testGeneticEntityIdNotAscending() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data1 = new GeneticProfileData(); + var geneticEntity2 = new GeneticEntity(); + geneticEntity2.setGeneticEntityId(2); + data1.setGeneticEntity(geneticEntity2); + var geneticEntity1 = new GeneticEntity(); + geneticEntity1.setGeneticEntityId(1); // First entity + GeneticProfileData data2 = new GeneticProfileData(); + data2.setGeneticEntity(geneticEntity1); + return new SimpleCloseableIterator<>(List.of(data1, data2)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); // Two sample IDs + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return emptyList(); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Genetic entity ID is not in ascending order")); + } + + @Test + public void testNullPropertyName() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getGenericEntityMetaProperties(String molecularProfileStableId) { + GenericEntityProperty property = new GenericEntityProperty(); + property.setGeneticEntityId(1); + property.setName(null); // Null property name + return new SimpleCloseableIterator<>(List.of(property)); + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return List.of("property1"); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); // Two sample IDs + } + + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + var geneticEntity = new GeneticEntity(); + geneticEntity.setGeneticEntityId(1); + geneticEntity.setStableId("GENETIC_ENTITY_1"); + data.setGeneticEntity(geneticEntity); + data.setCommaSeparatedValues("1.23,2.34"); // Two values + return new SimpleCloseableIterator<>(List.of(data)); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Property name is null")); + } + + @Test + public void throwsExceptionWhenGeneticEntityIsNull() { + var factory = new InMemoryFileWriterFactory(); + + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + data.setGeneticEntity(null); // Genetic entity is null + return new SimpleCloseableIterator<>(List.of(data)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1"); + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return emptyList(); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Genetic entity is null")); + } + + @Test + public void throwsExceptionWhenGeneticEntityIdIsNull() { + var factory = new InMemoryFileWriterFactory(); + + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + var geneticEntity = new GeneticEntity(); + geneticEntity.setGeneticEntityId(null); // Genetic entity ID is null + data.setGeneticEntity(geneticEntity); + return new SimpleCloseableIterator<>(List.of(data)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1"); + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return emptyList(); + } + }; + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Genetic entity ID is null")); + } + + @Test + public void testExport() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data1 = new GeneticProfileData(); + var geneticEntity1 = new GeneticEntity(); + geneticEntity1.setGeneticEntityId(1); + geneticEntity1.setStableId("GENETIC_ENTITY_1"); + data1.setGeneticEntity(geneticEntity1); + data1.setCommaSeparatedValues("1.23,2.34,3.45"); + + GeneticProfileData data2 = new GeneticProfileData(); + var geneticEntity2 = new GeneticEntity(); + geneticEntity2.setGeneticEntityId(2); + geneticEntity2.setStableId("GENETIC_ENTITY_2"); + data2.setGeneticEntity(geneticEntity2); + data2.setCommaSeparatedValues("4.56,5.67,6.78"); + + return new SimpleCloseableIterator<>(List.of(data1, data2)); + } + + @Override + public CloseableIterator getGenericEntityMetaProperties(String molecularProfileStableId) { + GenericEntityProperty property1 = new GenericEntityProperty(); + property1.setGeneticEntityId(1); + property1.setName("property1"); + property1.setValue("value1"); + + GenericEntityProperty property2 = new GenericEntityProperty(); + property2.setGeneticEntityId(1); + property2.setName("property2"); + property2.setValue("value2"); + + GenericEntityProperty property3 = new GenericEntityProperty(); + property3.setGeneticEntityId(2); + property3.setName("property1"); + property3.setValue("value3"); + + return new SimpleCloseableIterator<>(List.of(property1, property2, property3)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2", "SAMPLE_3"); + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return List.of("property1", "property2"); + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertTrue(exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_generic_assay_limit-value_generic_assay_stable_id.txt", "data_generic_assay_limit-value_generic_assay_stable_id.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: GENERIC_ASSAY\n" + + "datatype: LIMIT-VALUE\n" + + "stable_id: GENERIC_ASSAY_STABLE_ID\n" + + "generic_entity_meta_properties: property1,property2\n" + + "data_filename: data_generic_assay_limit-value_generic_assay_stable_id.txt\n", fileContents.get("meta_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); + + assertEquals(""" + ENTITY_STABLE_ID\tproperty1\tproperty2\tSAMPLE_1\tSAMPLE_2\tSAMPLE_3 + GENETIC_ENTITY_1\tvalue1\tvalue2\t1.23\t2.34\t3.45 + GENETIC_ENTITY_2\tvalue3\t\t4.56\t5.67\t6.78 + """, fileContents.get("data_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); + } + + @Test + public void exportsDataWithOnlyHeaderWhenNoRows() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(List.of()); // No rows + } + + @Override + public CloseableIterator getGenericEntityMetaProperties(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(List.of()); // No properties + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2", "SAMPLE_3"); // Sample IDs for the header + } + + @Override + public List getDistinctGenericEntityMetaPropertyNames(String molecularProfileStableId) { + return List.of("property1", "property2"); // Properties for the header + } + }; + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertTrue(exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_generic_assay_limit-value_generic_assay_stable_id.txt", "data_generic_assay_limit-value_generic_assay_stable_id.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: GENERIC_ASSAY\n" + + "datatype: LIMIT-VALUE\n" + + "stable_id: GENERIC_ASSAY_STABLE_ID\n" + + "generic_entity_meta_properties: property1,property2\n" + + "data_filename: data_generic_assay_limit-value_generic_assay_stable_id.txt\n", fileContents.get("meta_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); + + assertEquals(""" + ENTITY_STABLE_ID\tproperty1\tproperty2\tSAMPLE_1\tSAMPLE_2\tSAMPLE_3 + """, fileContents.get("data_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); + } + + GeneticProfileService geneticProfileService = new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); + metadata.setGeneticAlterationType("GENERIC_ASSAY"); + metadata.setDatatype("LIMIT-VALUE"); + return List.of(metadata); + } + }; +} \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java similarity index 84% rename from src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java rename to src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java index 4e75a88947b..b0d9072d3cb 100644 --- a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTest.java +++ b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java @@ -13,8 +13,11 @@ import static java.util.Collections.emptyList; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +public class MafDataTypeExporterTests { -public class MafDataTypeExporterTest { GeneticProfileService geneticProfileService = new GeneticProfileService(null) { @Override public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { @@ -27,6 +30,29 @@ public List getGeneticProfiles(String studyId, S } }; + @Test + public void testNotExported() { + var factory = new InMemoryFileWriterFactory(); + + MafRecordService mafRecordService = new MafRecordService(null) { + @Override + public CloseableIterator getMafRecords(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(emptyList()); + } + }; + + MafDataTypeExporter mafDataTypeExporter = new MafDataTypeExporter(new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + return emptyList(); + } + }, mafRecordService); + + boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + + assertFalse(exported); + } + @Test public void testMafDataTypeExport() { var factory = new InMemoryFileWriterFactory(); @@ -79,8 +105,9 @@ public CloseableIterator getMafRecords(String molecularProfileStableI MafDataTypeExporter mafDataTypeExporter = new MafDataTypeExporter(geneticProfileService, mafRecordService); - mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + assertTrue(exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_mutation_extended_maf_maf_stable_id.txt", "data_mutation_extended_maf_maf_stable_id.txt"), fileContents.keySet()); @@ -109,8 +136,9 @@ public CloseableIterator getMafRecords(String molecularProfileStableI MafDataTypeExporter mafDataTypeExporter = new MafDataTypeExporter(geneticProfileService, mafRecordService); - mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + assertTrue(exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_mutation_extended_maf_maf_stable_id.txt", "data_mutation_extended_maf_maf_stable_id.txt"), fileContents.keySet()); @@ -118,4 +146,5 @@ public CloseableIterator getMafRecords(String molecularProfileStableI Hugo_Symbol\tEntrez_Gene_Id\tCenter\tNCBI_Build\tChromosome\tStart_Position\tEnd_Position\tStrand\tVariant_Classification\tVariant_Type\tReference_Allele\tTumor_Seq_Allele1\tTumor_Seq_Allele2\tdbSNP_RS\tdbSNP_Val_Status\tTumor_Sample_Barcode\tMatched_Norm_Sample_Barcode\tMatch_Norm_Seq_Allele1\tMatch_Norm_Seq_Allele2\tTumor_Validation_Allele1\tTumor_Validation_Allele2\tMatch_Norm_Validation_Allele1\tMatch_Norm_Validation_Allele2\tVerification_Status\tValidation_Status\tMutation_Status\tSequencing_Phase\tSequence_Source\tValidation_Method\tScore\tBAM_File\tSequencer\tHGVSp_Short\tt_alt_count\tt_ref_count\tn_alt_count\tn_ref_count """, fileContents.get("data_mutation_extended_maf_maf_stable_id.txt").toString()); } + } diff --git a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java new file mode 100644 index 00000000000..205ea64c0e9 --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java @@ -0,0 +1,176 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.MrnaExpressionDatatypeExporter; +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.Gene; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.junit.Test; + +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import static java.util.Collections.emptyList; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertThrows; + +public class MrnaExpressionDatatypeExporterTests { + + @Test + public void testNotExported() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(emptyList()); + } + }; + + MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + return emptyList(); + } + }, geneticProfileDataService); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertEquals(false, exported); + } + + @Test + public void testMrnaExpressionExport() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + var gene = new Gene(); + gene.setHugoGeneSymbol("GENE_SYMBOL"); + gene.setEntrezGeneId(12345); + data.setGene(gene); + data.setCommaSeparatedValues("1.23,4.56,"); + return new SimpleCloseableIterator<>(List.of(data)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); + } + }; + + MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertEquals(true, exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_mrna_expression_continuous_maf_stable_id.txt", "data_mrna_expression_continuous_maf_stable_id.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: MRNA_EXPRESSION\n" + + "datatype: CONTINUOUS\n" + + "stable_id: MAF_STABLE_ID\n" + + "data_filename: data_mrna_expression_continuous_maf_stable_id.txt\n", fileContents.get("meta_mrna_expression_continuous_maf_stable_id.txt").toString()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tSAMPLE_1\tSAMPLE_2 + GENE_SYMBOL\t12345\t1.23\t4.56 + """, fileContents.get("data_mrna_expression_continuous_maf_stable_id.txt").toString()); + } + + @Test + public void testMrnaExpressionExportNoRows() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + return new SimpleCloseableIterator<>(emptyList()); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); + } + }; + + MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertEquals(true, exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_mrna_expression_continuous_maf_stable_id.txt", "data_mrna_expression_continuous_maf_stable_id.txt"), fileContents.keySet()); + + assertEquals(""" + Hugo_Symbol\tEntrez_Gene_Id\tSAMPLE_1\tSAMPLE_2 + """, fileContents.get("data_mrna_expression_continuous_maf_stable_id.txt").toString()); + } + + @Test + public void testMismatchedSampleSizes() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public CloseableIterator getData(String molecularProfileStableId) { + GeneticProfileData data = new GeneticProfileData(); + var gene = new Gene(); + gene.setHugoGeneSymbol("GENE_SYMBOL"); + gene.setEntrezGeneId(12345); + data.setGene(gene); + data.setCommaSeparatedValues("1.23"); // Only one value + return new SimpleCloseableIterator<>(List.of(data)); + } + + @Override + public List getSampleStableIds(String molecularProfileStableId) { + return List.of("SAMPLE_1", "SAMPLE_2"); // Two sample IDs + } + }; + + MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Number of values does not match number of sample stable IDs")); + } + + @Test + public void testNullSampleStableId() { + var factory = new InMemoryFileWriterFactory(); + + GeneticProfileDataService geneticProfileDataService = new GeneticProfileDataService(null) { + @Override + public List getSampleStableIds(String molecularProfileStableId) { + var list = new ArrayList(); + list.add("SAMPLE_1"); + list.add(null); // Adding a null sample ID + return list; + } + }; + + MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Sample stable ID is null")); + } + + GeneticProfileService geneticProfileService = new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setStableId("MAF_STABLE_ID"); + metadata.setGeneticAlterationType("MRNA_EXPRESSION"); + metadata.setDatatype("CONTINUOUS"); + return List.of(metadata); + } + }; +} \ No newline at end of file From 525bc4616e1813f38a6ed9232cdb82d256479a02 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 18 Apr 2025 15:07:45 +0200 Subject: [PATCH 35/69] Expand MRNA export support to Z-SCORE and DISCRETE --- .../application/file/export/ExportConfig.java | 25 +++++++++-- ...aExpressionContinuousDatatypeExporter.java | 15 +++++++ .../MrnaExpressionDatatypeExporter.java | 9 +--- ...rnaExpressionDiscreteDatatypeExporter.java | 15 +++++++ .../MrnaExpressionZScoreDatatypeExporter.java | 15 +++++++ .../CancerStudyMetadataExporterTests.java | 36 +++++++-------- .../file/export/CaseListsExporterTests.java | 44 +++++++++---------- ...cAssayLimitValueDatatypeExporterTests.java | 24 +++++----- .../MrnaExpressionDatatypeExporterTests.java | 44 ++++++++++--------- ...expression_z-score_mrna_median_zscores.txt | 6 +++ ...expression_z-score_mrna_median_zscores.txt | 9 ++++ 11 files changed, 158 insertions(+), 84 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionContinuousDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDiscreteDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionZScoreDatatypeExporter.java create mode 100644 test/test_data/study_es_0_import_export/data_mrna_expression_z-score_mrna_median_zscores.txt create mode 100644 test/test_data/study_es_0_import_export/meta_mrna_expression_z-score_mrna_median_zscores.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 30d4ea54566..45879692e03 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -9,7 +9,10 @@ import org.cbioportal.application.file.export.exporters.Exporter; import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; +import org.cbioportal.application.file.export.exporters.MrnaExpressionContinuousDatatypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionDatatypeExporter; +import org.cbioportal.application.file.export.exporters.MrnaExpressionDiscreteDatatypeExporter; +import org.cbioportal.application.file.export.exporters.MrnaExpressionZScoreDatatypeExporter; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; @@ -127,7 +130,9 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, MafDataTypeExporter mafMetadataAndDataExporter, - MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter, + MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter, + MrnaExpressionZScoreDatatypeExporter mrnaExpressionZScoreDatatypeExporter, + MrnaExpressionDiscreteDatatypeExporter mrnaExpressionDiscreteDatatypeExporter, GenericAssayLimitValueDatatypeExporter genericAssayLimitValueDatatypeExporter, CaseListsExporter caseListsExporter) { return List.of( @@ -135,7 +140,9 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE clinicalPatientAttributesMetadataAndDataExporter, clinicalSampleAttributesMetadataAndDataExporter, mafMetadataAndDataExporter, - mrnaExpressionDatatypeExporter, + mrnaExpressionContinuousDatatypeExporter, + mrnaExpressionZScoreDatatypeExporter, + mrnaExpressionDiscreteDatatypeExporter, genericAssayLimitValueDatatypeExporter, caseListsExporter ); @@ -162,8 +169,18 @@ public MafDataTypeExporter mafMetadataAndDataExporter(GeneticProfileService gene } @Bean - public MrnaExpressionDatatypeExporter mrnaExpressionDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { - return new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + public MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + + @Bean + public MrnaExpressionZScoreDatatypeExporter mrnaExpressionZScoreDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new MrnaExpressionZScoreDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + + @Bean + public MrnaExpressionDiscreteDatatypeExporter mrnaExpressionDiscreteDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new MrnaExpressionDiscreteDatatypeExporter(geneticProfileService, geneticProfileDataService); } @Bean diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionContinuousDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionContinuousDatatypeExporter.java new file mode 100644 index 00000000000..ba3ce668edb --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionContinuousDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class MrnaExpressionContinuousDatatypeExporter extends MrnaExpressionDatatypeExporter { + public MrnaExpressionContinuousDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "CONTINUOUS"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java index 2ed4008e6f5..febadd8232b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDatatypeExporter.java @@ -16,7 +16,7 @@ import java.util.SequencedMap; import java.util.function.Function; -public class MrnaExpressionDatatypeExporter extends GeneticProfileDatatypeExporter { +public abstract class MrnaExpressionDatatypeExporter extends GeneticProfileDatatypeExporter { private final GeneticProfileDataService geneticProfileDataService; @@ -34,12 +34,7 @@ protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { protected String getGeneticAlterationType() { return "MRNA_EXPRESSION"; } - - @Override - protected String getDatatype() { - return "CONTINUOUS"; - } - + private static final LinkedHashMap> MRNA_ROW = new LinkedHashMap<>(); static { diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDiscreteDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDiscreteDatatypeExporter.java new file mode 100644 index 00000000000..26044ed1bdf --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionDiscreteDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class MrnaExpressionDiscreteDatatypeExporter extends MrnaExpressionDatatypeExporter { + public MrnaExpressionDiscreteDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "DISCRETE"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionZScoreDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionZScoreDatatypeExporter.java new file mode 100644 index 00000000000..e07c99dc78c --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MrnaExpressionZScoreDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class MrnaExpressionZScoreDatatypeExporter extends MrnaExpressionDatatypeExporter { + public MrnaExpressionZScoreDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "Z-SCORE"; + } +} diff --git a/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java index 6fd41b2fa8c..3333cb3bda8 100644 --- a/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java @@ -6,10 +6,27 @@ import org.junit.Test; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class CancerStudyMetadataExporterTests { String studyId = "STUDY_ID"; + CancerStudyMetadataService cancerStudyMetadataService = new CancerStudyMetadataService(null) { + @Override + public CancerStudyMetadata getCancerStudyMetadata(String studyId) { + var cancerStudyMetadata = new CancerStudyMetadata(); + cancerStudyMetadata.setCancerStudyIdentifier(studyId); + cancerStudyMetadata.setTypeOfCancer("Breast Cancer"); + cancerStudyMetadata.setCitation("Foo et al. 2023"); + cancerStudyMetadata.setGroups("Group1, Group2"); + cancerStudyMetadata.setName("Breast Cancer Study"); + cancerStudyMetadata.setDescription("A study on breast cancer"); + cancerStudyMetadata.setAddGlobalCaseList(true); + cancerStudyMetadata.setPmid("12345678"); + cancerStudyMetadata.setReferenceGenome("GRCh38"); + return cancerStudyMetadata; + } + }; @Test public void testNoData() { @@ -23,7 +40,7 @@ public CancerStudyMetadata getCancerStudyMetadata(String studyId) { boolean exported = exporter.exportData(factory, studyId); - assertTrue("No data should be exported", !exported); + assertFalse("No data should be exported", exported); var fileContents = factory.getFileContents(); assertTrue(fileContents.isEmpty()); } @@ -41,21 +58,4 @@ public void testExport() { assertTrue(fileContents.containsKey("meta_study.txt")); assertEquals("cancer_study_identifier: STUDY_ID\n" + "type_of_cancer: Breast Cancer\n" + "name: Breast Cancer Study\n" + "description: A study on breast cancer\n" + "citation: Foo et al. 2023\n" + "pmid: 12345678\n" + "groups: Group1, Group2\n" + "add_global_case_list: true\n" + "reference_genome: GRCh38\n", fileContents.get("meta_study.txt").toString()); } - - CancerStudyMetadataService cancerStudyMetadataService = new CancerStudyMetadataService(null) { - @Override - public CancerStudyMetadata getCancerStudyMetadata(String studyId) { - var cancerStudyMetadata = new CancerStudyMetadata(); - cancerStudyMetadata.setCancerStudyIdentifier(studyId); - cancerStudyMetadata.setTypeOfCancer("Breast Cancer"); - cancerStudyMetadata.setCitation("Foo et al. 2023"); - cancerStudyMetadata.setGroups("Group1, Group2"); - cancerStudyMetadata.setName("Breast Cancer Study"); - cancerStudyMetadata.setDescription("A study on breast cancer"); - cancerStudyMetadata.setAddGlobalCaseList(true); - cancerStudyMetadata.setPmid("12345678"); - cancerStudyMetadata.setReferenceGenome("GRCh38"); - return cancerStudyMetadata; - } - }; } diff --git a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java index 5a531d8bddd..3b1430b13d8 100644 --- a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java @@ -9,11 +9,32 @@ import java.util.List; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class CaseListsExporterTests { String studyId = "STUDY_ID"; + CaseListMetadataService caseListMetadataService = new CaseListMetadataService(null) { + @Override + public List getCaseListsMetadata(String studyId) { + var caseList1 = new CaseListMetadata(); + caseList1.setCancerStudyIdentifier(studyId); + caseList1.setStableId(studyId + "_" + "stable_id_1"); + caseList1.setName("Case List 1"); + caseList1.setDescription("Description for Case List 1"); + caseList1.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_1", "SAMPLE_2"))); + + var caseList2 = new CaseListMetadata(); + caseList2.setCancerStudyIdentifier(studyId); + caseList2.setStableId("stable_id_2"); + caseList2.setName("Case List 2"); + caseList2.setDescription("Description for Case List 2"); + caseList2.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_3", "SAMPLE_4"))); + + return List.of(caseList1, caseList2); + } + }; @Test public void testNoCaseLists() { @@ -27,7 +48,7 @@ public List getCaseListsMetadata(String studyId) { boolean exported = exporter.exportData(factory, studyId); - assertTrue("No case lists should be exported", !exported); + assertFalse("No case lists should be exported", exported); assertTrue("No files should be created", factory.getFileContents().isEmpty()); } @@ -58,25 +79,4 @@ public void testExportCaseLists() { + "case_list_ids: SAMPLE_3\tSAMPLE_4\n", fileContents.get("case_lists/cases_stable_id_2.txt").toString()); } - - CaseListMetadataService caseListMetadataService = new CaseListMetadataService(null) { - @Override - public List getCaseListsMetadata(String studyId) { - var caseList1 = new CaseListMetadata(); - caseList1.setCancerStudyIdentifier(studyId); - caseList1.setStableId(studyId + "_" +"stable_id_1"); - caseList1.setName("Case List 1"); - caseList1.setDescription("Description for Case List 1"); - caseList1.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_1", "SAMPLE_2"))); - - var caseList2 = new CaseListMetadata(); - caseList2.setCancerStudyIdentifier(studyId); - caseList2.setStableId("stable_id_2"); - caseList2.setName("Case List 2"); - caseList2.setDescription("Description for Case List 2"); - caseList2.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_3", "SAMPLE_4"))); - - return List.of(caseList1, caseList2); - } - }; } \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java index e7a08da8274..e125502ba7c 100644 --- a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java @@ -23,6 +23,18 @@ public class GenericAssayLimitValueDatatypeExporterTests { + GeneticProfileService geneticProfileService = new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); + metadata.setGeneticAlterationType("GENERIC_ASSAY"); + metadata.setDatatype("LIMIT-VALUE"); + return List.of(metadata); + } + }; + @Test public void testNullSampleStableId() { var factory = new InMemoryFileWriterFactory(); @@ -339,16 +351,4 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr ENTITY_STABLE_ID\tproperty1\tproperty2\tSAMPLE_1\tSAMPLE_2\tSAMPLE_3 """, fileContents.get("data_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); } - - GeneticProfileService geneticProfileService = new GeneticProfileService(null) { - @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { - GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); - metadata.setCancerStudyIdentifier(studyId); - metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); - metadata.setGeneticAlterationType("GENERIC_ASSAY"); - metadata.setDatatype("LIMIT-VALUE"); - return List.of(metadata); - } - }; } \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java index 205ea64c0e9..45982701f4b 100644 --- a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java @@ -1,6 +1,6 @@ package org.cbioportal.application.file.export; -import org.cbioportal.application.file.export.exporters.MrnaExpressionDatatypeExporter; +import org.cbioportal.application.file.export.exporters.MrnaExpressionContinuousDatatypeExporter; import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.Gene; @@ -17,10 +17,24 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; public class MrnaExpressionDatatypeExporterTests { + GeneticProfileService geneticProfileService = new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setStableId("MAF_STABLE_ID"); + metadata.setGeneticAlterationType("MRNA_EXPRESSION"); + metadata.setDatatype("CONTINUOUS"); + return List.of(metadata); + } + }; + @Test public void testNotExported() { var factory = new InMemoryFileWriterFactory(); @@ -32,7 +46,7 @@ public CloseableIterator getData(String molecularProfileStab } }; - MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(new GeneticProfileService(null) { + MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(new GeneticProfileService(null) { @Override public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { return emptyList(); @@ -41,7 +55,7 @@ public List getGeneticProfiles(String studyId, S boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); - assertEquals(false, exported); + assertFalse(exported); } @Test @@ -66,11 +80,11 @@ public List getSampleStableIds(String molecularProfileStableId) { } }; - MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); - assertEquals(true, exported); + assertTrue(exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_mrna_expression_continuous_maf_stable_id.txt", "data_mrna_expression_continuous_maf_stable_id.txt"), fileContents.keySet()); @@ -102,11 +116,11 @@ public List getSampleStableIds(String molecularProfileStableId) { } }; - MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); - assertEquals(true, exported); + assertTrue(exported); var fileContents = factory.getFileContents(); assertEquals(Set.of("meta_mrna_expression_continuous_maf_stable_id.txt", "data_mrna_expression_continuous_maf_stable_id.txt"), fileContents.keySet()); @@ -137,7 +151,7 @@ public List getSampleStableIds(String molecularProfileStableId) { } }; - MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); assertThat(exception.getMessage(), containsString("Number of values does not match number of sample stable IDs")); @@ -157,20 +171,8 @@ public List getSampleStableIds(String molecularProfileStableId) { } }; - MrnaExpressionDatatypeExporter exporter = new MrnaExpressionDatatypeExporter(geneticProfileService, geneticProfileDataService); + MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); assertThat(exception.getMessage(), containsString("Sample stable ID is null")); } - - GeneticProfileService geneticProfileService = new GeneticProfileService(null) { - @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { - GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); - metadata.setCancerStudyIdentifier(studyId); - metadata.setStableId("MAF_STABLE_ID"); - metadata.setGeneticAlterationType("MRNA_EXPRESSION"); - metadata.setDatatype("CONTINUOUS"); - return List.of(metadata); - } - }; } \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_mrna_expression_z-score_mrna_median_zscores.txt b/test/test_data/study_es_0_import_export/data_mrna_expression_z-score_mrna_median_zscores.txt new file mode 100644 index 00000000000..1053d61512b --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_mrna_expression_z-score_mrna_median_zscores.txt @@ -0,0 +1,6 @@ +Hugo_Symbol Entrez_Gene_Id TCGA-A1-A0SD-01 TCGA-A1-A0SE-01 TCGA-A1-A0SH-01 TCGA-A1-A0SJ-01 TCGA-A1-A0SK-01 TCGA-A1-A0SM-01 TCGA-A1-A0SO-01 TCGA-A1-A0SP-01 TCGA-A2-A04N-01 TCGA-A2-A04P-01 TCGA-A2-A04Q-01 TCGA-A2-A04R-01 TCGA-A2-A04T-01 TCGA-A2-A04U-01 TCGA-A2-A04V-01 TCGA-A2-A04W-01 TCGA-A2-A04X-01 TCGA-A2-A04Y-01 TCGA-A2-A0CL-01 TCGA-A2-A0CM-01 TCGA-A2-A0CP-01 TCGA-A2-A0CQ-01 TCGA-A2-A0CS-01 TCGA-A2-A0CT-01 TCGA-A2-A0CU-01 TCGA-A2-A0CV-01 TCGA-A2-A0CW-01 TCGA-A2-A0CX-01 TCGA-A2-A0CY-01 TCGA-A2-A0CZ-01 TCGA-A2-A0D0-01 TCGA-A2-A0D1-01 TCGA-A2-A0D2-01 TCGA-A2-A0D3-01 TCGA-A2-A0D4-01 TCGA-A2-A0EM-01 TCGA-A2-A0EN-01 TCGA-A2-A0EO-01 TCGA-A2-A0EQ-01 TCGA-A2-A0ER-01 TCGA-A2-A0ES-01 TCGA-A2-A0ET-01 TCGA-A2-A0EU-01 TCGA-A2-A0EV-01 TCGA-A2-A0EW-01 TCGA-A2-A0EX-01 TCGA-A2-A0EY-01 TCGA-A2-A0ST-01 TCGA-A2-A0SU-01 TCGA-A2-A0SV-01 TCGA-A2-A0SW-01 TCGA-A2-A0SX-01 TCGA-A2-A0SY-01 TCGA-A2-A0T0-01 TCGA-A2-A0T1-01 TCGA-A2-A0T2-01 TCGA-A2-A0T3-01 TCGA-A2-A0T4-01 TCGA-A2-A0T5-01 TCGA-A2-A0T6-01 TCGA-A2-A0T7-01 TCGA-A2-A0YC-01 TCGA-A2-A0YD-01 TCGA-A2-A0YE-01 TCGA-A2-A0YF-01 TCGA-A2-A0YG-01 TCGA-A2-A0YH-01 TCGA-A2-A0YI-01 TCGA-A2-A0YJ-01 TCGA-A2-A0YK-01 TCGA-A2-A0YL-01 TCGA-A2-A0YM-01 TCGA-A2-A0YT-01 TCGA-A7-A0CD-01 TCGA-A7-A0CE-01 TCGA-A7-A0CG-01 TCGA-A7-A0CH-01 TCGA-A7-A0CJ-01 TCGA-A7-A0D9-01 TCGA-A7-A0DA-01 TCGA-A7-A0DB-01 TCGA-A7-A13D-01 TCGA-A7-A13E-01 TCGA-A7-A13F-01 TCGA-A8-A06N-01 TCGA-A8-A06O-01 TCGA-A8-A06P-01 TCGA-A8-A06Q-01 TCGA-A8-A06R-01 TCGA-A8-A06T-01 TCGA-A8-A06U-01 TCGA-A8-A06X-01 TCGA-A8-A06Y-01 TCGA-A8-A06Z-01 TCGA-A8-A075-01 TCGA-A8-A076-01 TCGA-A8-A079-01 TCGA-A8-A07B-01 TCGA-A8-A07C-01 TCGA-A8-A07E-01 TCGA-A8-A07F-01 TCGA-A8-A07G-01 TCGA-A8-A07I-01 TCGA-A8-A07J-01 TCGA-A8-A07L-01 TCGA-A8-A07O-01 TCGA-A8-A07P-01 TCGA-A8-A07R-01 TCGA-A8-A07S-01 TCGA-A8-A07U-01 TCGA-A8-A07W-01 TCGA-A8-A07Z-01 TCGA-A8-A081-01 TCGA-A8-A082-01 TCGA-A8-A083-01 TCGA-A8-A084-01 TCGA-A8-A085-01 TCGA-A8-A086-01 TCGA-A8-A08A-01 TCGA-A8-A08B-01 TCGA-A8-A08C-01 TCGA-A8-A08F-01 TCGA-A8-A08G-01 TCGA-A8-A08H-01 TCGA-A8-A08I-01 TCGA-A8-A08J-01 TCGA-A8-A08L-01 TCGA-A8-A08O-01 TCGA-A8-A08P-01 TCGA-A8-A08R-01 TCGA-A8-A08S-01 TCGA-A8-A08T-01 TCGA-A8-A08X-01 TCGA-A8-A08Z-01 TCGA-A8-A090-01 TCGA-A8-A091-01 TCGA-A8-A092-01 TCGA-A8-A093-01 TCGA-A8-A094-01 TCGA-A8-A095-01 TCGA-A8-A096-01 TCGA-A8-A097-01 TCGA-A8-A099-01 TCGA-A8-A09A-01 TCGA-A8-A09B-01 TCGA-A8-A09C-01 TCGA-A8-A09D-01 TCGA-A8-A09E-01 TCGA-A8-A09G-01 TCGA-A8-A09I-01 TCGA-A8-A09K-01 TCGA-A8-A09M-01 TCGA-A8-A09N-01 TCGA-A8-A09Q-01 TCGA-A8-A09R-01 TCGA-A8-A09T-01 TCGA-A8-A09V-01 TCGA-A8-A09W-01 TCGA-A8-A09X-01 TCGA-A8-A09Z-01 TCGA-A8-A0A1-01 TCGA-A8-A0A2-01 TCGA-A8-A0A4-01 TCGA-A8-A0A6-01 TCGA-A8-A0A7-01 TCGA-A8-A0A9-01 TCGA-A8-A0AB-01 TCGA-A8-A0AD-01 TCGA-AN-A03X-01 TCGA-AN-A03Y-01 TCGA-AN-A041-01 TCGA-AN-A046-01 TCGA-AN-A049-01 TCGA-AN-A04A-01 TCGA-AN-A04C-01 TCGA-AN-A04D-01 TCGA-AN-A0AJ-01 TCGA-AN-A0AK-01 TCGA-AN-A0AL-01 TCGA-AN-A0AM-01 TCGA-AN-A0AR-01 TCGA-AN-A0AS-01 TCGA-AN-A0AT-01 TCGA-AN-A0FD-01 TCGA-AN-A0FF-01 TCGA-AN-A0FJ-01 TCGA-AN-A0FK-01 TCGA-AN-A0FL-01 TCGA-AN-A0FN-01 TCGA-AN-A0FS-01 TCGA-AN-A0FT-01 TCGA-AN-A0FV-01 TCGA-AN-A0FW-01 TCGA-AN-A0FX-01 TCGA-AN-A0FY-01 TCGA-AN-A0FZ-01 TCGA-AN-A0G0-01 TCGA-AN-A0XL-01 TCGA-AN-A0XN-01 TCGA-AN-A0XO-01 TCGA-AN-A0XP-01 TCGA-AN-A0XR-01 TCGA-AN-A0XS-01 TCGA-AN-A0XT-01 TCGA-AN-A0XU-01 TCGA-AN-A0XV-01 TCGA-AN-A0XW-01 TCGA-AO-A03L-01 TCGA-AO-A03M-01 TCGA-AO-A03N-01 TCGA-AO-A03O-01 TCGA-AO-A03P-01 TCGA-AO-A03R-01 TCGA-AO-A03T-01 TCGA-AO-A03U-01 TCGA-AO-A03V-01 TCGA-AO-A0J2-01 TCGA-AO-A0J3-01 TCGA-AO-A0J4-01 TCGA-AO-A0J5-01 TCGA-AO-A0J6-01 TCGA-AO-A0J7-01 TCGA-AO-A0J8-01 TCGA-AO-A0J9-01 TCGA-AO-A0JA-01 TCGA-AO-A0JB-01 TCGA-AO-A0JC-01 TCGA-AO-A0JD-01 TCGA-AO-A0JE-01 TCGA-AO-A0JF-01 TCGA-AO-A0JG-01 TCGA-AO-A0JI-01 TCGA-AO-A0JJ-01 TCGA-AO-A0JL-01 TCGA-AO-A0JM-01 TCGA-AO-A124-01 TCGA-AO-A125-01 TCGA-AO-A126-01 TCGA-AO-A128-01 TCGA-AO-A129-01 TCGA-AO-A12A-01 TCGA-AO-A12B-01 TCGA-AO-A12C-01 TCGA-AO-A12D-01 TCGA-AO-A12E-01 TCGA-AO-A12F-01 TCGA-AO-A12G-01 TCGA-AO-A12H-01 TCGA-AQ-A04H-01 TCGA-AQ-A04J-01 TCGA-AQ-A04L-01 TCGA-AR-A0TP-01 TCGA-AR-A0TQ-01 TCGA-AR-A0TR-01 TCGA-AR-A0TS-01 TCGA-AR-A0TT-01 TCGA-AR-A0TU-01 TCGA-AR-A0TV-01 TCGA-AR-A0TW-01 TCGA-AR-A0TX-01 TCGA-AR-A0TY-01 TCGA-AR-A0TZ-01 TCGA-AR-A0U0-01 TCGA-AR-A0U1-01 TCGA-AR-A0U2-01 TCGA-AR-A0U3-01 TCGA-AR-A0U4-01 TCGA-AR-A1AH-01 TCGA-AR-A1AI-01 TCGA-AR-A1AJ-01 TCGA-AR-A1AK-01 TCGA-AR-A1AL-01 TCGA-AR-A1AN-01 TCGA-AR-A1AO-01 TCGA-AR-A1AP-01 TCGA-AR-A1AQ-01 TCGA-AR-A1AR-01 TCGA-AR-A1AS-01 TCGA-AR-A1AT-01 TCGA-AR-A1AU-01 TCGA-AR-A1AV-01 TCGA-AR-A1AW-01 TCGA-AR-A1AX-01 TCGA-AR-A1AY-01 TCGA-B6-A0I2-01 TCGA-B6-A0I5-01 TCGA-B6-A0I6-01 TCGA-B6-A0I8-01 TCGA-B6-A0I9-01 TCGA-B6-A0IA-01 TCGA-B6-A0IB-01 TCGA-B6-A0IC-01 TCGA-B6-A0IE-01 TCGA-B6-A0IG-01 TCGA-B6-A0IH-01 TCGA-B6-A0IJ-01 TCGA-B6-A0IK-01 TCGA-B6-A0IM-01 TCGA-B6-A0IN-01 TCGA-B6-A0IO-01 TCGA-B6-A0IP-01 TCGA-B6-A0IQ-01 TCGA-B6-A0RE-01 TCGA-B6-A0RG-01 TCGA-B6-A0RH-01 TCGA-B6-A0RI-01 TCGA-B6-A0RL-01 TCGA-B6-A0RM-01 TCGA-B6-A0RN-01 TCGA-B6-A0RO-01 TCGA-B6-A0RP-01 TCGA-B6-A0RQ-01 TCGA-B6-A0RS-01 TCGA-B6-A0RT-01 TCGA-B6-A0RU-01 TCGA-B6-A0RV-01 TCGA-B6-A0WS-01 TCGA-B6-A0WT-01 TCGA-B6-A0WV-01 TCGA-B6-A0WW-01 TCGA-B6-A0WX-01 TCGA-B6-A0WY-01 TCGA-B6-A0WZ-01 TCGA-B6-A0X0-01 TCGA-B6-A0X1-01 TCGA-B6-A0X4-01 TCGA-B6-A0X5-01 TCGA-B6-A0X7-01 TCGA-BH-A0AU-01 TCGA-BH-A0AV-01 TCGA-BH-A0AW-01 TCGA-BH-A0AY-01 TCGA-BH-A0AZ-01 TCGA-BH-A0B0-01 TCGA-BH-A0B1-01 TCGA-BH-A0B3-01 TCGA-BH-A0B4-01 TCGA-BH-A0B5-01 TCGA-BH-A0B7-01 TCGA-BH-A0B8-01 TCGA-BH-A0B9-01 TCGA-BH-A0BA-01 TCGA-BH-A0BC-01 TCGA-BH-A0BD-01 TCGA-BH-A0BF-01 TCGA-BH-A0BG-01 TCGA-BH-A0BJ-01 TCGA-BH-A0BL-01 TCGA-BH-A0BM-01 TCGA-BH-A0BO-01 TCGA-BH-A0BP-01 TCGA-BH-A0BQ-01 TCGA-BH-A0BR-01 TCGA-BH-A0BS-01 TCGA-BH-A0BT-01 TCGA-BH-A0BV-01 TCGA-BH-A0BW-01 TCGA-BH-A0BZ-01 TCGA-BH-A0C0-01 TCGA-BH-A0C1-01 TCGA-BH-A0C3-01 TCGA-BH-A0C7-01 TCGA-BH-A0DD-01 TCGA-BH-A0DE-01 TCGA-BH-A0DG-01 TCGA-BH-A0DH-01 TCGA-BH-A0DI-01 TCGA-BH-A0DK-01 TCGA-BH-A0DL-01 TCGA-BH-A0DO-01 TCGA-BH-A0DP-01 TCGA-BH-A0DQ-01 TCGA-BH-A0DS-01 TCGA-BH-A0DT-01 TCGA-BH-A0DX-01 TCGA-BH-A0DZ-01 TCGA-BH-A0E0-01 TCGA-BH-A0E1-01 TCGA-BH-A0E2-01 TCGA-BH-A0E6-01 TCGA-BH-A0E7-01 TCGA-BH-A0E9-01 TCGA-BH-A0EA-01 TCGA-BH-A0EB-01 TCGA-BH-A0EE-01 TCGA-BH-A0EI-01 TCGA-BH-A0GY-01 TCGA-BH-A0GZ-01 TCGA-BH-A0H0-01 TCGA-BH-A0H3-01 TCGA-BH-A0H5-01 TCGA-BH-A0H6-01 TCGA-BH-A0H7-01 TCGA-BH-A0H9-01 TCGA-BH-A0HA-01 TCGA-BH-A0HB-01 TCGA-BH-A0HF-01 TCGA-BH-A0HI-01 TCGA-BH-A0HK-01 TCGA-BH-A0HL-01 TCGA-BH-A0HN-01 TCGA-BH-A0HO-01 TCGA-BH-A0HP-01 TCGA-BH-A0HQ-01 TCGA-BH-A0HU-01 TCGA-BH-A0HW-01 TCGA-BH-A0HX-01 TCGA-BH-A0HY-01 TCGA-BH-A0RX-01 TCGA-BH-A0W3-01 TCGA-BH-A0W4-01 TCGA-BH-A0W5-01 TCGA-BH-A0W7-01 TCGA-BH-A0WA-01 TCGA-BH-A18F-01 TCGA-BH-A18G-01 TCGA-BH-A18H-01 TCGA-BH-A18I-01 TCGA-BH-A18J-01 TCGA-BH-A18K-01 TCGA-BH-A18L-01 TCGA-BH-A18M-01 TCGA-BH-A18N-01 TCGA-BH-A18P-01 TCGA-BH-A18Q-01 TCGA-BH-A18R-01 TCGA-BH-A18S-01 TCGA-BH-A18T-01 TCGA-BH-A18U-01 TCGA-BH-A18V-01 TCGA-BH-A1EO-01 TCGA-BH-A1ES-01 TCGA-BH-A1ET-01 TCGA-BH-A1EU-01 TCGA-BH-A1EV-01 TCGA-BH-A1EW-01 TCGA-BH-A1F0-01 TCGA-C8-A12K-01 TCGA-C8-A12L-01 TCGA-C8-A12M-01 TCGA-C8-A12N-01 TCGA-C8-A12O-01 TCGA-C8-A12P-01 TCGA-C8-A12Q-01 TCGA-C8-A12T-01 TCGA-C8-A12U-01 TCGA-C8-A12V-01 TCGA-C8-A12W-01 TCGA-C8-A12X-01 TCGA-C8-A12Y-01 TCGA-C8-A12Z-01 TCGA-C8-A130-01 TCGA-C8-A131-01 TCGA-C8-A132-01 TCGA-C8-A133-01 TCGA-C8-A134-01 TCGA-C8-A135-01 TCGA-C8-A137-01 TCGA-C8-A138-01 TCGA-C8-A1HF-01 TCGA-C8-A1HG-01 TCGA-C8-A1HI-01 TCGA-C8-A1HL-01 TCGA-C8-A1HM-01 TCGA-C8-A1HN-01 TCGA-D8-A13Y-01 TCGA-D8-A13Z-01 TCGA-D8-A140-01 TCGA-D8-A141-01 TCGA-D8-A142-01 TCGA-D8-A143-01 TCGA-D8-A145-01 TCGA-D8-A146-01 TCGA-D8-A147-01 TCGA-E2-A105-01 TCGA-E2-A106-01 TCGA-E2-A107-01 TCGA-E2-A108-01 TCGA-E2-A109-01 TCGA-E2-A10A-01 TCGA-E2-A10B-01 TCGA-E2-A10C-01 TCGA-E2-A10E-01 TCGA-E2-A10F-01 TCGA-E2-A14N-01 TCGA-E2-A14O-01 TCGA-E2-A14P-01 TCGA-E2-A14Q-01 TCGA-E2-A14R-01 TCGA-E2-A14S-01 TCGA-E2-A14T-01 TCGA-E2-A14V-01 TCGA-E2-A14W-01 TCGA-E2-A14X-01 TCGA-E2-A14Y-01 TCGA-E2-A14Z-01 TCGA-E2-A150-01 TCGA-E2-A152-01 TCGA-E2-A153-01 TCGA-E2-A154-01 TCGA-E2-A155-01 TCGA-E2-A156-01 TCGA-E2-A158-01 TCGA-E2-A159-01 TCGA-E2-A15C-01 TCGA-E2-A15D-01 TCGA-E2-A15F-01 TCGA-E2-A15G-01 TCGA-E2-A15H-01 TCGA-E2-A15I-01 TCGA-E2-A15J-01 TCGA-E2-A15L-01 TCGA-E2-A15M-01 TCGA-E2-A15O-01 TCGA-E2-A15P-01 TCGA-E2-A15R-01 TCGA-E2-A15S-01 TCGA-E2-A15T-01 TCGA-E2-A1AZ-01 TCGA-E2-A1B0-01 TCGA-E2-A1B1-01 TCGA-E2-A1B4-01 TCGA-E2-A1B5-01 TCGA-E2-A1B6-01 TCGA-E2-A1BC-01 TCGA-E2-A1BD-01 +ZHX3 23051 0.5584 0.3784 1.3386 0.9880 -2.2858 0.5925 -1.4086 -1.7875 0.0888 -0.0564 -0.7794 -0.2691 -0.6673 0.1998 0.4270 1.2679 -0.4629 0.0964 0.3874 -0.5056 0.6342 0.4543 0.1250 0.6160 -0.3987 -0.2064 -0.9980 -0.0153 1.3297 -0.0143 0.1746 0.5339 -0.2929 -1.1625 0.7694 0.4860 -0.4370 0.1753 -0.4912 -0.2215 0.2688 -0.5660 0.4908 1.4576 0.4863 0.2563 1.1331 -1.7224 -0.4253 -0.8266 0.1905 -2.3240 -0.3388 0.4987 -1.2204 0.0777 -1.7455 0.0691 -0.2781 -0.2622 0.0998 -0.1415 -0.3981 1.2593 -1.3083 1.3121 -0.1450 -0.8277 0.3953 -0.1702 -0.3522 -2.0844 0.4549 -0.2991 -2.5971 0.0095 0.8973 1.8289 0.1822 -0.4367 0.4784 0.8880 -1.0890 3.0081 0.5080 -0.1857 -0.9245 -0.1302 0.1619 0.7635 1.4852 -0.2757 1.3090 -0.3956 0.3636 0.4101 1.4624 -0.9573 -1.5710 0.0574 0.0667 1.4462 -1.4124 0.0291 0.1460 -0.2577 -2.5492 -0.5101 -0.8108 -0.1219 0.5139 1.7579 1.2542 -1.5179 -0.5518 0.6935 -0.2898 0.9021 1.1483 -0.4718 -0.6773 0.6746 0.8935 1.3793 0.4146 0.3070 -0.7984 0.4467 0.1881 -1.7507 1.6186 0.4129 -0.4112 -0.0112 0.3660 -0.2415 0.5725 1.3741 2.2330 0.6301 -0.9252 -0.3512 -0.0347 1.3700 0.5360 0.3112 0.3981 0.5456 -0.1302 0.5146 2.1199 2.9040 1.2128 -0.6953 0.9404 0.2315 -1.2869 -0.8494 -0.4560 -0.9428 0.0529 0.7656 -1.0380 -1.3545 0.0405 -1.4548 0.1812 0.8552 0.9814 -0.8573 -0.7566 -0.4956 -0.3598 0.1650 -0.3977 -1.1828 -0.1577 -0.0147 -0.4236 1.4014 -0.2653 -0.4370 -1.2435 -0.5777 -0.9352 -3.1257 -2.4533 1.1576 -0.3746 0.5053 -0.8132 0.5087 0.4070 0.2667 -0.1895 0.2794 -1.2169 0.4291 0.2129 0.5339 1.2628 -0.3667 1.4076 -0.1915 -0.7204 0.0102 -0.9801 -1.8341 -0.5539 1.5452 1.1262 0.9049 -0.3374 2.0606 0.0543 -1.1724 0.1239 0.7035 -1.0987 0.4436 1.8389 -0.3956 -0.8287 0.4929 1.1149 0.8735 -1.2269 0.6846 -0.0333 -0.6584 -0.1153 1.7365 -0.5370 1.7034 -0.2932 -2.3823 0.8556 1.4431 -0.3846 -1.3921 -0.4125 -0.8139 -0.4094 -0.4549 -0.0388 0.1746 1.5214 0.7518 0.5260 -0.7032 1.6065 0.4267 -0.8494 0.8221 -0.2853 -1.5948 -0.8904 2.4316 0.6094 -0.8046 -0.6939 -1.3011 -0.8890 -0.0709 1.0990 -2.2040 -0.5611 1.0028 -0.7656 -0.1871 -0.8597 -0.8711 -0.0429 0.2057 0.0515 -1.4341 -1.5124 0.4008 -1.1631 -0.1926 -1.1073 -1.0821 -1.0521 0.1953 0.8445 1.2717 -0.1505 1.0521 1.3545 1.4572 0.9821 0.7932 0.1402 1.4600 0.5822 0.3294 0.7739 0.0195 0.6353 0.2339 0.8649 -0.4918 0.4094 0.7404 1.1093 -0.5780 1.5431 0.4301 0.6015 1.0725 -0.7770 -0.2064 -0.8470 -1.5234 1.8706 -0.9004 -1.1169 0.5125 1.4714 0.2088 -0.0595 0.4887 1.6414 -0.5249 0.1084 0.5822 0.8180 -0.0405 1.2093 -1.0735 0.3456 1.1293 0.5587 -0.7963 -0.3401 -0.0133 -0.0126 0.2050 -1.1987 2.9215 -2.4130 -0.0681 0.0443 -0.3094 -0.0329 -1.9775 -0.0057 -0.6122 -0.4963 -0.3405 -0.1408 -0.2877 -0.0971 0.3853 -0.4012 -0.7228 -0.9001 0.1184 0.5432 -0.1939 0.8156 0.5846 0.4856 -0.4736 -0.1650 -0.0253 0.7177 -1.8382 0.5518 -1.2418 0.3436 0.3274 -0.1477 -0.4567 -0.3491 -0.4208 0.3512 -0.0615 -0.2715 -0.4446 0.8339 0.8921 0.0429 -0.7056 -3.0329 0.6308 2.9557 1.6813 -1.0945 0.8711 -0.4084 -0.8477 0.3705 1.3469 -0.5143 0.7694 0.4563 -0.7625 -0.8977 0.7363 -0.7025 -0.4839 -0.0050 0.6711 0.6797 -0.6994 0.3084 -0.3977 -0.1315 0.3894 0.5194 -0.4581 -0.7532 -0.7308 0.5932 0.9090 -2.1503 -0.9508 0.3946 -0.1333 0.5846 0.4787 0.7708 1.5190 0.5349 -0.2374 -0.7684 1.0711 -0.0419 -2.6099 0.0440 -0.3639 0.0191 0.7701 0.6401 -0.8942 0.7132 -2.4468 0.0047 -1.5324 -0.1188 -0.2119 -0.2453 -0.0157 -0.6870 -0.1022 -1.4583 -0.9308 -2.7143 1.0721 0.4177 0.0157 0.7035 0.2339 0.8328 0.4687 -0.6456 0.2581 2.2437 0.4012 1.0235 1.0749 -0.3760 0.2736 0.2801 2.0058 -1.0290 0.3694 -0.1129 0.8359 -0.1071 0.6515 0.0550 0.0940 1.5579 -2.0192 -1.6265 0.0891 1.0583 -1.6327 1.4855 0.7759 1.1442 0.5770 -0.1240 1.1590 -1.2904 -0.4660 -1.0831 2.8747 0.4867 0.2001 2.1278 0.6601 -0.5791 -0.0205 0.0112 1.8668 0.3860 -0.6604 -0.8290 -0.1071 3.2856 0.5811 0.6818 -0.5046 -1.3890 0.6308 -0.5877 -0.3243 -0.0957 0.4001 -1.0449 -0.5884 -0.0953 2.4413 0.0164 -2.1496 -0.2401 0.8794 -0.4791 1.7189 -1.2955 -0.7087 0.2581 0.6615 +RPS11 6205 0.7393 0.6377 0.0183 -0.6079 0.1753 -1.9344 -1.1965 -0.0255 0.1999 -0.0154 -0.0315 1.0533 0.4535 -0.1475 0.6149 -0.5058 -0.1727 -0.6146 -0.5237 -0.2543 0.6108 -0.0035 -0.5644 -0.7939 -1.1755 0.7520 0.0781 -0.5064 1.6750 1.5618 -1.6362 0.3820 2.1896 -0.3266 -0.7276 0.4009 -0.2317 0.3535 1.2981 -0.4408 0.1400 0.4302 0.0201 -0.7297 1.6463 2.2955 -0.2633 1.2357 0.2144 -1.3584 -1.1411 -1.8157 0.9890 0.5170 0.4947 -0.1227 1.6805 -0.3411 1.0929 1.0046 -1.9237 -1.2945 0.1517 -0.0071 -0.2690 -0.7877 -0.5986 0.4486 -2.2725 0.4463 0.9227 -0.9439 -1.0849 0.0421 -0.9869 1.4471 -0.6354 -0.1258 -1.4807 -1.9408 0.0328 2.0095 -1.0066 0.1038 -0.4507 0.5038 0.2398 0.0361 -0.7849 -1.0548 -1.5525 -1.9167 0.1442 -1.6667 -0.3385 -1.7271 -0.0949 1.7142 0.5395 0.0561 -0.7310 -0.9007 -1.5450 -0.6773 -0.3662 -1.5906 -0.3483 -0.5354 -0.3048 -0.8020 -0.9688 -0.6017 -0.2877 -0.6621 -0.4864 -1.1261 0.5810 0.2898 0.0561 -0.6144 0.6509 -1.3867 -2.1131 0.7514 -0.6745 -1.4209 -2.2994 0.2981 -0.7152 -1.9880 -1.6354 0.6864 0.0991 -0.1589 -0.8802 -0.4219 -0.0556 1.0779 -0.7364 0.2421 0.6416 -0.0001 -0.9276 -1.0315 -1.0053 0.1538 0.6509 -0.5654 0.2615 -0.6729 -0.9248 -0.4149 -1.6486 1.3929 -0.7131 -0.1255 -0.0892 -0.4771 -0.6478 0.4349 -0.7307 -0.7411 0.4970 0.0501 1.1483 0.2714 0.5569 -0.3779 -0.3051 -1.0450 -1.6460 0.7605 -0.5732 -0.2571 0.4058 -0.5082 -0.4009 -0.4395 -0.9994 0.5294 1.7813 0.4605 0.4066 1.6624 -0.8048 1.5328 -0.0105 1.0157 0.2934 -0.0364 -0.1768 -1.1890 0.6237 1.5183 1.4965 -0.7579 0.0395 -0.8198 1.0906 0.5077 0.7090 0.6888 0.4670 2.5365 0.0859 -0.3571 0.4649 0.6836 0.0830 -0.8696 0.3618 3.6997 -0.8170 -1.2250 1.0561 4.3808 -1.5305 -1.5388 0.6994 0.1201 -0.6105 0.9714 0.0240 0.3595 -0.0504 2.1546 1.2268 0.6333 0.3033 0.1284 0.0196 0.8924 1.1297 0.1082 -1.4053 0.9377 0.1934 1.0463 0.6509 0.1636 1.6212 1.6942 2.7370 -0.7154 0.0082 1.3297 4.0039 -0.0092 -2.2447 -0.2361 -0.9999 -0.0740 -0.1253 0.0859 0.9056 -0.5146 -0.8794 -1.1320 -0.2981 -1.0983 1.2183 -1.5867 -1.1139 -0.0271 -1.6204 -1.3548 -0.8823 1.1180 0.2810 -0.7025 0.6652 0.7385 1.3253 1.6763 0.1377 0.0188 1.1082 -0.1947 1.2214 1.7313 0.2157 -0.1017 1.4357 -2.9725 0.7797 1.0781 0.2488 -0.1501 -0.7520 0.0569 -0.3610 0.0159 -0.3613 0.2206 0.5807 -0.2898 -0.1874 0.0481 1.6432 0.3245 0.3077 1.4616 -1.3356 -1.3287 -0.3898 -0.3281 -1.0141 -0.1030 0.2737 -0.7214 0.3919 0.2587 0.8551 -0.3449 1.2919 1.2390 -0.4613 -0.6696 -0.4234 -1.3408 -0.6706 0.3929 1.7416 1.2771 -1.0504 0.7157 0.6328 0.2786 -0.2310 -0.2278 1.1680 -0.5387 0.7333 0.2817 -0.3957 -0.2120 0.2701 0.8113 -0.8077 1.0686 1.4344 -0.3240 1.1263 -0.2664 0.5160 1.3209 0.7792 0.0038 1.3149 -0.3291 -0.8284 -0.3097 -1.4636 -0.1781 0.3235 -0.6323 -1.4662 -0.3838 -1.3696 -0.2227 0.0206 -0.5766 1.0820 -0.0149 0.3942 -0.4729 0.2763 0.0154 -0.9719 1.4647 1.0157 -1.7657 -0.0040 1.2642 -0.6032 0.6118 1.1797 0.0672 1.3963 0.0429 -1.3035 -1.0996 -0.2172 -0.3175 -0.3589 -1.2450 0.2753 -2.0271 0.5175 -0.0470 1.9499 -0.9255 -0.5802 -0.8597 0.7237 -0.7491 0.7118 -0.5628 2.9248 0.5561 -2.4665 0.9318 0.9364 0.9463 0.7709 1.0002 -1.0004 0.6424 -0.0856 0.0579 1.0090 -0.5701 0.0499 -1.0222 -0.3781 1.5862 4.3300 -0.6605 -0.0721 -2.1364 0.1566 1.2167 -0.1957 0.1481 0.4413 -0.3348 -0.5079 -0.2271 -0.1983 -1.4458 0.9211 -1.4525 -0.2374 0.2955 -0.3455 0.3618 0.8955 0.4123 -0.6665 -0.1413 0.0416 -0.7517 -1.3074 -0.3323 2.1973 -1.8898 0.6061 0.6434 -0.9266 -0.3354 -0.9579 0.3628 1.0025 -1.2838 0.5950 -1.0942 0.5333 -1.3413 -1.2248 1.2820 0.6198 -1.1818 -0.3571 2.1155 0.2898 -2.3155 -0.6652 0.5973 -0.3115 -1.0916 -1.4377 -0.5229 -1.4566 0.4986 0.8895 -0.8859 -1.2165 0.9346 -0.4628 -0.8926 0.2561 -0.1268 -0.1050 0.3426 -0.6045 -0.2918 0.1198 1.5953 0.1431 0.1672 -1.4354 0.2082 0.5771 -0.8978 1.0652 -0.4610 -0.5014 -0.5530 0.7709 -0.0491 -0.5983 -1.1706 2.7541 -2.2800 1.0217 -0.4115 2.0823 -1.3038 -0.7066 0.7196 1.3136 -0.7235 1.0743 -0.4807 -0.7141 -0.7525 -1.5276 -1.7553 0.7724 -0.3760 -0.1162 -0.1703 0.4048 2.0691 0.5004 0.3989 +PNMA1 9240 0.7850 0.1426 0.4575 1.1627 1.4650 0.9737 -0.1768 -0.0298 0.7969 -2.8853 -0.1976 1.8370 -1.1078 -0.7431 0.6368 -1.3241 -1.6272 -1.2162 -0.2885 0.1703 1.0393 -2.2037 0.5475 1.4886 1.6732 -0.4523 -1.9230 -1.0222 -0.6955 0.7899 -1.5596 0.2163 -0.5044 -1.6810 -0.0852 1.9894 0.4530 0.5325 -1.6517 1.5917 0.6779 2.1458 1.3562 -0.2661 0.1063 1.0735 -0.8295 -0.5468 0.6860 -0.5949 -1.2838 0.1654 0.9338 -1.2650 0.3552 -1.4321 1.4218 0.7610 -1.2377 1.3652 0.6836 0.0489 0.7195 0.7028 0.3096 -0.4144 1.3403 0.2224 -1.1106 -0.1878 0.5785 0.3638 -0.7207 0.3662 -0.9399 -0.6649 0.0851 1.7441 -0.3704 0.1401 0.6926 -0.7256 -1.2386 -2.8662 1.8154 0.5243 1.1142 -1.3526 -0.0208 -0.3451 0.4204 -0.2701 -0.2669 -1.5608 0.6135 0.7125 1.5225 0.1010 -0.6755 0.9985 -0.1145 0.1629 0.7358 0.2807 -0.8857 -1.6191 0.9594 -0.2249 0.6592 -0.4453 -0.0322 -0.0721 0.1719 2.5137 -0.3944 -0.8311 -0.0791 1.5881 0.2224 0.3683 0.6245 -0.6869 0.2208 0.7300 1.0491 0.4787 -0.3940 0.6473 0.4538 0.7602 1.0548 0.3907 -0.2363 1.2487 -0.0497 1.8313 1.1000 0.6628 -1.1970 0.7133 0.4538 -0.2437 -1.1286 0.3393 0.6583 0.7223 0.4587 -1.9800 -1.5730 0.7252 0.5092 0.3186 -1.1603 1.0030 0.2204 1.6365 1.6532 -0.6405 -1.0931 -0.6979 0.8290 1.2071 0.9329 -1.1355 -1.0789 0.7716 0.0028 0.2611 0.1234 0.2623 0.6832 -0.3194 0.5162 1.5388 -0.7933 -2.7069 1.0356 -1.7588 -2.0876 -1.2874 0.5732 -0.5867 0.7630 0.6962 0.5166 -1.9128 0.6567 -1.8167 0.8824 0.9264 -1.2068 -0.1349 -0.2037 -0.2461 -0.9982 1.0055 -1.7417 0.9346 0.5748 -0.3940 -0.7643 -0.2693 0.6486 0.1087 1.0401 -0.0860 -0.0212 0.6445 1.1631 -1.3086 1.5620 -0.4286 -0.6283 -1.4549 -0.8075 0.0876 -2.5166 2.5361 0.4070 1.6398 -1.0389 2.0729 0.2240 0.0032 0.3536 -1.7360 -0.5875 -1.5999 -0.1345 0.6787 0.9904 2.4941 -0.1060 -1.4671 1.2572 -1.6725 -1.7666 -0.4991 -1.5673 -2.2143 -0.4954 1.4141 0.0375 -1.1082 0.7516 -0.4751 0.7178 0.7480 1.5408 -1.1298 -1.7442 -1.4826 0.7476 0.0994 0.3862 -0.0554 -0.9778 0.4347 0.0122 -0.8633 0.7203 2.2782 -2.0477 -0.4657 -0.1296 0.3996 0.4139 -1.3400 -1.3392 -0.0118 0.6958 -0.7301 -0.1092 -0.3072 -1.2109 -2.0632 -0.0078 0.6017 -0.1821 -0.5362 0.0815 -0.8825 -0.8034 -1.2960 -1.5975 0.2733 -1.1872 -1.2231 -2.0627 0.3312 1.7938 0.2513 0.5671 0.1862 0.2118 -1.1999 0.6086 0.4644 -0.3170 -0.3875 0.3846 -0.3822 -1.3005 1.3008 -1.2793 1.2418 0.5353 2.0786 1.1305 0.6298 0.2375 0.3002 0.2183 -0.0436 0.4066 1.3852 0.2436 -0.5415 -0.3170 0.0713 0.0529 -0.4107 0.1540 -1.2390 -1.5062 0.8938 0.7170 0.4237 0.0423 -0.9448 -0.4294 0.9032 -0.6792 -0.6731 0.1226 -0.4535 1.0458 0.3259 -0.5814 1.3901 -1.7894 0.5720 0.5703 0.5818 -0.4470 -0.6776 0.4119 0.2375 -1.1053 0.5276 0.4066 -0.1565 -0.9265 1.7421 0.1678 0.1849 -1.2227 -0.0424 0.6759 -0.5708 0.2566 -2.7521 1.3041 -0.1349 0.7142 1.5306 -0.1386 0.8519 -0.9175 0.2831 0.4074 1.0588 -0.4738 0.2546 -0.6686 -0.6853 -0.9363 -0.1540 -0.2416 -0.4490 0.8343 0.9851 -0.6690 -0.7933 -0.5081 0.4893 1.3098 0.9635 0.2281 -0.9554 0.2236 1.5449 0.3503 1.2882 -1.1746 0.6339 0.2029 -0.0799 -0.0607 0.3340 -1.4749 -0.9827 0.2575 -0.1711 -0.2021 1.3281 -0.1634 0.7610 -0.8817 0.0794 0.9403 1.4691 1.9441 0.3088 0.4314 -1.7596 -1.2622 0.8747 0.5822 -1.7006 0.3886 -0.0554 0.4901 0.4074 -1.5682 -0.6413 0.2004 -0.1862 -0.8311 -0.2624 0.8775 0.7545 -1.9727 0.0260 0.2872 -0.7737 -1.0414 -1.5620 -0.2840 0.9940 -0.7945 0.1499 0.1039 -1.4512 -0.3899 -0.0774 -0.2156 0.0273 -0.5447 0.1833 -0.6148 0.2811 -1.0100 -0.4221 -0.9961 -0.9603 -0.9762 -1.8497 1.6280 -0.4633 -0.8658 -0.0681 -0.5451 -1.9344 -1.4321 1.2491 -0.3427 0.0692 1.2291 0.6681 -0.7126 0.7280 0.9040 -0.6327 2.2102 0.1637 -0.9081 0.8531 1.4687 -0.6551 0.9452 0.4620 -1.1400 0.1792 -1.6447 -0.0599 0.8013 1.5225 -2.3622 0.4086 -0.9591 -0.2046 -1.0715 -0.2644 -0.9310 -0.2070 -0.0241 -0.4461 0.2130 1.0181 0.0786 0.3548 -1.2895 -1.9169 1.1212 -0.0970 0.1083 0.2497 0.2913 -0.9073 -2.1116 -0.0856 0.3715 2.2326 -0.2086 2.1038 0.1711 1.5726 -0.4131 -0.1320 0.7431 -0.6645 -2.1002 -0.7586 -0.8051 -0.4017 +ERCC5 2073 -0.2735 -0.5412 -0.0399 0.0172 1.5587 -0.4162 -0.3331 -1.2107 0.8973 0.8081 0.3359 -0.6697 2.2450 -1.5906 1.2874 1.0054 -0.2582 1.0773 0.3828 -1.4784 0.9391 1.3491 0.1426 -2.3861 -0.9318 0.0004 -0.4820 0.5817 0.8065 1.4348 -0.0129 -2.0352 0.2987 1.2558 0.0621 -0.3265 0.8300 0.3089 -0.0955 -0.0476 0.8101 -0.1139 -1.0072 -0.8961 0.0656 0.0014 0.9779 1.0498 -0.0593 -1.6074 -0.3612 0.8264 -0.0573 0.3966 -0.8481 -0.6967 0.4404 1.0284 0.3665 0.1681 0.1773 0.4261 0.7851 -1.0006 1.1115 -0.9216 -0.5060 -0.1633 -0.6982 0.9182 0.0835 -0.4162 -2.1270 -0.7278 0.6434 0.5383 0.8213 -1.4453 -0.0639 1.8794 0.3196 -1.3178 -0.0797 -1.5080 -0.9012 -1.3932 0.5485 0.0136 -1.1934 -1.8919 -1.3713 2.2104 1.3822 -0.4657 -0.2490 -0.7140 -1.9557 -1.9414 0.5679 -0.0154 -1.5625 -0.8757 0.5750 0.9259 -1.7451 -3.1372 -2.7909 0.1442 0.3553 -0.6192 -1.5569 -0.7400 -0.5376 -0.1103 1.0304 1.1548 -1.8404 -1.4815 0.5256 -0.0751 0.1467 -0.9032 0.7168 0.6826 1.7647 0.8759 0.3481 -0.6962 -0.5381 -1.2143 -0.4183 0.5817 -1.4641 0.2257 -1.1959 0.4022 -1.9450 -0.3693 -0.6845 0.5455 0.5812 -0.0909 -0.6569 0.4965 -0.1582 1.8182 -0.2918 -0.1128 -0.5906 -1.7257 -0.4810 0.7744 -0.1088 -1.6431 -0.4168 0.3415 0.7433 -0.2215 -0.0338 1.4307 1.4817 -0.4550 -0.9440 0.1018 -0.0333 0.0284 -0.2658 -0.8711 -1.7711 0.3313 1.7453 0.0753 0.5659 -0.7304 -0.1822 2.3633 -1.7716 0.8739 0.9106 1.0029 0.8764 0.3389 -1.4692 0.9146 0.5286 1.1339 0.1936 0.1069 0.9488 -0.2505 2.4638 0.4022 0.9565 1.7545 0.7591 -0.1001 -2.3733 -0.0323 -0.8614 -0.1863 0.9294 0.9213 0.8239 1.6535 -0.1557 0.1957 -0.0195 -0.0914 -0.5565 0.1987 -1.3188 0.8218 -0.2745 1.4791 0.4129 2.4755 0.1574 0.0712 -0.5233 0.8427 -1.6701 0.8611 0.8993 -0.0894 0.3150 3.9058 2.3939 -0.6136 -0.8400 -0.5208 1.1900 -1.7665 -0.2505 -0.4591 -0.7915 0.3282 1.7213 1.6275 -0.2169 1.2094 0.7683 -0.0537 0.7168 1.3435 -0.9644 -2.0184 -0.5458 1.8284 -1.7288 2.3817 -0.0532 -0.3061 0.1498 -0.1965 -0.6585 1.1400 -0.1679 -1.8053 0.0539 -0.9425 0.4690 -1.1913 -1.0552 0.8254 -1.4549 0.8274 -2.0215 -0.2699 -1.5738 -0.2582 -0.1399 2.2721 -0.1343 0.0121 0.6714 0.5954 -0.3969 0.3542 0.1207 -0.8028 -0.1383 0.0707 -0.0557 0.0172 0.5159 1.3185 1.4506 -1.3627 -0.3382 -0.1179 0.8968 0.6255 0.0162 1.0278 0.4506 0.5378 1.0360 -1.0246 0.4180 1.9763 0.1957 -0.6753 -0.5830 1.1150 0.7382 -0.1455 -1.1827 -0.1037 -0.1807 -0.1072 -0.7084 0.9391 0.6566 1.7341 0.1253 0.0044 -1.0480 1.4103 -1.1607 -0.3551 -0.3071 0.2681 0.8529 0.6077 -0.9517 1.0309 -1.5661 1.1767 -0.6019 -0.0889 -0.2699 -0.2000 1.3236 0.4945 -1.5681 -0.7355 -1.0516 0.5215 -0.6019 -1.7237 1.5082 -0.3576 -1.0266 -0.3296 0.8305 0.1227 -1.2122 0.0845 1.0431 -0.4616 -0.6860 0.5893 -0.8390 1.8616 -0.6625 -0.5361 -0.9425 -1.2454 -0.9736 -0.7089 0.8004 2.6749 -2.8725 1.0865 0.7290 -1.0965 0.3231 0.0294 -0.0001 0.4613 -0.2719 -0.2046 0.0886 0.2803 0.3430 0.0417 0.8963 0.2155 1.7071 1.2446 -0.0562 -0.1108 0.2880 1.3557 0.3002 -0.5947 -1.1755 -0.9965 -1.2087 1.2905 1.0003 0.6796 -1.1449 -0.5289 -0.7406 -0.7640 -0.9690 0.6041 0.4277 0.4455 -0.5758 -0.7120 0.8132 0.4328 -0.7074 0.2660 -1.2240 0.1666 -0.6870 -0.5866 0.3027 1.4995 -0.5539 -1.5462 0.5159 1.1400 0.1355 0.2247 0.2303 -0.8935 -0.7268 -0.1439 0.2023 0.4292 1.3221 0.3160 -0.7247 -0.0731 -1.7063 1.0126 -0.6151 0.3874 0.9468 0.4965 -0.7472 -0.8272 0.1171 0.4731 0.5699 0.9044 0.4557 -1.8945 -1.6207 0.7892 -0.9838 -0.3290 0.8239 -1.7390 -0.4076 -1.4055 -0.0654 -0.9466 0.3675 0.7020 0.9310 0.7637 -1.3800 -0.0654 1.9248 0.5205 -1.2163 0.3502 2.2715 0.0366 -0.9073 -0.9726 -0.3678 0.7795 1.1018 -1.1118 -0.4259 -0.1965 -0.0302 -0.1781 -0.3183 0.0279 -0.2939 0.7224 -0.6279 0.3634 -0.3907 0.5506 -0.3892 0.1391 0.0779 -0.2648 -0.4111 0.5082 2.0599 0.3048 1.0386 -0.2648 0.8346 0.9468 -0.6656 0.0779 -1.2999 -1.4937 1.0437 1.0421 -2.0561 0.2880 0.5052 -0.2240 0.2762 0.2222 -0.0996 0.8825 1.2848 2.0768 -0.3076 -0.1975 0.2711 -0.5876 -0.1103 -2.3402 -0.8823 -0.2740 -0.1664 -0.6243 1.7871 1.3904 2.5515 1.8157 0.7724 2.6443 +MMP2 4313 1.1741 0.6180 1.9648 -0.4444 -1.6048 1.2608 -1.7705 -0.6180 0.2377 -1.0804 1.2987 -0.7494 -0.8267 -0.9124 0.6624 1.0655 -0.8148 -0.8537 0.3515 0.0497 0.5197 -1.1039 0.9333 -0.4735 -0.7905 0.7752 -1.3699 0.1562 -1.3138 1.1691 -0.6875 -0.6138 -0.1279 -0.0087 -1.6360 -0.3253 1.0555 0.8717 -0.6750 -1.2597 0.8981 -1.9745 -0.0369 0.7258 1.2506 0.3921 -0.2264 -0.5886 0.1163 0.9387 0.2216 1.1553 0.3434 0.6526 0.5796 -0.5221 -0.2520 0.8545 -0.3805 1.1729 1.4405 0.2480 1.0390 0.2066 -0.7888 -0.1735 0.9810 0.4512 -0.8997 0.4458 1.2190 -0.4565 -0.4877 -0.5580 -0.2981 0.2404 0.9799 -1.3687 -0.1551 1.2577 0.1990 0.3364 -0.6890 1.6661 -2.4393 -0.2416 0.7317 -2.2309 0.9690 -0.5627 -0.3023 0.5792 -1.9879 -1.4560 0.5912 0.4808 -1.1006 0.5622 -1.0559 1.4836 0.6305 1.4187 0.5731 1.6434 -0.0261 -0.1566 -0.7651 -1.2472 -0.6763 -0.0164 -0.6435 -0.3181 -1.4424 -0.1938 -1.3687 0.8711 -0.2672 0.4122 0.0742 -0.6647 -0.6415 0.1479 0.8613 -0.0557 -1.5287 0.2989 -0.7458 0.4805 0.6842 -0.0000 -0.4520 -0.7959 1.2258 1.4865 0.0049 -0.2077 0.1885 0.7238 0.8104 0.3593 0.6655 1.0494 0.0935 0.5755 0.3385 -0.5555 -0.1669 -0.1204 -0.7372 0.2176 -1.7172 -1.5003 -0.1627 -0.6102 0.7133 0.9279 0.6851 -0.2494 0.1653 -1.2597 0.8484 0.4222 0.2615 -0.1786 0.2495 0.1418 -0.6207 1.0144 1.1915 -0.0531 0.8768 0.9258 0.2651 1.0004 -1.2803 -1.3175 0.1740 -1.1168 0.1477 -0.2171 -1.3444 1.9111 -0.2097 0.0739 -0.7190 0.6146 -1.0446 -1.9230 1.6984 0.0723 0.0105 0.7282 -0.8765 -0.1955 0.2336 -0.8918 -0.4330 0.3689 1.6581 0.4648 -0.0090 -0.2937 0.8591 -0.8661 -0.1233 1.0067 1.5437 0.3953 -0.1071 0.3327 -0.6072 -0.5046 -0.9781 -0.7428 0.0739 0.5096 -0.6265 -1.9083 -0.1825 1.3991 -1.5601 -0.4474 0.6115 -0.1087 0.7727 -0.2714 -0.7964 -0.8977 1.2419 0.9143 -0.3676 -1.8460 0.3861 -0.6581 0.6119 -1.7035 -2.3900 1.3666 -1.4411 0.2614 0.6966 -1.8699 1.0550 1.5227 -0.7259 -0.4099 0.0520 -0.4980 -0.9011 -0.0247 0.3424 -1.3625 -0.1424 -2.6715 -0.8814 0.1366 -1.7214 -0.8370 -0.2146 0.6854 -0.5986 0.6296 -1.2438 -0.3037 -0.4290 -0.6767 -0.3253 -0.3384 -0.7075 0.1202 -0.0210 1.4760 1.7325 0.9852 0.5600 0.4174 0.6626 0.6712 0.3817 0.9296 0.4315 0.2595 0.9825 1.2319 -2.1340 -1.0052 -0.0457 0.0759 -0.9065 -1.5395 -1.2587 -2.3600 -0.8726 0.4692 1.1786 -1.2154 -0.4476 0.3396 -0.5763 -0.7448 0.1968 -1.6775 0.0987 0.3667 1.2337 1.0204 -2.6373 -1.3300 0.8476 -1.0914 0.7879 -0.8818 0.3728 0.0952 -0.0712 -0.4604 1.1877 1.2747 -0.2170 0.4467 1.2628 0.5950 0.3234 -0.7056 -1.9076 -1.5762 -1.2778 0.8166 0.8607 2.1405 0.1586 0.6643 1.8289 2.4880 1.2672 0.9659 0.3334 0.9236 1.1103 -0.1857 -1.3667 0.5659 0.1227 -0.0465 2.2034 -0.4011 0.3809 0.7830 0.1315 1.4495 0.1388 1.5053 1.0616 0.0233 -1.1180 0.2318 -0.3725 1.3059 -0.7019 1.5827 1.1578 0.2211 -0.5573 0.5300 0.8028 -0.5974 2.3701 0.2891 -0.5411 -0.1272 0.5618 0.9881 -0.2482 -0.3865 1.5362 1.2856 -1.1834 -0.4366 -0.2626 -0.6310 -0.7690 0.9020 0.8506 0.9008 -1.7032 0.9735 0.9896 0.8303 -1.7155 1.4738 -0.4234 1.2205 1.3761 -0.4065 1.8392 -0.6243 0.7443 0.5579 -0.1579 -0.4322 -0.4787 -1.0595 0.3838 0.3276 -0.9514 -2.2456 0.0725 0.7126 1.1345 -1.3175 0.8506 0.8643 0.8403 0.2913 0.2740 0.5764 -0.4589 1.4951 0.6942 -0.4860 -1.9248 0.5846 -0.9269 0.0639 -1.5133 -0.2445 -0.7683 0.6333 1.2882 -0.3720 1.5354 0.8770 0.4725 1.2273 1.2163 0.2436 1.1631 -0.6045 -0.4626 -0.9317 2.1870 0.7436 0.8219 0.3535 1.3737 -2.1157 -0.9827 0.5945 0.0121 -0.2124 0.2418 0.0676 0.8580 0.6682 -1.6521 -1.4007 0.5814 0.3192 1.5470 0.8394 -0.6464 0.1023 0.2840 -1.3315 -0.5490 -1.3084 0.5811 -0.8767 1.2461 1.0893 -0.6846 1.6356 1.3993 -0.8853 -0.6987 -1.3807 -0.8740 0.7282 -0.3605 -0.4459 0.3089 -0.9416 -0.2471 1.0099 -1.8283 0.4198 -0.7986 -0.0159 -1.3909 -1.3302 -0.9279 0.3768 -0.9107 -0.0144 -1.0924 0.1736 -0.0445 1.2933 1.9959 1.1262 -2.1668 -1.4441 -2.0653 0.8564 0.1474 0.4710 -1.1484 -0.8189 0.6653 0.3243 -0.4594 0.9204 0.6401 -0.6816 -0.1065 -0.4920 -1.9439 -0.2290 1.2128 0.9439 2.1662 0.0527 -1.3743 -0.5741 1.3071 1.1730 diff --git a/test/test_data/study_es_0_import_export/meta_mrna_expression_z-score_mrna_median_zscores.txt b/test/test_data/study_es_0_import_export/meta_mrna_expression_z-score_mrna_median_zscores.txt new file mode 100644 index 00000000000..7c8bbfe80bb --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_mrna_expression_z-score_mrna_median_zscores.txt @@ -0,0 +1,9 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: MRNA_EXPRESSION +datatype: Z-SCORE +stable_id: mrna_median_Zscores +show_profile_in_analysis_tab: true +profile_name: mRNA expression (microarray) Z-Score normalized +profile_description: mRNA expression levels (Agilent microarray) Z-Score normalized (https://github.com/cBioPortal/cbioportal/blob/master/docs/File-Formats.md#z-score-instructions). +patient_level: false +data_filename: data_mrna_expression_z-score_mrna_median_zscores.txt From 427a8b0cf43005147efd724810efd68baee689f9 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Mon, 21 Apr 2025 16:27:48 +0200 Subject: [PATCH 36/69] Support export of cancer types We export the cancer type of the study with all its parents --- .../application/file/export/ExportConfig.java | 9 ++- .../exporters/CancerTypeDataTypeExporter.java | 60 +++++++++++++++++ .../mappers/CancerStudyMetadataMapper.java | 5 ++ .../services/CancerStudyMetadataService.java | 7 ++ .../file/export/writers/TsvDataWriter.java | 8 ++- .../application/file/model/CancerType.java | 65 +++++++++++++++++++ .../application/file/model/Table.java | 9 +-- .../export/CancerStudyMetadataMapper.xml | 28 ++++++++ .../data_cancer_type.txt | 2 + .../meta_cancer_type.txt | 4 ++ 10 files changed, 185 insertions(+), 12 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/model/CancerType.java create mode 100644 test/test_data/study_es_0_import_export/data_cancer_type.txt create mode 100644 test/test_data/study_es_0_import_export/meta_cancer_type.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 45879692e03..101e77b97d3 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -3,6 +3,7 @@ import com.zaxxer.hikari.HikariConfig; import com.zaxxer.hikari.HikariDataSource; import org.cbioportal.application.file.export.exporters.CancerStudyMetadataExporter; +import org.cbioportal.application.file.export.exporters.CancerTypeDataTypeExporter; import org.cbioportal.application.file.export.exporters.CaseListsExporter; import org.cbioportal.application.file.export.exporters.ClinicalPatientAttributesDataTypeExporter; import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; @@ -10,7 +11,6 @@ import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionContinuousDatatypeExporter; -import org.cbioportal.application.file.export.exporters.MrnaExpressionDatatypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionDiscreteDatatypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionZScoreDatatypeExporter; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; @@ -127,6 +127,7 @@ public Executor exportThreadPool() { @Bean public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, + CancerTypeDataTypeExporter cancerTypeDataTypeExporter, ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, MafDataTypeExporter mafMetadataAndDataExporter, @@ -137,6 +138,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE CaseListsExporter caseListsExporter) { return List.of( cancerStudyMetadataExporter, + cancerTypeDataTypeExporter, clinicalPatientAttributesMetadataAndDataExporter, clinicalSampleAttributesMetadataAndDataExporter, mafMetadataAndDataExporter, @@ -148,6 +150,11 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE ); } + @Bean + public CancerTypeDataTypeExporter cancerTypeDataTypeExporter(CancerStudyMetadataService cancerStudyMetadataService) { + return new CancerTypeDataTypeExporter(cancerStudyMetadataService); + } + @Bean public CancerStudyMetadataExporter cancerStudyMetadataExporter(CancerStudyMetadataService cancerStudyMetadataService) { return new CancerStudyMetadataExporter(cancerStudyMetadataService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java new file mode 100644 index 00000000000..f4a2605df00 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java @@ -0,0 +1,60 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.CancerStudyMetadataService; +import org.cbioportal.application.file.model.CancerType; +import org.cbioportal.application.file.model.ClinicalAttributesMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.util.List; +import java.util.Optional; + +public class CancerTypeDataTypeExporter extends DataTypeExporter { + + private final CancerStudyMetadataService cancerStudyMetadataService; + + public CancerTypeDataTypeExporter(CancerStudyMetadataService cancerStudyMetadataService) { + this.cancerStudyMetadataService = cancerStudyMetadataService; + } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(new ClinicalAttributesMetadata( + studyId, + "CANCER_TYPE", + "CANCER_TYPE" + )); + } + + @Override + public String getDataFilename(ClinicalAttributesMetadata metadata) { + return "data_cancer_type.txt"; + } + + @Override + public String getMetaFilename(ClinicalAttributesMetadata metadata) { + return "meta_cancer_type.txt"; + } + + @Override + protected Table getData(String studyId) { + List cancerTypes = cancerStudyMetadataService.getCancerTypeHierarchy(studyId); + var iterator = cancerTypes.iterator(); + return new Table(new CloseableIterator<>() { + @Override + public void close() { + } + + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + @Override + public TableRow next() { + return iterator.next(); + } + }); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java index 63aaf467d69..5851df182fd 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/CancerStudyMetadataMapper.java @@ -1,7 +1,12 @@ package org.cbioportal.application.file.export.mappers; import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.CancerType; + +import java.util.List; public interface CancerStudyMetadataMapper { CancerStudyMetadata getCancerStudyMetadata(String studyId); + + List getCancerTypeHierarchy(String studyId); } diff --git a/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java b/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java index 41b2da0bdd2..cd49e851f1c 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/CancerStudyMetadataService.java @@ -2,6 +2,9 @@ import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.model.CancerStudyMetadata; +import org.cbioportal.application.file.model.CancerType; + +import java.util.List; public class CancerStudyMetadataService { @@ -14,4 +17,8 @@ public CancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataM public CancerStudyMetadata getCancerStudyMetadata(String studyId) { return cancerStudyMetadataMapper.getCancerStudyMetadata(studyId); } + + public List getCancerTypeHierarchy(String studyId) { + return cancerStudyMetadataMapper.getCancerTypeHierarchy(studyId); + } } diff --git a/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java b/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java index 8d4b05c420b..810a80287d5 100644 --- a/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java +++ b/src/main/java/org/cbioportal/application/file/export/writers/TsvDataWriter.java @@ -43,10 +43,12 @@ else if (size != Iterables.size(comments)) { writeCommentsRow(comments); } header = headerInfo.getHeader(); - if (size != null && size != header.size()) { - throw new IllegalArgumentException("All comments must have the same number of columns as the header: " + size + " != " + header.size()); + if (header != null) { + if (size != null && size != header.size()) { + throw new IllegalArgumentException("All comments must have the same number of columns as the header: " + size + " != " + header.size()); + } + writeRow(header); } - writeRow(header); } while (table.hasNext()) { SequencedMap row = table.next(); diff --git a/src/main/java/org/cbioportal/application/file/model/CancerType.java b/src/main/java/org/cbioportal/application/file/model/CancerType.java new file mode 100644 index 00000000000..d087bd68641 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/CancerType.java @@ -0,0 +1,65 @@ +package org.cbioportal.application.file.model; + +import java.util.LinkedHashMap; +import java.util.SequencedMap; + +public class CancerType implements TableRow { + private String typeOfCancerId; + private String name; + private String dedicatedColor; + private String shortName; + private String parent; + + public String getParent() { + return parent; + } + + public void setParent(String parent) { + this.parent = parent; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getDedicatedColor() { + return dedicatedColor; + } + + public void setDedicatedColor(String dedicatedColor) { + this.dedicatedColor = dedicatedColor; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTypeOfCancerId() { + return typeOfCancerId; + } + + public void setTypeOfCancerId(String typeOfCancerId) { + this.typeOfCancerId = typeOfCancerId; + } + + @Override + public SequencedMap toRow() { + return new LinkedHashMap<>() { + { + put("TYPE_OF_CANCER_ID", typeOfCancerId); + put("NAME", name); + put("DEDICATED_COLOR", dedicatedColor); + put("SHORT_NAME", shortName); + put("PARENT", parent); + } + }; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/Table.java b/src/main/java/org/cbioportal/application/file/model/Table.java index 6cecaad9b0c..cdb078d8830 100644 --- a/src/main/java/org/cbioportal/application/file/model/Table.java +++ b/src/main/java/org/cbioportal/application/file/model/Table.java @@ -6,7 +6,6 @@ import java.io.Closeable; import java.io.IOException; -import java.util.LinkedHashSet; import java.util.SequencedMap; import java.util.SequencedSet; @@ -64,13 +63,7 @@ public Iterable> getComments() { @Override public SequencedSet getHeader() { - if (header != null) { - return header; - } - if (rows.hasNext()) { - return rows.peek().toRow().sequencedKeySet(); - } - return new LinkedHashSet<>(); + return header; } @Override diff --git a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml index a84b47cf2e5..546e6c15e10 100644 --- a/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml +++ b/src/main/resources/mappers/export/CancerStudyMetadataMapper.xml @@ -16,4 +16,32 @@ JOIN reference_genome rg ON rg.REFERENCE_GENOME_ID = cs.REFERENCE_GENOME_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} + \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_cancer_type.txt b/test/test_data/study_es_0_import_export/data_cancer_type.txt new file mode 100644 index 00000000000..099804ff168 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_cancer_type.txt @@ -0,0 +1,2 @@ +brca-es0 Breast Invasive Carcinoma HotPink brca-es0 breast +breast Breast HotPink BREAST tissue diff --git a/test/test_data/study_es_0_import_export/meta_cancer_type.txt b/test/test_data/study_es_0_import_export/meta_cancer_type.txt new file mode 100644 index 00000000000..fec41b8e416 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_cancer_type.txt @@ -0,0 +1,4 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: CANCER_TYPE +datatype: CANCER_TYPE +data_filename: data_cancer_type.txt From ca81c77411bfde6fa6cc06cbc0867a620f373916 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Mon, 21 Apr 2025 16:45:32 +0200 Subject: [PATCH 37/69] Do not export patient level generic assay data We are not going to support patient level data export. Without this fix the code exported sample header for patient level data which would fail during the load to cBioPortal --- .../GeneticProfileDatatypeExporter.java | 6 +++++ ...cAssayLimitValueDatatypeExporterTests.java | 24 +++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index 42700cf0116..53612d67044 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -4,6 +4,7 @@ import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.FileWriterFactory; +import org.slf4j.Logger; import java.util.List; import java.util.SequencedMap; @@ -13,6 +14,7 @@ */ public abstract class GeneticProfileDatatypeExporter implements Exporter { + private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(GeneticProfileDatatypeExporter.class); private final GeneticProfileService geneticProfileService; public GeneticProfileDatatypeExporter(GeneticProfileService geneticProfileService) { @@ -24,6 +26,10 @@ public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { List geneticProfiles = geneticProfileService.getGeneticProfiles(studyId, getGeneticAlterationType(), getDatatype()); boolean exported = false; for (GeneticProfileDatatypeMetadata metadata : geneticProfiles) { + if (metadata.getPatientLevel() != null && metadata.getPatientLevel()) { + LOG.debug("Skipping unsupported patient-level genetic profile: {}", metadata.getStableId()); + continue; + } exported |= composeExporterFor(metadata).exportData(fileWriterFactory, studyId); } return exported; diff --git a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java index e125502ba7c..635a86011c1 100644 --- a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java @@ -18,6 +18,7 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.containsString; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertThrows; import static org.junit.Assert.assertTrue; @@ -351,4 +352,27 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr ENTITY_STABLE_ID\tproperty1\tproperty2\tSAMPLE_1\tSAMPLE_2\tSAMPLE_3 """, fileContents.get("data_generic_assay_limit-value_generic_assay_stable_id.txt").toString()); } + + @Test + public void testDoNotExportPatientLevelData() { + var factory = new InMemoryFileWriterFactory(); + + GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(new GeneticProfileService(null) { + @Override + public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); + metadata.setGeneticAlterationType("GENERIC_ASSAY"); + metadata.setDatatype("LIMIT-VALUE"); + metadata.setPatientLevel(true); // Set patient level to false + return List.of(metadata); + } + }, null); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + assertFalse(exported); + assertTrue(factory.getFileContents().isEmpty()); + + } } \ No newline at end of file From 3cc4bbe45995ce3622f6ce7da6d5b97268b797a6 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 22 Apr 2025 13:07:24 +0200 Subject: [PATCH 38/69] Fix number of columns for cancer type file --- .../org/cbioportal/application/file/model/CancerType.java | 1 - test/test_data/study_es_0_import_export/data_cancer_type.txt | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/model/CancerType.java b/src/main/java/org/cbioportal/application/file/model/CancerType.java index d087bd68641..ea7a873020c 100644 --- a/src/main/java/org/cbioportal/application/file/model/CancerType.java +++ b/src/main/java/org/cbioportal/application/file/model/CancerType.java @@ -57,7 +57,6 @@ public SequencedMap toRow() { put("TYPE_OF_CANCER_ID", typeOfCancerId); put("NAME", name); put("DEDICATED_COLOR", dedicatedColor); - put("SHORT_NAME", shortName); put("PARENT", parent); } }; diff --git a/test/test_data/study_es_0_import_export/data_cancer_type.txt b/test/test_data/study_es_0_import_export/data_cancer_type.txt index 099804ff168..55674b7de7f 100644 --- a/test/test_data/study_es_0_import_export/data_cancer_type.txt +++ b/test/test_data/study_es_0_import_export/data_cancer_type.txt @@ -1,2 +1,2 @@ -brca-es0 Breast Invasive Carcinoma HotPink brca-es0 breast -breast Breast HotPink BREAST tissue +brca-es0 Breast Invasive Carcinoma HotPink breast +breast Breast HotPink tissue From fc7b399239eba35f0919848b236b2e21aa246302 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 22 Apr 2025 15:01:25 +0200 Subject: [PATCH 39/69] Export clinical timeline aka events --- .../application/file/export/ExportConfig.java | 8 + .../ClinicalTimelineDataTypeExporter.java | 108 ++++++++++ .../mappers/ClinicalAttributeDataMapper.java | 10 + .../ClinicalAttributeDataService.java | 18 ++ .../application/file/model/ClinicalEvent.java | 49 +++++ .../file/model/ClinicalEventData.java | 31 +++ .../export/ClinicalAttributeDataMapper.xml | 44 ++++ ...ClinicalTimelineDataTypeExporterTests.java | 201 ++++++++++++++++++ .../data_clinical_timeline.txt | 4 + .../meta_clinical_timeline.txt | 4 + 10 files changed, 477 insertions(+) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalEvent.java create mode 100644 src/main/java/org/cbioportal/application/file/model/ClinicalEventData.java create mode 100644 src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java create mode 100644 test/test_data/study_es_0_import_export/data_clinical_timeline.txt create mode 100644 test/test_data/study_es_0_import_export/meta_clinical_timeline.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 101e77b97d3..a55e69b9149 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -7,6 +7,7 @@ import org.cbioportal.application.file.export.exporters.CaseListsExporter; import org.cbioportal.application.file.export.exporters.ClinicalPatientAttributesDataTypeExporter; import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; +import org.cbioportal.application.file.export.exporters.ClinicalTimelineDataTypeExporter; import org.cbioportal.application.file.export.exporters.Exporter; import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; @@ -130,6 +131,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE CancerTypeDataTypeExporter cancerTypeDataTypeExporter, ClinicalPatientAttributesDataTypeExporter clinicalPatientAttributesMetadataAndDataExporter, ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadataAndDataExporter, + ClinicalTimelineDataTypeExporter clinicalTimelineDataTypeExporter, MafDataTypeExporter mafMetadataAndDataExporter, MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter, MrnaExpressionZScoreDatatypeExporter mrnaExpressionZScoreDatatypeExporter, @@ -141,6 +143,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE cancerTypeDataTypeExporter, clinicalPatientAttributesMetadataAndDataExporter, clinicalSampleAttributesMetadataAndDataExporter, + clinicalTimelineDataTypeExporter, mafMetadataAndDataExporter, mrnaExpressionContinuousDatatypeExporter, mrnaExpressionZScoreDatatypeExporter, @@ -170,6 +173,11 @@ public ClinicalSampleAttributesDataTypeExporter clinicalSampleAttributesMetadata return new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService); } + @Bean + public ClinicalTimelineDataTypeExporter clinicalTimelineDataTypeExporter(ClinicalAttributeDataService clinicalDataAttributeDataService) { + return new ClinicalTimelineDataTypeExporter(clinicalDataAttributeDataService); + } + @Bean public MafDataTypeExporter mafMetadataAndDataExporter(GeneticProfileService geneticProfileService, MafRecordService mafRecordService) { return new MafDataTypeExporter(geneticProfileService, mafRecordService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java new file mode 100644 index 00000000000..991460a8231 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java @@ -0,0 +1,108 @@ +package org.cbioportal.application.file.export.exporters; + +import com.google.common.collect.Iterators; +import com.google.common.collect.PeekingIterator; +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.model.ClinicalAttributesMetadata; +import org.cbioportal.application.file.model.ClinicalEvent; +import org.cbioportal.application.file.model.ClinicalEventData; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Optional; +import java.util.function.Function; + +/** + * Export metadata and data for clinical timeline data type. + */ +public class ClinicalTimelineDataTypeExporter extends DataTypeExporter { + + private static final LinkedHashMap> ROW = new LinkedHashMap<>(); + + static { + ROW.put("PATIENT_ID", ClinicalEvent::getPatientId); + ROW.put("START_DATE", data -> data.getStartDate() == null ? null : String.valueOf(data.getStartDate())); + ROW.put("STOP_DATE", data -> data.getStopDate() == null ? null : String.valueOf(data.getStopDate())); + ROW.put("EVENT_TYPE", ClinicalEvent::getEventType); + } + + private final ClinicalAttributeDataService clinicalDataAttributeDataService; + + public ClinicalTimelineDataTypeExporter(ClinicalAttributeDataService clinicalDataAttributeDataService) { + this.clinicalDataAttributeDataService = clinicalDataAttributeDataService; + } + + @Override + protected Optional getMetadata(String studyId) { + if (!clinicalDataAttributeDataService.hasClinicalTimelineData(studyId)) { + return Optional.empty(); + } + return Optional.of(new ClinicalAttributesMetadata(studyId, "CLINICAL", "TIMELINE")); + } + + @Override + protected Table getData(String studyId) { + List clinicalEventKeys = clinicalDataAttributeDataService.getDistinctClinicalEventKeys(studyId); + CloseableIterator clinicalEventDataIterator; + if (clinicalEventKeys.isEmpty()) { + clinicalEventDataIterator = CloseableIterator.empty(); + } else { + clinicalEventDataIterator = clinicalDataAttributeDataService.getClinicalEventData(studyId); + } + + CloseableIterator clinicalEventsIterator = clinicalDataAttributeDataService.getClinicalEvents(studyId); + return getTable(clinicalEventsIterator, clinicalEventKeys, clinicalEventDataIterator); + } + + private static Table getTable(CloseableIterator clinicalEventsIterator, List clinicalEventKeys, CloseableIterator clinicalEventDataIterator) { + var header = new LinkedHashSet(); + header.addAll(ROW.sequencedKeySet()); + header.addAll(clinicalEventKeys); + + PeekingIterator peekingClinicalEventDataIterator = Iterators.peekingIterator(clinicalEventDataIterator); + return new Table(new CloseableIterator<>() { + @Override + public void close() throws IOException { + clinicalEventDataIterator.close(); + clinicalEventsIterator.close(); + } + + @Override + public boolean hasNext() { + return clinicalEventsIterator.hasNext(); + } + + @Override + public TableRow next() { + ClinicalEvent clinicalEvent = clinicalEventsIterator.next(); + var row = new LinkedHashMap(); + for (var entry : ROW.entrySet()) { + row.put(entry.getKey(), entry.getValue().apply(clinicalEvent)); + } + if (!clinicalEventKeys.isEmpty()) { + var properties = new HashMap(); + while (peekingClinicalEventDataIterator.hasNext() && peekingClinicalEventDataIterator.peek().getClinicalEventId() <= clinicalEvent.getClinicalEventId()) { + if (peekingClinicalEventDataIterator.peek().getClinicalEventId() < clinicalEvent.getClinicalEventId()) { + throw new IllegalStateException("Clinical event IDs are not matching. Check the order of clinical events and their data. Both should be in ascending order."); + } + ClinicalEventData clinicalEventData = peekingClinicalEventDataIterator.next(); + if (clinicalEventData.getKey() == null) { + throw new IllegalStateException("Clinical event data key is null"); + } + properties.put(clinicalEventData.getKey(), clinicalEventData.getValue()); + } + for (String key : clinicalEventKeys) { + row.put(key, properties.get(key)); + } + } + return () -> row; + } + }, header); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java index c0574afd6c7..92aa62b3b89 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java @@ -3,6 +3,8 @@ import org.apache.ibatis.cursor.Cursor; import org.cbioportal.application.file.model.ClinicalAttribute; import org.cbioportal.application.file.model.ClinicalAttributeValue; +import org.cbioportal.application.file.model.ClinicalEvent; +import org.cbioportal.application.file.model.ClinicalEventData; import java.util.List; @@ -19,4 +21,12 @@ public interface ClinicalAttributeDataMapper { boolean hasClinicalPatientAttributes(String studyId); boolean hasClinicalSampleAttributes(String studyId); + + boolean hasClinicalTimelineData(String studyId); + + List getDistinctClinicalEventKeys(String studyId); + + Cursor getClinicalEventData(String studyId); + + Cursor getClinicalEvents(String studyId); } diff --git a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java index cf21b7e2e74..ee6046f7f45 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java @@ -3,6 +3,8 @@ import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; import org.cbioportal.application.file.model.ClinicalAttribute; import org.cbioportal.application.file.model.ClinicalAttributeValue; +import org.cbioportal.application.file.model.ClinicalEvent; +import org.cbioportal.application.file.model.ClinicalEventData; import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; @@ -42,4 +44,20 @@ public boolean hasClinicalPatientAttributes(String studyId) { public boolean hasClinicalSampleAttributes(String studyId) { return clinicalAttributeDataMapper.hasClinicalSampleAttributes(studyId); } + + public boolean hasClinicalTimelineData(String studyId) { + return clinicalAttributeDataMapper.hasClinicalTimelineData(studyId); + } + + public List getDistinctClinicalEventKeys(String studyId) { + return clinicalAttributeDataMapper.getDistinctClinicalEventKeys(studyId); + } + + public CloseableIterator getClinicalEventData(String studyId) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEventData(studyId)); + } + + public CloseableIterator getClinicalEvents(String studyId) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEvents(studyId)); + } } diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalEvent.java b/src/main/java/org/cbioportal/application/file/model/ClinicalEvent.java new file mode 100644 index 00000000000..57f9d79aac6 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalEvent.java @@ -0,0 +1,49 @@ +package org.cbioportal.application.file.model; + +public class ClinicalEvent { + private Integer clinicalEventId; + private String patientId; + private String eventType; + private Integer startDate; + private Integer stopDate; + + public Integer getClinicalEventId() { + return clinicalEventId; + } + + public void setClinicalEventId(Integer clinicalEventId) { + this.clinicalEventId = clinicalEventId; + } + + public String getPatientId() { + return patientId; + } + + public void setPatientId(String patientId) { + this.patientId = patientId; + } + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public Integer getStartDate() { + return startDate; + } + + public void setStartDate(Integer startDate) { + this.startDate = startDate; + } + + public Integer getStopDate() { + return stopDate; + } + + public void setStopDate(Integer stopDate) { + this.stopDate = stopDate; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/ClinicalEventData.java b/src/main/java/org/cbioportal/application/file/model/ClinicalEventData.java new file mode 100644 index 00000000000..f29f6d0014f --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/ClinicalEventData.java @@ -0,0 +1,31 @@ +package org.cbioportal.application.file.model; + +public class ClinicalEventData { + private Integer clinicalEventId; + private String key; + private String value; + + public Integer getClinicalEventId() { + return clinicalEventId; + } + + public void setClinicalEventId(Integer clinicalEventId) { + this.clinicalEventId = clinicalEventId; + } + + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } +} diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index a5cf1ee5b2f..bbd1ceeb727 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -123,4 +123,48 @@ ) ORDER BY rowKey + + + + \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java new file mode 100644 index 00000000000..0e82067316d --- /dev/null +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java @@ -0,0 +1,201 @@ +package org.cbioportal.application.file.export; + +import org.cbioportal.application.file.export.exporters.ClinicalTimelineDataTypeExporter; +import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; +import org.cbioportal.application.file.model.ClinicalEvent; +import org.cbioportal.application.file.model.ClinicalEventData; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.junit.Test; + +import java.util.List; +import java.util.Set; + +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.assertTrue; + +public class ClinicalTimelineDataTypeExporterTests { + + ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(null) { + @Override + public boolean hasClinicalTimelineData(String studyId) { + return true; + } + + @Override + public List getDistinctClinicalEventKeys(String studyId) { + return List.of("KEY1", "KEY2"); + } + + @Override + public CloseableIterator getClinicalEvents(String studyId) { + return CloseableIterator.empty(); + } + + @Override + public CloseableIterator getClinicalEventData(String studyId) { + return CloseableIterator.empty(); + } + }; + + @Test + public void testNoClinicalEvents() { + var factory = new InMemoryFileWriterFactory(); + + ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public boolean hasClinicalTimelineData(String studyId) { + return false; + } + }); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertFalse(exported); + assertTrue(factory.getFileContents().isEmpty()); + } + + @Test + public void testMismatchedEventData() { + var factory = new InMemoryFileWriterFactory(); + + ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public CloseableIterator getClinicalEvents(String studyId) { + ClinicalEvent event1 = new ClinicalEvent(); + event1.setClinicalEventId(1); + event1.setPatientId("PATIENT_1"); + ClinicalEvent event3 = new ClinicalEvent(); + event3.setClinicalEventId(3); + event3.setPatientId("PATIENT_2"); + return new SimpleCloseableIterator<>(List.of(event1, event3)); + } + + @Override + public CloseableIterator getClinicalEventData(String studyId) { + ClinicalEventData eventData = new ClinicalEventData(); + eventData.setClinicalEventId(2); // Mismatched ID + eventData.setKey("KEY1"); + eventData.setValue("VALUE1"); + return new SimpleCloseableIterator<>(List.of(eventData)); + } + + @Override + public boolean hasClinicalTimelineData(String studyId) { + return true; + } + + @Override + public List getDistinctClinicalEventKeys(String studyId) { + return List.of("KEY1"); + } + }); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Clinical event IDs are not matching")); + } + + @Test + public void testExport() { + var factory = new InMemoryFileWriterFactory(); + + ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public CloseableIterator getClinicalEvents(String studyId) { + ClinicalEvent event1 = new ClinicalEvent(); + event1.setClinicalEventId(1); + event1.setPatientId("PATIENT_1"); + event1.setEventType("TYPE_1"); + + ClinicalEvent event2 = new ClinicalEvent(); + event2.setClinicalEventId(2); + event2.setPatientId("PATIENT_2"); + event2.setEventType("TYPE_2"); + + return new SimpleCloseableIterator<>(List.of(event1, event2)); + } + + @Override + public CloseableIterator getClinicalEventData(String studyId) { + ClinicalEventData eventData1 = new ClinicalEventData(); + eventData1.setClinicalEventId(1); + eventData1.setKey("KEY1"); + eventData1.setValue("VALUE1"); + + ClinicalEventData eventData2 = new ClinicalEventData(); + eventData2.setClinicalEventId(2); + eventData2.setKey("KEY2"); + eventData2.setValue("VALUE2"); + + return new SimpleCloseableIterator<>(List.of(eventData1, eventData2)); + } + + @Override + public boolean hasClinicalTimelineData(String studyId) { + return true; + } + + @Override + public List getDistinctClinicalEventKeys(String studyId) { + return List.of("KEY1", "KEY2"); + } + }); + + boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + + assertTrue(exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_clinical_timeline.txt", "data_clinical_timeline.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID\n" + + "genetic_alteration_type: CLINICAL\n" + + "datatype: TIMELINE\n" + + "data_filename: data_clinical_timeline.txt\n", fileContents.get("meta_clinical_timeline.txt").toString()); + + assertEquals(""" + PATIENT_ID\tSTART_DATE\tSTOP_DATE\tEVENT_TYPE\tKEY1\tKEY2 + PATIENT_1\t\t\tTYPE_1\tVALUE1\t + PATIENT_2\t\t\tTYPE_2\t\tVALUE2 + """, fileContents.get("data_clinical_timeline.txt").toString()); + } + + @Test + public void testClinicalEventDataKeyIsNull() { + var factory = new InMemoryFileWriterFactory(); + + ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { + @Override + public CloseableIterator getClinicalEvents(String studyId) { + ClinicalEvent event = new ClinicalEvent(); + event.setClinicalEventId(1); + event.setPatientId("PATIENT_1"); + return new SimpleCloseableIterator<>(List.of(event)); + } + + @Override + public CloseableIterator getClinicalEventData(String studyId) { + ClinicalEventData eventData = new ClinicalEventData(); + eventData.setClinicalEventId(1); + eventData.setKey(null); // Null key to trigger the exception + eventData.setValue("VALUE1"); + return new SimpleCloseableIterator<>(List.of(eventData)); + } + + @Override + public boolean hasClinicalTimelineData(String studyId) { + return true; + } + + @Override + public List getDistinctClinicalEventKeys(String studyId) { + return List.of("KEY1"); + } + }); + + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + assertThat(exception.getMessage(), containsString("Clinical event data key is null")); + } +} \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_clinical_timeline.txt b/test/test_data/study_es_0_import_export/data_clinical_timeline.txt new file mode 100644 index 00000000000..51436599192 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_clinical_timeline.txt @@ -0,0 +1,4 @@ +PATIENT_ID START_DATE STOP_DATE EVENT_TYPE SOURCE +TCGA-BH-A18K 20 60 SPECIMEN test_source_3 +TCGA-BH-A18K 10 20 STATUS test_source_4 +TCGA-BH-A0HL 100 200 STATUS test_source_1 diff --git a/test/test_data/study_es_0_import_export/meta_clinical_timeline.txt b/test/test_data/study_es_0_import_export/meta_clinical_timeline.txt new file mode 100644 index 00000000000..bb5cdce82ce --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_clinical_timeline.txt @@ -0,0 +1,4 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: CLINICAL +datatype: TIMELINE +data_filename: data_clinical_timeline.txt From 112fe7e8d6178d7b7adab5e288b065c183b4a103 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 23 Apr 2025 14:40:34 +0200 Subject: [PATCH 40/69] Support protein level data export --- .../application/file/export/ExportConfig.java | 24 ++++ ...roteinLevelContinuousDatatypeExporter.java | 15 +++ .../ProteinLevelDatatypeExporter.java | 113 ++++++++++++++++++ ...ProteinLevelLog2ValueDatatypeExporter.java | 15 +++ .../ProteinLevelZScoreDatatypeExporter.java | 15 +++ .../application/file/model/Gene.java | 9 ++ .../export/GeneticProfileDataMapper.xml | 4 +- ...ata_protein_level_z-score_rppa_zscores.txt | 6 + ...eta_protein_level_z-score_rppa_zscores.txt | 9 ++ 9 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelContinuousDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelLog2ValueDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelZScoreDatatypeExporter.java create mode 100644 test/test_data/study_es_0_import_export/data_protein_level_z-score_rppa_zscores.txt create mode 100644 test/test_data/study_es_0_import_export/meta_protein_level_z-score_rppa_zscores.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index a55e69b9149..344e61448b8 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -14,6 +14,9 @@ import org.cbioportal.application.file.export.exporters.MrnaExpressionContinuousDatatypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionDiscreteDatatypeExporter; import org.cbioportal.application.file.export.exporters.MrnaExpressionZScoreDatatypeExporter; +import org.cbioportal.application.file.export.exporters.ProteinLevelContinuousDatatypeExporter; +import org.cbioportal.application.file.export.exporters.ProteinLevelLog2ValueDatatypeExporter; +import org.cbioportal.application.file.export.exporters.ProteinLevelZScoreDatatypeExporter; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; @@ -136,6 +139,9 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter, MrnaExpressionZScoreDatatypeExporter mrnaExpressionZScoreDatatypeExporter, MrnaExpressionDiscreteDatatypeExporter mrnaExpressionDiscreteDatatypeExporter, + ProteinLevelContinuousDatatypeExporter proteinLevelContinuousDatatypeExporter, + ProteinLevelZScoreDatatypeExporter proteinLevelZScoreDatatypeExporter, + ProteinLevelLog2ValueDatatypeExporter proteinLevelLog2ValueDatatypeExporter, GenericAssayLimitValueDatatypeExporter genericAssayLimitValueDatatypeExporter, CaseListsExporter caseListsExporter) { return List.of( @@ -148,6 +154,9 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE mrnaExpressionContinuousDatatypeExporter, mrnaExpressionZScoreDatatypeExporter, mrnaExpressionDiscreteDatatypeExporter, + proteinLevelContinuousDatatypeExporter, + proteinLevelZScoreDatatypeExporter, + proteinLevelLog2ValueDatatypeExporter, genericAssayLimitValueDatatypeExporter, caseListsExporter ); @@ -198,6 +207,21 @@ public MrnaExpressionDiscreteDatatypeExporter mrnaExpressionDiscreteDatatypeExpo return new MrnaExpressionDiscreteDatatypeExporter(geneticProfileService, geneticProfileDataService); } + @Bean + public ProteinLevelContinuousDatatypeExporter proteinLevelContinuousDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new ProteinLevelContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + + @Bean + public ProteinLevelZScoreDatatypeExporter proteinLevelZScoreDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new ProteinLevelZScoreDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + + @Bean + public ProteinLevelLog2ValueDatatypeExporter proteinLevelLog2ValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + return new ProteinLevelLog2ValueDatatypeExporter(geneticProfileService, geneticProfileDataService); + } + @Bean public GenericAssayLimitValueDatatypeExporter genericAssayLimitValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { return new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelContinuousDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelContinuousDatatypeExporter.java new file mode 100644 index 00000000000..d08e2da2712 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelContinuousDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class ProteinLevelContinuousDatatypeExporter extends ProteinLevelDatatypeExporter { + public ProteinLevelContinuousDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "CONTINUOUS"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java new file mode 100644 index 00000000000..0c9fe8c0f7d --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java @@ -0,0 +1,113 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Optional; +import java.util.SequencedMap; +import java.util.function.Function; + +public abstract class ProteinLevelDatatypeExporter extends GeneticProfileDatatypeExporter { + + private final GeneticProfileDataService geneticProfileDataService; + + public ProteinLevelDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService); + this.geneticProfileDataService = geneticProfileDataService; + } + + @Override + protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { + return new MrnaExpressionGeneticProfileExporter(metadata); + } + + @Override + protected String getGeneticAlterationType() { + return "PROTEIN_LEVEL"; + } + + private static final LinkedHashMap> ROW = new LinkedHashMap<>(); + + static { + ROW.put("Composite.Element.REF", data -> { + if (data.getGene() == null) { + return null; + } + String hugoGeneSymbol = data.getGene().getHugoGeneSymbol(); + if ("phosphoprotein".equals(data.getGene().getType())) { + String[] parts = hugoGeneSymbol.split("_"); + //first part is actual hugo gene symbol. the second part is the phosphosite. example of composed string: PDK1|PDK1_pS24 + return (parts.length > 1 ? parts[0] : hugoGeneSymbol) + "|" + hugoGeneSymbol; + } else { + return hugoGeneSymbol + "|" + hugoGeneSymbol; + } + }); + } + + private class MrnaExpressionGeneticProfileExporter extends GeneticProfileExporter { + private final GeneticProfileDatatypeMetadata metatdata; + + public MrnaExpressionGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { + this.metatdata = metadata; + } + + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds) { + return new CloseableIterator<>() { + @Override + public void close() throws IOException { + geneticProfileData.close(); + } + + @Override + public boolean hasNext() { + return geneticProfileData.hasNext(); + } + + @Override + public TableRow next() { + var data = geneticProfileData.next(); + if (data.getValues().size() != sampleStableIds.size()) { + throw new IllegalStateException("Number of values does not match number of sample stable IDs"); + } + var row = new LinkedHashMap(); + for (var entry : ROW.entrySet()) { + row.put(entry.getKey(), entry.getValue().apply(data)); + } + for (int i = 0; i < sampleStableIds.size(); i++) { + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return () -> row; + } + }; + } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(metatdata); + } + + @Override + protected CloseableIterator> getData(String studyId) { + var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + for (String sampleStableId : sampleStableIds) { + if (sampleStableId == null) { + throw new IllegalStateException("Sample stable ID is null"); + } + } + var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); + var header = new LinkedHashSet(); + header.addAll(ROW.keySet()); + header.addAll(sampleStableIds); + return new Table(composeRows(geneticProfileData, sampleStableIds), header); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelLog2ValueDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelLog2ValueDatatypeExporter.java new file mode 100644 index 00000000000..8401f0cfd25 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelLog2ValueDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class ProteinLevelLog2ValueDatatypeExporter extends ProteinLevelDatatypeExporter { + public ProteinLevelLog2ValueDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "LOG2-VALUE"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelZScoreDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelZScoreDatatypeExporter.java new file mode 100644 index 00000000000..5bc64cc43bc --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelZScoreDatatypeExporter.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; + +public class ProteinLevelZScoreDatatypeExporter extends ProteinLevelDatatypeExporter { + public ProteinLevelZScoreDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService, geneticProfileDataService); + } + + @Override + protected String getDatatype() { + return "Z-SCORE"; + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/Gene.java b/src/main/java/org/cbioportal/application/file/model/Gene.java index 5bc204fd0b6..a273582844f 100644 --- a/src/main/java/org/cbioportal/application/file/model/Gene.java +++ b/src/main/java/org/cbioportal/application/file/model/Gene.java @@ -3,6 +3,7 @@ public class Gene { private String hugoGeneSymbol; private Integer entrezGeneId; + private String type; public String getHugoGeneSymbol() { return hugoGeneSymbol; @@ -19,4 +20,12 @@ public Integer getEntrezGeneId() { public void setEntrezGeneId(Integer entrezGeneId) { this.entrezGeneId = entrezGeneId; } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } } diff --git a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml index f8a02279522..429322a4223 100644 --- a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml +++ b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml @@ -29,6 +29,7 @@ + + SELECT + cns.SEG_ID, + s.STABLE_ID AS sampleId, + cns.chr as chr, + cns.start as start, + cns.end as end, + cns.num_probes as numProbes, + cns.segment_mean as segmentMean + FROM copy_number_seg cns + JOIN cancer_study cs ON cs.CANCER_STUDY_ID = cns.CANCER_STUDY_ID + JOIN sample s ON s.INTERNAL_ID = cns.SAMPLE_ID + WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} + + + \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_copy_number_alteration_seg.txt b/test/test_data/study_es_0_import_export/data_copy_number_alteration_seg.txt new file mode 100644 index 00000000000..087482c13d0 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_copy_number_alteration_seg.txt @@ -0,0 +1,10 @@ +ID chrom loc.start loc.end num.mark seg.mean +TCGA-A2-A04P-01 1 3218610 95674710 53225 0.0055 +TCGA-A2-A04P-01 1 95676511 95676518 2 -1.6636 +TCGA-A2-A04P-01 1 95680124 167057183 24886 0.0053 +TCGA-A2-A04P-01 1 167057495 167059336 3 -1.0999 +TCGA-A2-A04P-01 1 167059760 181602002 9213 -8.0E-4 +TCGA-A2-A04P-01 1 181603120 181609567 6 -1.2009 +TCGA-A2-A04P-01 1 181610685 201473647 12002 0.0055 +TCGA-A2-A04P-01 1 201474400 201474544 2 -1.4235 +TCGA-A2-A04P-01 1 201475220 247813706 29781 -4.0E-4 diff --git a/test/test_data/study_es_0_import_export/meta_copy_number_alteration_seg.txt b/test/test_data/study_es_0_import_export/meta_copy_number_alteration_seg.txt new file mode 100644 index 00000000000..cc1c5527a7a --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_copy_number_alteration_seg.txt @@ -0,0 +1,6 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: COPY_NUMBER_ALTERATION +datatype: SEG +description: Copy number alteration segments +reference_genome_id: hg19 +data_filename: data_copy_number_alteration_seg.txt From 9dc936d18c98752454df45cf8e91d91cc090a653 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 24 Apr 2025 17:03:26 +0200 Subject: [PATCH 48/69] Support Structural Variant Data Export --- .../application/file/export/ExportConfig.java | 15 + .../StructuralVariantDataTypeExporter.java | 55 +++ .../file/export/mappers/SVMapper.java | 8 + .../services/StructuralVariantService.java | 19 + .../file/model/StructuralVariant.java | 418 ++++++++++++++++++ .../resources/mappers/export/SVMapper.xml | 56 +++ ...uctural_variant_sv_structural_variants.txt | 49 ++ ...uctural_variant_sv_structural_variants.txt | 9 + 8 files changed, 629 insertions(+) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java create mode 100644 src/main/java/org/cbioportal/application/file/model/StructuralVariant.java create mode 100644 src/main/resources/mappers/export/SVMapper.xml create mode 100644 test/test_data/study_es_0_import_export/data_structural_variant_sv_structural_variants.txt create mode 100644 test/test_data/study_es_0_import_export/meta_structural_variant_sv_structural_variants.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 74da8320869..9aff9d6d39b 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -25,6 +25,7 @@ import org.cbioportal.application.file.export.exporters.ProteinLevelContinuousDatatypeExporter; import org.cbioportal.application.file.export.exporters.ProteinLevelLog2ValueDatatypeExporter; import org.cbioportal.application.file.export.exporters.ProteinLevelZScoreDatatypeExporter; +import org.cbioportal.application.file.export.exporters.StructuralVariantDataTypeExporter; import org.cbioportal.application.file.export.mappers.CancerStudyMetadataMapper; import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; @@ -32,6 +33,7 @@ import org.cbioportal.application.file.export.mappers.GeneticProfileDataMapper; import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; import org.cbioportal.application.file.export.mappers.MafRecordMapper; +import org.cbioportal.application.file.export.mappers.SVMapper; import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.export.services.CaseListMetadataService; import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; @@ -40,6 +42,7 @@ import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.export.services.MafRecordService; +import org.cbioportal.application.file.export.services.StructuralVariantService; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -77,6 +80,11 @@ public MafRecordService mafRecordService(MafRecordMapper mafRecordMapper) { return new MafRecordService(mafRecordMapper); } + @Bean + public StructuralVariantService structuralVariantService(SVMapper structuralVariantMapper) { + return new StructuralVariantService(structuralVariantMapper); + } + @Bean public CnaSegmentService cnaSegmentService(CnaSegmentMapper cnaSegmentMapper) { return new CnaSegmentService(cnaSegmentMapper); @@ -152,6 +160,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE ClinicalTimelineDataTypeExporter clinicalTimelineDataTypeExporter, MutationExtendedDatatypeExporter mutationExtendedDatatypeExporter, MutationUncalledDatatypeExporter mutationUncalledDatatypeExporter, + StructuralVariantDataTypeExporter structuralVariantDataTypeExporter, MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter, MrnaExpressionZScoreDatatypeExporter mrnaExpressionZScoreDatatypeExporter, MrnaExpressionDiscreteDatatypeExporter mrnaExpressionDiscreteDatatypeExporter, @@ -175,6 +184,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE clinicalTimelineDataTypeExporter, mutationExtendedDatatypeExporter, mutationUncalledDatatypeExporter, + structuralVariantDataTypeExporter, mrnaExpressionContinuousDatatypeExporter, mrnaExpressionZScoreDatatypeExporter, mrnaExpressionDiscreteDatatypeExporter, @@ -228,6 +238,11 @@ public MutationUncalledDatatypeExporter mutationUncalledDatatypeExporter(Genetic return new MutationUncalledDatatypeExporter(geneticProfileService, mafRecordService); } + @Bean + public StructuralVariantDataTypeExporter structuralVariantDataTypeExporter(GeneticProfileService geneticProfileService, StructuralVariantService structuralVariantService) { + return new StructuralVariantDataTypeExporter(geneticProfileService, structuralVariantService); + } + @Bean public MrnaExpressionContinuousDatatypeExporter mrnaExpressionContinuousDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { return new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java new file mode 100644 index 00000000000..ab6d794d4d4 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java @@ -0,0 +1,55 @@ +package org.cbioportal.application.file.export.exporters; + +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.export.services.StructuralVariantService; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.StructuralVariant; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.util.Optional; + +public class StructuralVariantDataTypeExporter extends GeneticProfileDatatypeExporter { + + private final StructuralVariantService structuralVariantService; + + public StructuralVariantDataTypeExporter(GeneticProfileService geneticProfileService, StructuralVariantService structuralVariantService) { + super(geneticProfileService); + this.structuralVariantService = structuralVariantService; + } + + @Override + protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { + return new SVGeneticProfileExporter(metadata); + } + + @Override + protected String getGeneticAlterationType() { + return "STRUCTURAL_VARIANT"; + } + + @Override + protected String getDatatype() { + return "SV"; + } + + private class SVGeneticProfileExporter extends GeneticProfileExporter { + + private final GeneticProfileDatatypeMetadata metadata; + + public SVGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { + this.metadata = metadata; + } + + @Override + protected Optional getMetadata(String studyId) { + return Optional.of(metadata); + } + + @Override + protected Table getData(String studyId) { + CloseableIterator structuralVariantData = structuralVariantService.getStructuralVariants(metadata.getStableId()); + return new Table(structuralVariantData, StructuralVariant.getHeader()); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java new file mode 100644 index 00000000000..d34153e9fbc --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java @@ -0,0 +1,8 @@ +package org.cbioportal.application.file.export.mappers; + +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.model.StructuralVariant; + +public interface SVMapper { + Cursor getStructuralVariants(String molecularProfileStableId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java b/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java new file mode 100644 index 00000000000..f1def5c92c5 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java @@ -0,0 +1,19 @@ +package org.cbioportal.application.file.export.services; + +import org.cbioportal.application.file.export.mappers.SVMapper; +import org.cbioportal.application.file.model.StructuralVariant; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.cbioportal.application.file.utils.CursorAdapter; + +public class StructuralVariantService { + + private final SVMapper structuralVariantMapper; + + public StructuralVariantService(SVMapper structuralVariantMapper) { + this.structuralVariantMapper = structuralVariantMapper; + } + + public CloseableIterator getStructuralVariants(String geneticDatatypeStableId) { + return new CursorAdapter<>(structuralVariantMapper.getStructuralVariants(geneticDatatypeStableId)); + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/StructuralVariant.java b/src/main/java/org/cbioportal/application/file/model/StructuralVariant.java new file mode 100644 index 00000000000..a425a113dec --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/StructuralVariant.java @@ -0,0 +1,418 @@ +package org.cbioportal.application.file.model; + +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.SequencedMap; +import java.util.SequencedSet; +import java.util.function.Function; + +public class StructuralVariant implements TableRow { + private String sampleId; + private Integer site1EntrezGeneId; + private String site1HugoSymbol; + private String site1EnsemblTranscriptId; + private String site1Chromosome; + private String site1Region; + private Integer site1RegionNumber; + private String site1Contig; + private Integer site1Position; + private String site1Description; + private Integer site2EntrezGeneId; + private String site2HugoSymbol; + private String site2EnsemblTranscriptId; + private String site2Chromosome; + private String site2Region; + private Integer site2RegionNumber; + private String site2Contig; + private Integer site2Position; + private String site2Description; + private String site2EffectOnFrame; + private String ncbiBuild; + private String dnaSupport; + private String rnaSupport; + private Integer normalReadCount; + private Integer tumorReadCount; + private Integer normalVariantCount; + private Integer tumorVariantCount; + private Integer normalPairedEndReadCount; + private Integer tumorPairedEndReadCount; + private Integer normalSplitReadCount; + private Integer tumorSplitReadCount; + private String annotation; + private String breakpointType; + private String connectionType; + private String eventInfo; + private String structuralVariantClass; + private Integer length; + private String comments; + private String svStatus; + + public String getSampleId() { + return sampleId; + } + + public void setSampleId(String sampleId) { + this.sampleId = sampleId; + } + + public String getSite1HugoSymbol() { + return site1HugoSymbol; + } + + public void setSite1HugoSymbol(String site1HugoSymbol) { + this.site1HugoSymbol = site1HugoSymbol; + } + + public String getSite2HugoSymbol() { + return site2HugoSymbol; + } + + public void setSite2HugoSymbol(String site2HugoSymbol) { + this.site2HugoSymbol = site2HugoSymbol; + } + + public Integer getSite1EntrezGeneId() { + return site1EntrezGeneId; + } + + public void setSite1EntrezGeneId(Integer site1EntrezGeneId) { + this.site1EntrezGeneId = site1EntrezGeneId; + } + + public String getSite1EnsemblTranscriptId() { + return site1EnsemblTranscriptId; + } + + public void setSite1EnsemblTranscriptId(String site1EnsemblTranscriptId) { + this.site1EnsemblTranscriptId = site1EnsemblTranscriptId; + } + + public String getSite1Chromosome() { + return site1Chromosome; + } + + public void setSite1Chromosome(String site1Chromosome) { + this.site1Chromosome = site1Chromosome; + } + + public String getSite1Region() { + return site1Region; + } + + public void setSite1Region(String site1Region) { + this.site1Region = site1Region; + } + + public Integer getSite1RegionNumber() { + return site1RegionNumber; + } + + public void setSite1RegionNumber(Integer site1RegionNumber) { + this.site1RegionNumber = site1RegionNumber; + } + + public String getSite1Contig() { + return site1Contig; + } + + public void setSite1Contig(String site1Contig) { + this.site1Contig = site1Contig; + } + + public Integer getSite1Position() { + return site1Position; + } + + public void setSite1Position(Integer site1Position) { + this.site1Position = site1Position; + } + + public String getSite1Description() { + return site1Description; + } + + public void setSite1Description(String site1Description) { + this.site1Description = site1Description; + } + + public Integer getSite2EntrezGeneId() { + return site2EntrezGeneId; + } + + public void setSite2EntrezGeneId(Integer site2EntrezGeneId) { + this.site2EntrezGeneId = site2EntrezGeneId; + } + + public String getSite2EnsemblTranscriptId() { + return site2EnsemblTranscriptId; + } + + public void setSite2EnsemblTranscriptId(String site2EnsemblTranscriptId) { + this.site2EnsemblTranscriptId = site2EnsemblTranscriptId; + } + + public String getSite2Chromosome() { + return site2Chromosome; + } + + public void setSite2Chromosome(String site2Chromosome) { + this.site2Chromosome = site2Chromosome; + } + + public String getSite2Region() { + return site2Region; + } + + public void setSite2Region(String site2Region) { + this.site2Region = site2Region; + } + + public Integer getSite2RegionNumber() { + return site2RegionNumber; + } + + public void setSite2RegionNumber(Integer site2RegionNumber) { + this.site2RegionNumber = site2RegionNumber; + } + + public String getSite2Contig() { + return site2Contig; + } + + public void setSite2Contig(String site2Contig) { + this.site2Contig = site2Contig; + } + + public Integer getSite2Position() { + return site2Position; + } + + public void setSite2Position(Integer site2Position) { + this.site2Position = site2Position; + } + + public String getSite2Description() { + return site2Description; + } + + public void setSite2Description(String site2Description) { + this.site2Description = site2Description; + } + + public String getSite2EffectOnFrame() { + return site2EffectOnFrame; + } + + public void setSite2EffectOnFrame(String site2EffectOnFrame) { + this.site2EffectOnFrame = site2EffectOnFrame; + } + + public String getNcbiBuild() { + return ncbiBuild; + } + + public void setNcbiBuild(String ncbiBuild) { + this.ncbiBuild = ncbiBuild; + } + + public String getDnaSupport() { + return dnaSupport; + } + + public void setDnaSupport(String dnaSupport) { + this.dnaSupport = dnaSupport; + } + + public String getRnaSupport() { + return rnaSupport; + } + + public void setRnaSupport(String rnaSupport) { + this.rnaSupport = rnaSupport; + } + + public Integer getNormalReadCount() { + return normalReadCount; + } + + public void setNormalReadCount(Integer normalReadCount) { + this.normalReadCount = normalReadCount; + } + + public Integer getTumorReadCount() { + return tumorReadCount; + } + + public void setTumorReadCount(Integer tumorReadCount) { + this.tumorReadCount = tumorReadCount; + } + + public Integer getNormalVariantCount() { + return normalVariantCount; + } + + public void setNormalVariantCount(Integer normalVariantCount) { + this.normalVariantCount = normalVariantCount; + } + + public Integer getTumorVariantCount() { + return tumorVariantCount; + } + + public void setTumorVariantCount(Integer tumorVariantCount) { + this.tumorVariantCount = tumorVariantCount; + } + + public Integer getNormalPairedEndReadCount() { + return normalPairedEndReadCount; + } + + public void setNormalPairedEndReadCount(Integer normalPairedEndReadCount) { + this.normalPairedEndReadCount = normalPairedEndReadCount; + } + + public Integer getTumorPairedEndReadCount() { + return tumorPairedEndReadCount; + } + + public void setTumorPairedEndReadCount(Integer tumorPairedEndReadCount) { + this.tumorPairedEndReadCount = tumorPairedEndReadCount; + } + + public Integer getNormalSplitReadCount() { + return normalSplitReadCount; + } + + public void setNormalSplitReadCount(Integer normalSplitReadCount) { + this.normalSplitReadCount = normalSplitReadCount; + } + + public Integer getTumorSplitReadCount() { + return tumorSplitReadCount; + } + + public void setTumorSplitReadCount(Integer tumorSplitReadCount) { + this.tumorSplitReadCount = tumorSplitReadCount; + } + + public String getAnnotation() { + return annotation; + } + + public void setAnnotation(String annotation) { + this.annotation = annotation; + } + + public String getBreakpointType() { + return breakpointType; + } + + public void setBreakpointType(String breakpointType) { + this.breakpointType = breakpointType; + } + + public String getConnectionType() { + return connectionType; + } + + public void setConnectionType(String connectionType) { + this.connectionType = connectionType; + } + + public String getEventInfo() { + return eventInfo; + } + + public void setEventInfo(String eventInfo) { + this.eventInfo = eventInfo; + } + + public String getStructuralVariantClass() { + return structuralVariantClass; + } + + public void setStructuralVariantClass(String structuralVariantClass) { + this.structuralVariantClass = structuralVariantClass; + } + + public Integer getLength() { + return length; + } + + public void setLength(Integer length) { + this.length = length; + } + + public String getComments() { + return comments; + } + + public void setComments(String comments) { + this.comments = comments; + } + + public String getSvStatus() { + return svStatus; + } + + public void setSvStatus(String svStatus) { + this.svStatus = svStatus; + } + + private static final LinkedHashMap> ROW = new LinkedHashMap<>(); + + static { + ROW.put("Sample_Id", StructuralVariant::getSampleId); + ROW.put("Site1_Entrez_Gene_Id", data -> data.getSite1EntrezGeneId() == null ? null : data.getSite1EntrezGeneId().toString()); + ROW.put("Site1_Hugo_Symbol", StructuralVariant::getSite1HugoSymbol); + ROW.put("Site1_Ensembl_Transcript_Id", StructuralVariant::getSite1EnsemblTranscriptId); + ROW.put("Site1_Region_Number", data -> data.getSite1RegionNumber() == null ? null : data.getSite1RegionNumber().toString()); + ROW.put("Site1_Chromosome", StructuralVariant::getSite1Chromosome); + ROW.put("Site1_Position", data -> data.getSite1Position() == null ? null : data.getSite1Position().toString()); + ROW.put("Site1_Region", StructuralVariant::getSite1Region); + ROW.put("Site1_Description", StructuralVariant::getSite1Description); + ROW.put("Site2_Entrez_Gene_Id", data -> data.getSite2EntrezGeneId() == null ? null : data.getSite2EntrezGeneId().toString()); + ROW.put("Site2_Hugo_Symbol", StructuralVariant::getSite2HugoSymbol); + ROW.put("Site2_Ensembl_Transcript_Id", StructuralVariant::getSite2EnsemblTranscriptId); + ROW.put("Site2_Region_Number", data -> data.getSite2RegionNumber() == null ? null : data.getSite2RegionNumber().toString()); + ROW.put("Site2_Chromosome", StructuralVariant::getSite2Chromosome); + ROW.put("Site2_Position", data -> data.getSite2Position() == null ? null : data.getSite2Position().toString()); + ROW.put("Site2_Contig", StructuralVariant::getSite2Contig); + ROW.put("Site2_Region", StructuralVariant::getSite2Region); + ROW.put("Site2_Description", StructuralVariant::getSite2Description); + ROW.put("Site2_Effect_On_Frame", StructuralVariant::getSite2EffectOnFrame); + ROW.put("NCBI_Build", StructuralVariant::getNcbiBuild); + ROW.put("DNA_Support", StructuralVariant::getDnaSupport); + ROW.put("RNA_Support", StructuralVariant::getRnaSupport); + ROW.put("Normal_Read_Count", data -> data.getNormalReadCount() == null ? null : data.getNormalReadCount().toString()); + ROW.put("Tumor_Read_Count", data -> data.getTumorReadCount() == null ? null : data.getTumorReadCount().toString()); + ROW.put("Normal_Variant_Count", data -> data.getNormalVariantCount() == null ? null : data.getNormalVariantCount().toString()); + ROW.put("Tumor_Variant_Count", data -> data.getTumorVariantCount() == null ? null : data.getTumorVariantCount().toString()); + ROW.put("Normal_Paired_End_Read_Count", data -> data.getNormalPairedEndReadCount() == null ? null : data.getNormalPairedEndReadCount().toString()); + ROW.put("Tumor_Paired_End_Read_Count", data -> data.getTumorPairedEndReadCount() == null ? null : data.getTumorPairedEndReadCount().toString()); + ROW.put("Normal_Split_Read_Count", data -> data.getNormalSplitReadCount() == null ? null : data.getNormalSplitReadCount().toString()); + ROW.put("Tumor_Split_Read_Count", data -> data.getTumorSplitReadCount() == null ? null : data.getTumorSplitReadCount().toString()); + ROW.put("Annotation", StructuralVariant::getAnnotation); + ROW.put("Breakpoint_Type", StructuralVariant::getBreakpointType); + ROW.put("Connection_Type", StructuralVariant::getConnectionType); + ROW.put("Event_Info", StructuralVariant::getEventInfo); + ROW.put("Class", StructuralVariant::getStructuralVariantClass); + ROW.put("SV_Length", data -> data.getLength() == null ? null : data.getLength().toString()); + ROW.put("Comments", StructuralVariant::getComments); + ROW.put("SV_Status", StructuralVariant::getSvStatus); + } + + public static SequencedSet getHeader() { + return new LinkedHashSet<>(ROW.sequencedKeySet()); + } + + @Override + public SequencedMap toRow() { + LinkedHashMap row = new LinkedHashMap<>(); + ROW.sequencedEntrySet().forEach(entry -> { + String value = entry.getValue().apply(this); + row.put(entry.getKey(), value); + }); + return row; + } +} diff --git a/src/main/resources/mappers/export/SVMapper.xml b/src/main/resources/mappers/export/SVMapper.xml new file mode 100644 index 00000000000..b6a5d8c843a --- /dev/null +++ b/src/main/resources/mappers/export/SVMapper.xml @@ -0,0 +1,56 @@ + + + + + + \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_structural_variant_sv_structural_variants.txt b/test/test_data/study_es_0_import_export/data_structural_variant_sv_structural_variants.txt new file mode 100644 index 00000000000..9d9ea90e045 --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_structural_variant_sv_structural_variants.txt @@ -0,0 +1,49 @@ +Sample_Id Site1_Entrez_Gene_Id Site1_Hugo_Symbol Site1_Ensembl_Transcript_Id Site1_Region_Number Site1_Chromosome Site1_Position Site1_Region Site1_Description Site2_Entrez_Gene_Id Site2_Hugo_Symbol Site2_Ensembl_Transcript_Id Site2_Region_Number Site2_Chromosome Site2_Position Site2_Contig Site2_Region Site2_Description Site2_Effect_On_Frame NCBI_Build DNA_Support RNA_Support Normal_Read_Count Tumor_Read_Count Normal_Variant_Count Tumor_Variant_Count Normal_Paired_End_Read_Count Tumor_Paired_End_Read_Count Normal_Split_Read_Count Tumor_Split_Read_Count Annotation Breakpoint_Type Connection_Type Event_Info Class SV_Length Comments SV_Status +TCGA-A2-A04P-01 9780 PIEZO1 ENST00000242365 15 7 138536968 EXON PIEZO1-NCOA4.K16B10.COSF509_1 8031 NCOA4 ENST00000288602 10 7 140482957 NA EXON PIEZO1-NCOA4.PIEZO1.COSF509_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 PIEZO1-NCOA4.K16B10.COSF509 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04P-01 57670 KIAA1549 ENST00000242365 15 7 138536968 EXON KIAA1549-BRAF.K16B10.COSF509_1 673 BRAF ENST00000288602 10 7 140482957 NA EXON KIAA1549-BRAF.K16B10.COSF509_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 KIAA1549-BRAF.K16B10.COSF509 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04P-01 8031 NCOA4 ENST00000344348 7 10 51582939 EXON NCOA4-RET.N7R12_1 5979 RET ENST00000340058 12 10 43612031 NA EXON NCOA4-RET.N7R12_2 NA GRCh37 no yes -1 1001 -1 800 -1 -1 -1 -1 NCOA4-RET.N7R1 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04P-01 27436 EML4 ENST00000318522 6 2 42492091 EXON EML4-ALK.E6bA20.AB374362_1 238 ALK ENST00000389048 20 2 29446394 NA EXON EML4-ALK.E6bA20.AB374362_2 NA GRCh37 no yes -1 1002 -1 700 -1 -1 -1 -1 EML4-ALK.E6bA20.AB374362 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04P-01 7113 TMPRSS2 ENST00000332149 1 21 42880007 EXON TMPRSS2-ERG.T1E2.COSF23.1_1 2078 ERG ENST00000442448 2 21 39956869 NA EXON TMPRSS2-ERG.T1E2.COSF23.1_2 NA GRCh37 no yes -1 1003 -1 600 -1 -1 -1 -1 TMPRSS2-ERG.T1E2.COSF23.1 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04P-01 1956 EGFR ENST00000275493 1 7 55087058 EXON EGFR-EGFR.E1E8.DelPositive.1_1 1956 EGFR ENST00000275493 8 7 55223522 NA EXON EGFR-EGFR.E1E8.DelPositive.1_2 NA GRCh37 no yes -1 1004 -1 500 -1 -1 -1 -1 EGFR-EGFR.E1E8.DelPositive NA NA Fusion NA -1 NA SOMATIC +TCGA-A2-A04P-01 238 ALK ENST00000389048 11 2 29497964 EXON ALK-PTPN3.A11P3_1 5774 PTPN3 ENST00000374541 3 9 112219679 NA EXON ALK-PTPN3.A11P3_2 NA GRCh37 no yes -1 1005 -1 400 -1 -1 -1 -1 ALK-PTPN3.A11P3 NA NA Fusion NA -1 NA SOMATIC +TCGA-A1-A0SB-01 27436 EML4 ENST00000318522 13 2 42522656 EXON EML4-ALK.E13A20.AB462411_1 238 ALK ENST00000389048 20 2 29446335 NA EXON EML4-ALK.E13A20.AB462411_2 NA GRCh37 no yes -1 1006 -1 300 -1 -1 -1 -1 EML4-ALK.E13A20 NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A1-A0SB-01 7113 TMPRSS2 ENST00000455813 1 21 42870045 EXON TMPRSS2-ETV1.T1bE4_1 2115 ETV1 ENST00000405358 4 7 14017105 NA EXON TMPRSS2-ETV1.T1bE4_2 NA GRCh37 no yes -1 1007 -1 200 -1 -1 -1 -1 TMPRSS2-ETV1.T1bE4 NA NA Fusion NA -1 NA SOMATIC +TCGA-A2-A04P-01 8031 NCOA4 ENST00000344348 7 10 51582939 EXON NCOA4-TTN.CUSTOMHYVE_1 7273 TTN ENST00000589042 2 1 111111111 NA EXON NCOA4-TTN.CUSTOMHYVE_2 NA GRCh37 no yes -1 1008 -1 100 -1 -1 -1 -1 NCOA4-TTN.CUSTOMHYVE NA NA Fusion NA -1 NA SOMATIC +TCGA-A2-A04P-01 7273 TTN ENST00000589042 28 1 222222222 EXON TTN_ALK.CUSTOMHYVE_1 238 ALK ENST00000389048 20 2 29446394 NA EXON TTN_ALK.CUSTOMHYVE_2 NA GRCh37 no yes -1 1008 -1 100 -1 -1 -1 -1 TTN-ALK.CUSTOMHYVE NA NA Fusion NA -1 NA SOMATIC +TCGA-A1-A0SK-01 9867 PJA2 ENST00000361189 7 1 10000000 EXON PJA2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON PJA2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 PJA2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0CM-01 54810 GIPC2 ENST00000370759 3 1 10000000 EXON GIPC2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON GIPC2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 GIPC2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AR-A1AR-01 114883 OSBPL9 ENST00000428468 11 1 10000000 EXON OSBPL9_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON OSBPL9_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 OSBPL9_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-B6-A0WX-01 155435 RBM33 ENST00000401878 3 1 10000000 EXON RBM33_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON RBM33_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 RBM33_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A1F0-01 55755 CDK5RAP2 ENST00000349780 13 1 10000000 EXON CDK5RAP2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON CDK5RAP2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 CDK5RAP2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-B6-A0I6-01 55755 CDK5RAP2 ENST00000349780 12 1 10000000 EXON CDK5RAP2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON CDK5RAP2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 CDK5RAP2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A18V-01 23513 SCRIB ENST00000320476 20 1 10000000 EXON SCRIB_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SCRIB_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SCRIB_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A18Q-01 5577 PRKAR2B ENST00000265717 1 1 10000000 EXON PRKAR2B_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON PRKAR2B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 PRKAR2B_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A18K-01 5575 PRKAR1B ENST00000265717 10 1 10000000 EXON PRKAR1B_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON PRKAR1B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 PRKAR1B_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0HL-01 57157 PHTF2 ENST00000248550 19 1 10000000 EXON PHTF2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON PHTF2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 PHTF2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0E0-01 7756 ZNF207 ENST00000321233 3 1 10000000 EXON ZNF207_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON ZNF207_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 ZNF207_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0RX-01 11011 TLK2 ENST00000326270 2 1 10000000 EXON TLK2_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON TLK2_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 TLK2_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A7-A13D-01 64759 TNS3 ENST00000311160 18 1 10000000 EXON TNS3_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON TNS3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 TNS3_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0E6-01 9709 HERPUD1 ENST00000439977 6 1 10000000 EXON HERPUD1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON HERPUD1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 HERPUD1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0J4-01 55750 AGK ENST00000355413 2 1 10000000 EXON AGK_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGK_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A7-A0CE-01 55750 AGK ENST00000355413 2 1 10000000 EXON AGK_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGK_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A7-A13E-01 55750 AGK ENST00000355413 2 1 10000000 EXON AGK_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGK_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A7-A0DA-01 55750 AGK ENST00000355413 2 1 10000000 EXON AGK_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGK_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGK_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-D8-A142-01 9715 FAM131B ENST00000409222 3 1 10000000 EXON FAM131B_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON FAM131B_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 FAM131B_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-D8-A143-01 116988 AGAP3 ENST00000397238 10 1 10000000 EXON AGAP3_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGAP3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGAP3_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AQ-A04J-01 116988 AGAP3 ENST00000397238 9 1 10000000 EXON AGAP3_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON AGAP3_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 AGAP3_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0HN-01 8454 CUL1 ENST00000325222 7 1 10000000 EXON CUL1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON CUL1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 CUL1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0T0-01 27044 SND1 ENST00000354725 20 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0YE-01 27044 SND1 ENST00000354725 18 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0YJ-01 27044 SND1 ENST00000354725 15 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0D0-01 27044 SND1 ENST00000354725 15 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04U-01 27044 SND1 ENST00000354725 12 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0J6-01 27044 SND1 ENST00000354725 12 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0YM-01 27044 SND1 ENST00000354725 12 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0D2-01 27044 SND1 ENST00000354725 12 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-BH-A0B3-01 27044 SND1 ENST00000354725 10 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A04Q-01 27044 SND1 ENST00000354725 10 1 10000000 EXON SND1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON SND1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 SND1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-A2-A0SX-01 23608 MKRN1 ENST00000255977 4 1 10000000 EXON MKRN1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON MKRN1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 MKRN1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0JL-01 23608 MKRN1 ENST00000255977 4 1 10000000 EXON MKRN1_BRAF_CUSTOMHYVE_1 673 BRAF ENST00000288602 11 1 10000000 NA EXON MKRN1_BRAF_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 MKRN1_BRAF_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0JL-01 673 BRAF ENST00000288602 6 1 10000000 EXON BRAF_TTN_CUSTOMHYVE_1 7273 TTN ENST00000589042 2 1 111111111 NA EXON BRAF_TTN_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 BRAF_TTN_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0JL-01 673 BRAF ENST00000288602 6 1 10000000 EXON BRAF_NULL_CUSTOMHYVE_1 NA 2 1 111111111 NA EXON BRAF_NULL_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 BRAF_NULL_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC +TCGA-AO-A0JL-01 NA 6 1 10000000 EXON NULL_TTN_CUSTOMHYVE_1 7273 TTN ENST00000589042 2 1 111111111 NA EXON NULL_TTN_CUSTOMHYVE_2 NA GRCh37 no yes -1 1000 -1 900 -1 -1 -1 -1 NULL_TTN_CUSTOMHYVE NA NA Fusion NA -1 Gain-of-Function SOMATIC diff --git a/test/test_data/study_es_0_import_export/meta_structural_variant_sv_structural_variants.txt b/test/test_data/study_es_0_import_export/meta_structural_variant_sv_structural_variants.txt new file mode 100644 index 00000000000..589b07a6c22 --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_structural_variant_sv_structural_variants.txt @@ -0,0 +1,9 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: STRUCTURAL_VARIANT +datatype: SV +stable_id: structural_variants +show_profile_in_analysis_tab: true +profile_name: Targeted Fusion Assay data (Fake data) +profile_description: Targeted Fusion Assay data created by The Hyve +patient_level: false +data_filename: data_structural_variant_sv_structural_variants.txt From 36ab43d22896521b3c7dab9d95d5835726a8a938 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 24 Apr 2025 21:41:34 +0200 Subject: [PATCH 49/69] Support exporting gene panel matrix data --- .../application/file/export/ExportConfig.java | 15 ++++ .../GenePanelMatrixDatatypeExporter.java | 86 +++++++++++++++++++ .../export/mappers/GenePanelMatrixMapper.java | 15 ++++ .../services/GenePanelMatrixService.java | 28 ++++++ .../file/model/GenePanelMatrixItem.java | 40 +++++++++ .../mappers/export/GenePanelMatrixMapper.xml | 37 ++++++++ ...ta_gene_panel_matrix_gene_panel_matrix.txt | 50 +++++++++++ ...ta_gene_panel_matrix_gene_panel_matrix.txt | 4 + 8 files changed, 275 insertions(+) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java create mode 100644 src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java create mode 100644 src/main/java/org/cbioportal/application/file/model/GenePanelMatrixItem.java create mode 100644 src/main/resources/mappers/export/GenePanelMatrixMapper.xml create mode 100644 test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt create mode 100644 test/test_data/study_es_0_import_export/meta_gene_panel_matrix_gene_panel_matrix.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 9aff9d6d39b..4c229096840 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -13,6 +13,7 @@ import org.cbioportal.application.file.export.exporters.CnaLog2ValueDatatypeExporter; import org.cbioportal.application.file.export.exporters.CnaSegDatatypeExporter; import org.cbioportal.application.file.export.exporters.Exporter; +import org.cbioportal.application.file.export.exporters.GenePanelMatrixDatatypeExporter; import org.cbioportal.application.file.export.exporters.GenericAssayBinaryDatatypeExporter; import org.cbioportal.application.file.export.exporters.GenericAssayCategoricalDatatypeExporter; import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; @@ -30,6 +31,7 @@ import org.cbioportal.application.file.export.mappers.CaseListMetadataMapper; import org.cbioportal.application.file.export.mappers.ClinicalAttributeDataMapper; import org.cbioportal.application.file.export.mappers.CnaSegmentMapper; +import org.cbioportal.application.file.export.mappers.GenePanelMatrixMapper; import org.cbioportal.application.file.export.mappers.GeneticProfileDataMapper; import org.cbioportal.application.file.export.mappers.GeneticProfileMapper; import org.cbioportal.application.file.export.mappers.MafRecordMapper; @@ -39,6 +41,7 @@ import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.export.services.CnaSegmentService; import org.cbioportal.application.file.export.services.ExportService; +import org.cbioportal.application.file.export.services.GenePanelMatrixService; import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.export.services.MafRecordService; @@ -100,6 +103,11 @@ public GeneticProfileDataService geneticProfileDataService(GeneticProfileDataMap return new GeneticProfileDataService(geneticProfileDataMapper); } + @Bean + public GenePanelMatrixService genePanelMatrixService(GenePanelMatrixMapper genePanelMatrixMapper) { + return new GenePanelMatrixService(genePanelMatrixMapper); + } + @Bean public CaseListMetadataService caseListMetadataService(CaseListMetadataMapper caseListMetadataMapper) { return new CaseListMetadataService(caseListMetadataMapper); @@ -175,6 +183,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE GenericAssayCategoricalDatatypeExporter genericAssayCategoricalDatatypeExporter, GenericAssayBinaryDatatypeExporter genericAssayBinaryDatatypeExporter, MethylationContinuousDatatypeExporter methylationContinuousDatatypeExporter, + GenePanelMatrixDatatypeExporter genePanelMatrixDatatypeExporter, CaseListsExporter caseListsExporter) { return List.of( cancerStudyMetadataExporter, @@ -199,6 +208,7 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE genericAssayCategoricalDatatypeExporter, genericAssayBinaryDatatypeExporter, methylationContinuousDatatypeExporter, + genePanelMatrixDatatypeExporter, caseListsExporter ); } @@ -313,6 +323,11 @@ public MethylationContinuousDatatypeExporter methylationContinuousDatatypeExport return new MethylationContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); } + @Bean + public GenePanelMatrixDatatypeExporter genePanelMatrixDatatypeExporter(GenePanelMatrixService genePanelMatrixService) { + return new GenePanelMatrixDatatypeExporter(genePanelMatrixService); + } + @Bean public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetadataService) { return new CaseListsExporter(caseListMetadataService); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java new file mode 100644 index 00000000000..7530a9a064c --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java @@ -0,0 +1,86 @@ +package org.cbioportal.application.file.export.exporters; + +import com.google.common.collect.Iterators; +import org.cbioportal.application.file.export.services.GenePanelMatrixService; +import org.cbioportal.application.file.model.GenePanelMatrixItem; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Optional; + +public class GenePanelMatrixDatatypeExporter extends DataTypeExporter { + + private final GenePanelMatrixService genePanelMatrixService; + + public GenePanelMatrixDatatypeExporter(GenePanelMatrixService genePanelMatrixService) { + this.genePanelMatrixService = genePanelMatrixService; + } + + @Override + protected Optional getMetadata(String studyId) { + if (!genePanelMatrixService.hasGenePanelMatrix(studyId)) { + return Optional.empty(); + } + GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); + metadata.setCancerStudyIdentifier(studyId); + metadata.setGeneticAlterationType("GENE_PANEL_MATRIX"); + metadata.setDatatype("GENE_PANEL_MATRIX"); + return Optional.of(metadata); + } + + @Override + protected Table getData(String studyId) { + CloseableIterator genePanelMatrixItems = genePanelMatrixService.getGenePanelMatrix(studyId); + var rowIterator = Iterators.peekingIterator(genePanelMatrixItems); + List geneProfileIds = genePanelMatrixService.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId); + var header = new LinkedHashSet(); + header.add("SAMPLE_ID"); + List genePlatforms = geneProfileIds.stream().map(stableId -> withoutStudySuffix(studyId, stableId)).toList(); + header.addAll(genePlatforms); + return new Table(new CloseableIterator<>() { + @Override + public void close() throws IOException { + genePanelMatrixItems.close(); + } + + @Override + public boolean hasNext() { + return genePanelMatrixItems.hasNext(); + } + + @Override + public TableRow next() { + GenePanelMatrixItem genePanelMatrixItem = rowIterator.next(); + if (rowIterator.hasNext() && genePanelMatrixItem.getRowKey().compareTo(rowIterator.peek().getRowKey()) > 0) { + throw new IllegalStateException("The keys are not in ascending order:" + genePanelMatrixItem.getRowKey() + " and " + rowIterator.peek().getRowKey()); + } + var row = new HashMap(); + row.put("SAMPLE_ID", genePanelMatrixItem.getSampleStableId()); + row.put(withoutStudySuffix(studyId, genePanelMatrixItem.getGeneticProfileStableId()), genePanelMatrixItem.getGenePanelStableId()); + while (rowIterator.hasNext() + && rowIterator.peek().getRowKey().equals(genePanelMatrixItem.getRowKey())) { + genePanelMatrixItem = rowIterator.next(); + row.put(withoutStudySuffix(studyId, genePanelMatrixItem.getGeneticProfileStableId()), genePanelMatrixItem.getGenePanelStableId()); + } + var result = new LinkedHashMap(); + header.forEach(h -> result.put(h, row.remove(h))); + if (!row.isEmpty()) { + throw new IllegalStateException("The following sample profile has not been included in the row: " + row.keySet()); + } + return () -> result; + } + }, header); + } + + private static String withoutStudySuffix(String studyId, String stableId) { + var removePrefix = studyId + "_"; + return stableId.replace(removePrefix, ""); + } +} diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java new file mode 100644 index 00000000000..75c15228d9b --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java @@ -0,0 +1,15 @@ +package org.cbioportal.application.file.export.mappers; + +import org.apache.ibatis.cursor.Cursor; +import org.cbioportal.application.file.model.GenePanelMatrixItem; + +import java.util.List; + +public interface GenePanelMatrixMapper { + + boolean hasGenePanelMatrix(String studyId); + + Cursor getGenePanelMatrix(String studyId); + + List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId); +} diff --git a/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java b/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java new file mode 100644 index 00000000000..65867b6e7e5 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java @@ -0,0 +1,28 @@ +package org.cbioportal.application.file.export.services; + +import org.cbioportal.application.file.export.mappers.GenePanelMatrixMapper; +import org.cbioportal.application.file.model.GenePanelMatrixItem; +import org.cbioportal.application.file.utils.CloseableIterator; +import org.cbioportal.application.file.utils.CursorAdapter; + +import java.util.List; + +public class GenePanelMatrixService { + private final GenePanelMatrixMapper genePanelMatrixMapper; + + public GenePanelMatrixService(GenePanelMatrixMapper genePanelMatrixMapper) { + this.genePanelMatrixMapper = genePanelMatrixMapper; + } + + public boolean hasGenePanelMatrix(String studyId) { + return genePanelMatrixMapper.hasGenePanelMatrix(studyId); + } + + public CloseableIterator getGenePanelMatrix(String studyId) { + return new CursorAdapter<>(genePanelMatrixMapper.getGenePanelMatrix(studyId)); + } + + public List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId) { + return genePanelMatrixMapper.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId); + } +} diff --git a/src/main/java/org/cbioportal/application/file/model/GenePanelMatrixItem.java b/src/main/java/org/cbioportal/application/file/model/GenePanelMatrixItem.java new file mode 100644 index 00000000000..330504f4ce2 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/model/GenePanelMatrixItem.java @@ -0,0 +1,40 @@ +package org.cbioportal.application.file.model; + +public class GenePanelMatrixItem { + private Integer rowKey; + private String sampleStableId; + private String geneticProfileStableId; + private String genePanelStableId; + + public Integer getRowKey() { + return rowKey; + } + + public void setRowKey(Integer rowKey) { + this.rowKey = rowKey; + } + + public String getSampleStableId() { + return sampleStableId; + } + + public void setSampleStableId(String sampleStableId) { + this.sampleStableId = sampleStableId; + } + + public String getGeneticProfileStableId() { + return geneticProfileStableId; + } + + public void setGeneticProfileStableId(String geneticProfileStableId) { + this.geneticProfileStableId = geneticProfileStableId; + } + + public String getGenePanelStableId() { + return genePanelStableId; + } + + public void setGenePanelStableId(String genePanelStableId) { + this.genePanelStableId = genePanelStableId; + } +} diff --git a/src/main/resources/mappers/export/GenePanelMatrixMapper.xml b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml new file mode 100644 index 00000000000..6bd9b670092 --- /dev/null +++ b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml @@ -0,0 +1,37 @@ + + + + + + + + \ No newline at end of file diff --git a/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt b/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt new file mode 100644 index 00000000000..edeaade559c --- /dev/null +++ b/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt @@ -0,0 +1,50 @@ +SAMPLE_ID gistic mutations structural_variants +TCGA-A2-A04P-01 TESTPANEL1 +TCGA-A1-A0SK-01 TESTPANEL1 +TCGA-A2-A0CM-01 TESTPANEL1 +TCGA-AR-A1AR-01 TESTPANEL1 +TCGA-B6-A0WX-01 TESTPANEL1 +TCGA-BH-A1F0-01 TESTPANEL1 +TCGA-B6-A0I6-01 TESTPANEL1 +TCGA-BH-A18V-01 TESTPANEL1 +TCGA-BH-A18Q-01 TESTPANEL1 +TCGA-BH-A18K-01 TESTPANEL1 +TCGA-BH-A0HL-01 TESTPANEL1 +TCGA-BH-A0E0-01 TESTPANEL1 +TCGA-BH-A0RX-01 TESTPANEL1 +TCGA-A7-A13D-01 TESTPANEL1 +TCGA-BH-A0E6-01 TESTPANEL1 +TCGA-AO-A0J4-01 TESTPANEL1 +TCGA-A7-A0CE-01 TESTPANEL1 +TCGA-A7-A13E-01 TESTPANEL1 +TCGA-A7-A0DA-01 TESTPANEL1 +TCGA-D8-A142-01 TESTPANEL1 +TCGA-D8-A143-01 TESTPANEL1 +TCGA-AQ-A04J-01 TESTPANEL1 +TCGA-BH-A0HN-01 TESTPANEL1 +TCGA-A2-A0T0-01 TESTPANEL1 +TCGA-A2-A0YE-01 TESTPANEL1 +TCGA-A2-A0YJ-01 TESTPANEL1 +TCGA-A2-A0D0-01 TESTPANEL1 +TCGA-A2-A04U-01 TESTPANEL1 +TCGA-AO-A0J6-01 TESTPANEL1 +TCGA-A2-A0YM-01 TESTPANEL1 +TCGA-A2-A0D2-01 TESTPANEL1 +TCGA-BH-A0B3-01 TESTPANEL1 +TCGA-A2-A04Q-01 TESTPANEL1 +TCGA-A2-A0SX-01 TESTPANEL1 +TCGA-AO-A0JL-01 TESTPANEL1 +TCGA-A1-A0SB-01 TESTPANEL1 TESTPANEL1 TESTPANEL1 +TCGA-A1-A0SB-02 TESTPANEL2 +TEST-A2B8-01 TESTPANEL1 TESTPANEL1 +TEST-A2FF-01 TESTPANEL1 TESTPANEL1 +TCGA-GI-A2C8-01 TESTPANEL1 TESTPANEL1 +TEST_SAMPLE_2 TESTPANEL1 +TEST_SAMPLE_3 TESTPANEL1 +TEST_SAMPLE_4 TESTPANEL1 TESTPANEL1 +TEST_SAMPLE_6 TESTPANEL1 +TEST_SAMPLE_8 TESTPANEL1 +TEST_SAMPLE_11 TESTPANEL1 +TEST_SAMPLE_13 TESTPANEL1 TESTPANEL1 +TEST_SAMPLE_14 TESTPANEL1 TESTPANEL2 +TEST_SAMPLE_15 TESTPANEL1 TESTPANEL2 diff --git a/test/test_data/study_es_0_import_export/meta_gene_panel_matrix_gene_panel_matrix.txt b/test/test_data/study_es_0_import_export/meta_gene_panel_matrix_gene_panel_matrix.txt new file mode 100644 index 00000000000..4899f62d94e --- /dev/null +++ b/test/test_data/study_es_0_import_export/meta_gene_panel_matrix_gene_panel_matrix.txt @@ -0,0 +1,4 @@ +cancer_study_identifier: study_es_0_import_export +genetic_alteration_type: GENE_PANEL_MATRIX +datatype: GENE_PANEL_MATRIX +data_filename: data_gene_panel_matrix_gene_panel_matrix.txt From 00634db18df70d60f79d137be851d10ee574c26b Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 24 Apr 2025 21:54:14 +0200 Subject: [PATCH 50/69] Remove pipe output as not reliable --- .../application/file/export/ExportConfig.java | 35 ------------------- .../file/export/ExportController.java | 33 ++--------------- 2 files changed, 3 insertions(+), 65 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 4c229096840..7542f9a3f49 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -54,14 +54,11 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; import javax.sql.DataSource; import java.io.IOException; import java.util.List; import java.util.Properties; -import java.util.concurrent.Executor; -import java.util.concurrent.ThreadFactory; @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @@ -147,19 +144,6 @@ public DataSource exportDataSource(DataSourceProperties mysqlDataSourcePropertie return new HikariDataSource(hikariConfig); } - @Bean(name = "exportThreadPool") - public Executor exportThreadPool() { - ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); - executor.setCorePoolSize(5); // minimum number of threads - executor.setMaxPoolSize(10); // maximum number of threads - executor.setQueueCapacity(100); // queue size before rejecting new tasks - executor.setThreadNamePrefix("ExportExecutor-"); - //make low priority threads. So OS can schedule other tasks first - executor.setThreadFactory(new ExportThreadFactory("ExportPool-", Thread.MIN_PRIORITY)); - executor.initialize(); - return executor; - } - @Bean public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, CancerTypeDataTypeExporter cancerTypeDataTypeExporter, @@ -333,23 +317,4 @@ public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetad return new CaseListsExporter(caseListMetadataService); } - public static class ExportThreadFactory implements ThreadFactory { - private final String namePrefix; - private final int priority; - private int count = 0; - - public ExportThreadFactory(String namePrefix, int priority) { - this.namePrefix = namePrefix; - this.priority = priority; - } - - @Override - public Thread newThread(Runnable r) { - Thread thread = new Thread(r, namePrefix + count++); - thread.setDaemon(true); - thread.setPriority(priority); - return thread; - } - } - } diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 7adfb71d211..effda6b0c9e 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -6,7 +6,6 @@ import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -16,10 +15,6 @@ import org.springframework.web.servlet.mvc.method.annotation.StreamingResponseBody; import java.io.BufferedOutputStream; -import java.io.IOException; -import java.io.PipedInputStream; -import java.io.PipedOutputStream; -import java.util.concurrent.Executor; @RestController //How to have only one conditional on property in the config only @@ -30,10 +25,8 @@ public class ExportController { private static final Logger LOG = LoggerFactory.getLogger(ExportController.class); private final ExportService exportService; private final CancerStudyMetadataService cancerStudyMetadataService; - private final Executor exportThreadPool; - public ExportController(@Qualifier("exportThreadPool") Executor exportThreadPool, CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { - this.exportThreadPool = exportThreadPool; + public ExportController(CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { this.exportService = exportService; this.cancerStudyMetadataService = cancerStudyMetadataService; } @@ -45,30 +38,10 @@ public ResponseEntity downloadStudyData(@PathVariable Str return ResponseEntity.notFound().build(); } - PipedOutputStream pipedOut = new PipedOutputStream(); - - exportThreadPool.execute(() -> { - try (BufferedOutputStream bos = new BufferedOutputStream(pipedOut); + StreamingResponseBody stream = outputStream -> { + try (BufferedOutputStream bos = new BufferedOutputStream(outputStream); ZipOutputStreamWriterFactory zipFactory = new ZipOutputStreamWriterFactory(bos)) { exportService.exportData(zipFactory, studyId); - } catch (Exception e) { - LOG.error("Export failed", e); - try { - pipedOut.close(); - } catch (IOException ex) { - LOG.warn("Failed to close piped output", ex); - } - } - }); - - StreamingResponseBody stream = outputStream -> { - try (PipedInputStream in = new PipedInputStream(pipedOut, 64 * 1024)) { - byte[] buffer = new byte[8192]; - int bytesRead; - while ((bytesRead = in.read(buffer)) != -1) { - outputStream.write(buffer, 0, bytesRead); - outputStream.flush(); - } } }; From ce3e352b0750c0eb3aa16794acaf8de23e8a0893 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 24 Apr 2025 22:00:45 +0200 Subject: [PATCH 51/69] Use forward only cursors where possible for memory optimisation --- .../mappers/export/ClinicalAttributeDataMapper.xml | 6 ++++-- src/main/resources/mappers/export/CnaSegmentMapper.xml | 3 ++- src/main/resources/mappers/export/GenePanelMatrixMapper.xml | 3 ++- .../resources/mappers/export/GeneticProfileDataMapper.xml | 6 ++++-- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index bbd1ceeb727..63352fa8013 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -142,7 +142,8 @@ JOIN cancer_study cs ON cs.CANCER_STUDY_ID = p.CANCER_STUDY_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} - SELECT ced.CLINICAL_EVENT_ID as clinicalEventId, ced.`KEY` as `key`, @@ -154,7 +155,8 @@ WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} ORDER BY ced.CLINICAL_EVENT_ID - SELECT ce.CLINICAL_EVENT_ID as clinicalEventId, p.STABLE_ID AS patientId, diff --git a/src/main/resources/mappers/export/CnaSegmentMapper.xml b/src/main/resources/mappers/export/CnaSegmentMapper.xml index ce830fb4ca3..9c0c4c7d8a3 100644 --- a/src/main/resources/mappers/export/CnaSegmentMapper.xml +++ b/src/main/resources/mappers/export/CnaSegmentMapper.xml @@ -2,7 +2,8 @@ - SELECT cns.SEG_ID, s.STABLE_ID AS sampleId, diff --git a/src/main/resources/mappers/export/GenePanelMatrixMapper.xml b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml index 6bd9b670092..5728d9d0d78 100644 --- a/src/main/resources/mappers/export/GenePanelMatrixMapper.xml +++ b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml @@ -11,7 +11,8 @@ WHERE cs.cancer_study_identifier = #{studyId} AND sp.panel_id IS NOT NULL ) - SELECT sp.sample_id as rowKey, s.stable_id as sampleStableId, diff --git a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml index 429322a4223..3332fa1e847 100644 --- a/src/main/resources/mappers/export/GeneticProfileDataMapper.xml +++ b/src/main/resources/mappers/export/GeneticProfileDataMapper.xml @@ -32,7 +32,8 @@ - SELECT ga.VALUES, ga.GENETIC_ENTITY_ID, @@ -54,7 +55,8 @@ - SELECT gep.GENETIC_ENTITY_ID, gep.NAME, From 362e7e616cbbb402e12ee03042bda2cafde1b946 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 24 Apr 2025 22:35:18 +0200 Subject: [PATCH 52/69] Corrupt zip file intentionally in case of exception We don't want to do partial export in case of exception --- .../application/file/export/ExportController.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index effda6b0c9e..cdf0a6ae36f 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -41,7 +41,14 @@ public ResponseEntity downloadStudyData(@PathVariable Str StreamingResponseBody stream = outputStream -> { try (BufferedOutputStream bos = new BufferedOutputStream(outputStream); ZipOutputStreamWriterFactory zipFactory = new ZipOutputStreamWriterFactory(bos)) { - exportService.exportData(zipFactory, studyId); + try { + exportService.exportData(zipFactory, studyId); + } catch (Exception e) { + LOG.error("Error exporting data for study {}: {}. The file will be intentionally corrupted.", studyId, e.getMessage(), e); + // corrupt the zip file intentionally + outputStream.write(("ERROR: " + e.getMessage()).getBytes()); + outputStream.flush(); + } } }; From a4bb008cb5cd53fe9e09e15895ea642d4f015fa1 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 25 Apr 2025 16:56:20 +0200 Subject: [PATCH 53/69] Warn about incorrect format for phosphoprotein, not crash --- .../cbioportal/application/file/export/ExportConfig.java | 1 - .../export/exporters/ProteinLevelDatatypeExporter.java | 7 ++++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 7542f9a3f49..f8e92cfac41 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -316,5 +316,4 @@ public GenePanelMatrixDatatypeExporter genePanelMatrixDatatypeExporter(GenePanel public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetadataService) { return new CaseListsExporter(caseListMetadataService); } - } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java index 2dc38df073a..3adcd5b0f55 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java @@ -7,6 +7,8 @@ import org.cbioportal.application.file.model.Table; import org.cbioportal.application.file.model.TableRow; import org.cbioportal.application.file.utils.CloseableIterator; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.io.IOException; import java.util.LinkedHashMap; @@ -18,6 +20,8 @@ public abstract class ProteinLevelDatatypeExporter extends GeneticProfileDatatypeExporter { + private static final Logger LOG = LoggerFactory.getLogger(ProteinLevelDatatypeExporter.class); + private final GeneticProfileDataService geneticProfileDataService; public ProteinLevelDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { @@ -52,7 +56,8 @@ protected String getGeneticAlterationType() { String hgs = parts[0]; String phosphosite = parts[1]; if (phosphosite.charAt(0) != 'p' && phosphosite.charAt(0) != 'P') { - throw new IllegalStateException("Unexpected format for phosphosite: " + phosphosite); + LOG.warn("Unexpected format for phosphosite: {}", phosphosite); + return hugoGeneSymbol + "|" + hugoGeneSymbol; } return hgs + "|" + hgs + "_p" + phosphosite.substring(1); } else { From 6a4c4d6bb0ab1ac6c83d00f5f08cf2d0deaea353 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 25 Apr 2025 17:18:44 +0200 Subject: [PATCH 54/69] Provide a way to increase timeout for async requests Increase it to 10 minutes by default. --- .../application/file/export/ExportConfig.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index f8e92cfac41..878448da3ad 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -50,10 +50,13 @@ import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.AsyncSupportConfigurer; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; import javax.sql.DataSource; import java.io.IOException; @@ -63,7 +66,7 @@ @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") -public class ExportConfig { +public class ExportConfig implements WebMvcConfigurer { @Bean public CancerStudyMetadataService cancerStudyMetadataService(CancerStudyMetadataMapper cancerStudyMetadataMapper) { @@ -144,6 +147,14 @@ public DataSource exportDataSource(DataSourceProperties mysqlDataSourcePropertie return new HikariDataSource(hikariConfig); } + @Value("${dynamic_study_export_mode.timeout_ms:600000}") //10 minutes timeout by default + private long timeoutMs; + + @Override + public void configureAsyncSupport(AsyncSupportConfigurer configurer) { + configurer.setDefaultTimeout(timeoutMs); + } + @Bean public List exporters(CancerStudyMetadataExporter cancerStudyMetadataExporter, CancerTypeDataTypeExporter cancerTypeDataTypeExporter, From 219a228148806726743440ea643307a4498799b8 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 25 Apr 2025 17:20:19 +0200 Subject: [PATCH 55/69] Fix sonar cube reported issues --- .../application/file/model/CancerType.java | 14 ++++++-------- .../application/file/utils/CloseableIterator.java | 3 ++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/model/CancerType.java b/src/main/java/org/cbioportal/application/file/model/CancerType.java index ea7a873020c..37ba18e30db 100644 --- a/src/main/java/org/cbioportal/application/file/model/CancerType.java +++ b/src/main/java/org/cbioportal/application/file/model/CancerType.java @@ -52,13 +52,11 @@ public void setTypeOfCancerId(String typeOfCancerId) { @Override public SequencedMap toRow() { - return new LinkedHashMap<>() { - { - put("TYPE_OF_CANCER_ID", typeOfCancerId); - put("NAME", name); - put("DEDICATED_COLOR", dedicatedColor); - put("PARENT", parent); - } - }; + var row = new LinkedHashMap(); + row.put("TYPE_OF_CANCER_ID", typeOfCancerId); + row.put("NAME", name); + row.put("DEDICATED_COLOR", dedicatedColor); + row.put("PARENT", parent); + return row; } } diff --git a/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java index c3c975de906..7e6d4ba2f34 100644 --- a/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java +++ b/src/main/java/org/cbioportal/application/file/utils/CloseableIterator.java @@ -2,6 +2,7 @@ import java.io.Closeable; import java.util.Iterator; +import java.util.NoSuchElementException; public interface CloseableIterator extends Closeable, Iterator { static CloseableIterator empty() { @@ -17,7 +18,7 @@ public boolean hasNext() { @Override public T next() { - throw new UnsupportedOperationException("No elements in iterator"); + throw new NoSuchElementException("No elements in iterator"); } }; } From 1f3e3b4e2409ab415e356ea1189a41f1827b14ea Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 25 Apr 2025 17:34:22 +0200 Subject: [PATCH 56/69] Add README.txt file to the exported study data warn that there might be not all data types exported --- .../application/file/export/ExportConfig.java | 23 +++++++++++++++++-- .../study_es_0_import_export/README.txt | 3 +++ 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 test/test_data/study_es_0_import_export/README.txt diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 878448da3ad..bdb0800460e 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -60,6 +60,7 @@ import javax.sql.DataSource; import java.io.IOException; +import java.io.Writer; import java.util.List; import java.util.Properties; @@ -179,7 +180,8 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE GenericAssayBinaryDatatypeExporter genericAssayBinaryDatatypeExporter, MethylationContinuousDatatypeExporter methylationContinuousDatatypeExporter, GenePanelMatrixDatatypeExporter genePanelMatrixDatatypeExporter, - CaseListsExporter caseListsExporter) { + CaseListsExporter caseListsExporter, + Exporter readmeExporter) { return List.of( cancerStudyMetadataExporter, cancerTypeDataTypeExporter, @@ -204,7 +206,8 @@ public List exporters(CancerStudyMetadataExporter cancerStudyMetadataE genericAssayBinaryDatatypeExporter, methylationContinuousDatatypeExporter, genePanelMatrixDatatypeExporter, - caseListsExporter + caseListsExporter, + readmeExporter ); } @@ -327,4 +330,20 @@ public GenePanelMatrixDatatypeExporter genePanelMatrixDatatypeExporter(GenePanel public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetadataService) { return new CaseListsExporter(caseListMetadataService); } + + @Bean + public Exporter readmeExporter() { + return (fileWriterFactory, studyId) -> { + try (Writer readmeWriter = fileWriterFactory.newWriter("README.txt")) { + readmeWriter.write("This is a README file for the study " + studyId + ".\n"); + readmeWriter.write(""" + This study export may not include all data types available in the study, as export is implemented only for certain data types. + Refer to the documentation for details on the data files included in this export. + """); + } catch (IOException e) { + throw new RuntimeException(e); + } + return true; + }; + } } diff --git a/test/test_data/study_es_0_import_export/README.txt b/test/test_data/study_es_0_import_export/README.txt new file mode 100644 index 00000000000..c855889d038 --- /dev/null +++ b/test/test_data/study_es_0_import_export/README.txt @@ -0,0 +1,3 @@ +This is a README file for the study study_es_0_import_export. +This study export may not include all data types available in the study, as export is implemented only for certain data types. +Refer to the documentation for details on the data files included in this export. From c20cfdfc39b84ea013d45c15f349ade68a4a5af7 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 25 Apr 2025 17:52:10 +0200 Subject: [PATCH 57/69] Write NA instad of blank string for absent gene panel Validator complains about blank strings --- .../GenePanelMatrixDatatypeExporter.java | 8 +- ...ta_gene_panel_matrix_gene_panel_matrix.txt | 96 +++++++++---------- 2 files changed, 55 insertions(+), 49 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java index 7530a9a064c..a3916b105b6 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java @@ -70,7 +70,13 @@ public TableRow next() { row.put(withoutStudySuffix(studyId, genePanelMatrixItem.getGeneticProfileStableId()), genePanelMatrixItem.getGenePanelStableId()); } var result = new LinkedHashMap(); - header.forEach(h -> result.put(h, row.remove(h))); + header.forEach(h -> { + if (row.containsKey(h)) { + result.put(h, row.remove(h)); + } else { + result.put(h, "NA"); + } + }); if (!row.isEmpty()) { throw new IllegalStateException("The following sample profile has not been included in the row: " + row.keySet()); } diff --git a/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt b/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt index edeaade559c..a04374ee4bc 100644 --- a/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt +++ b/test/test_data/study_es_0_import_export/data_gene_panel_matrix_gene_panel_matrix.txt @@ -1,50 +1,50 @@ SAMPLE_ID gistic mutations structural_variants -TCGA-A2-A04P-01 TESTPANEL1 -TCGA-A1-A0SK-01 TESTPANEL1 -TCGA-A2-A0CM-01 TESTPANEL1 -TCGA-AR-A1AR-01 TESTPANEL1 -TCGA-B6-A0WX-01 TESTPANEL1 -TCGA-BH-A1F0-01 TESTPANEL1 -TCGA-B6-A0I6-01 TESTPANEL1 -TCGA-BH-A18V-01 TESTPANEL1 -TCGA-BH-A18Q-01 TESTPANEL1 -TCGA-BH-A18K-01 TESTPANEL1 -TCGA-BH-A0HL-01 TESTPANEL1 -TCGA-BH-A0E0-01 TESTPANEL1 -TCGA-BH-A0RX-01 TESTPANEL1 -TCGA-A7-A13D-01 TESTPANEL1 -TCGA-BH-A0E6-01 TESTPANEL1 -TCGA-AO-A0J4-01 TESTPANEL1 -TCGA-A7-A0CE-01 TESTPANEL1 -TCGA-A7-A13E-01 TESTPANEL1 -TCGA-A7-A0DA-01 TESTPANEL1 -TCGA-D8-A142-01 TESTPANEL1 -TCGA-D8-A143-01 TESTPANEL1 -TCGA-AQ-A04J-01 TESTPANEL1 -TCGA-BH-A0HN-01 TESTPANEL1 -TCGA-A2-A0T0-01 TESTPANEL1 -TCGA-A2-A0YE-01 TESTPANEL1 -TCGA-A2-A0YJ-01 TESTPANEL1 -TCGA-A2-A0D0-01 TESTPANEL1 -TCGA-A2-A04U-01 TESTPANEL1 -TCGA-AO-A0J6-01 TESTPANEL1 -TCGA-A2-A0YM-01 TESTPANEL1 -TCGA-A2-A0D2-01 TESTPANEL1 -TCGA-BH-A0B3-01 TESTPANEL1 -TCGA-A2-A04Q-01 TESTPANEL1 -TCGA-A2-A0SX-01 TESTPANEL1 -TCGA-AO-A0JL-01 TESTPANEL1 +TCGA-A2-A04P-01 NA NA TESTPANEL1 +TCGA-A1-A0SK-01 NA NA TESTPANEL1 +TCGA-A2-A0CM-01 NA NA TESTPANEL1 +TCGA-AR-A1AR-01 NA NA TESTPANEL1 +TCGA-B6-A0WX-01 NA NA TESTPANEL1 +TCGA-BH-A1F0-01 NA NA TESTPANEL1 +TCGA-B6-A0I6-01 NA NA TESTPANEL1 +TCGA-BH-A18V-01 NA NA TESTPANEL1 +TCGA-BH-A18Q-01 NA NA TESTPANEL1 +TCGA-BH-A18K-01 NA NA TESTPANEL1 +TCGA-BH-A0HL-01 NA NA TESTPANEL1 +TCGA-BH-A0E0-01 NA NA TESTPANEL1 +TCGA-BH-A0RX-01 NA NA TESTPANEL1 +TCGA-A7-A13D-01 NA NA TESTPANEL1 +TCGA-BH-A0E6-01 NA NA TESTPANEL1 +TCGA-AO-A0J4-01 NA NA TESTPANEL1 +TCGA-A7-A0CE-01 NA NA TESTPANEL1 +TCGA-A7-A13E-01 NA NA TESTPANEL1 +TCGA-A7-A0DA-01 NA NA TESTPANEL1 +TCGA-D8-A142-01 NA NA TESTPANEL1 +TCGA-D8-A143-01 NA NA TESTPANEL1 +TCGA-AQ-A04J-01 NA NA TESTPANEL1 +TCGA-BH-A0HN-01 NA NA TESTPANEL1 +TCGA-A2-A0T0-01 NA NA TESTPANEL1 +TCGA-A2-A0YE-01 NA NA TESTPANEL1 +TCGA-A2-A0YJ-01 NA NA TESTPANEL1 +TCGA-A2-A0D0-01 NA NA TESTPANEL1 +TCGA-A2-A04U-01 NA NA TESTPANEL1 +TCGA-AO-A0J6-01 NA NA TESTPANEL1 +TCGA-A2-A0YM-01 NA NA TESTPANEL1 +TCGA-A2-A0D2-01 NA NA TESTPANEL1 +TCGA-BH-A0B3-01 NA NA TESTPANEL1 +TCGA-A2-A04Q-01 NA NA TESTPANEL1 +TCGA-A2-A0SX-01 NA NA TESTPANEL1 +TCGA-AO-A0JL-01 NA NA TESTPANEL1 TCGA-A1-A0SB-01 TESTPANEL1 TESTPANEL1 TESTPANEL1 -TCGA-A1-A0SB-02 TESTPANEL2 -TEST-A2B8-01 TESTPANEL1 TESTPANEL1 -TEST-A2FF-01 TESTPANEL1 TESTPANEL1 -TCGA-GI-A2C8-01 TESTPANEL1 TESTPANEL1 -TEST_SAMPLE_2 TESTPANEL1 -TEST_SAMPLE_3 TESTPANEL1 -TEST_SAMPLE_4 TESTPANEL1 TESTPANEL1 -TEST_SAMPLE_6 TESTPANEL1 -TEST_SAMPLE_8 TESTPANEL1 -TEST_SAMPLE_11 TESTPANEL1 -TEST_SAMPLE_13 TESTPANEL1 TESTPANEL1 -TEST_SAMPLE_14 TESTPANEL1 TESTPANEL2 -TEST_SAMPLE_15 TESTPANEL1 TESTPANEL2 +TCGA-A1-A0SB-02 NA TESTPANEL2 NA +TEST-A2B8-01 TESTPANEL1 TESTPANEL1 NA +TEST-A2FF-01 TESTPANEL1 TESTPANEL1 NA +TCGA-GI-A2C8-01 TESTPANEL1 TESTPANEL1 NA +TEST_SAMPLE_2 NA TESTPANEL1 NA +TEST_SAMPLE_3 TESTPANEL1 NA NA +TEST_SAMPLE_4 TESTPANEL1 TESTPANEL1 NA +TEST_SAMPLE_6 NA TESTPANEL1 NA +TEST_SAMPLE_8 TESTPANEL1 NA NA +TEST_SAMPLE_11 NA TESTPANEL1 NA +TEST_SAMPLE_13 TESTPANEL1 TESTPANEL1 NA +TEST_SAMPLE_14 TESTPANEL1 TESTPANEL2 NA +TEST_SAMPLE_15 TESTPANEL1 TESTPANEL2 NA From dbd19f012e3ae9c3537c5210ce2128079003760c Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 29 Apr 2025 14:53:27 +0200 Subject: [PATCH 58/69] Move code to fail zip streaming to the factory --- .../file/export/ExportController.java | 12 +---------- .../file/export/services/ExportService.java | 20 ++++++++++--------- .../file/utils/FileWriterFactory.java | 2 ++ .../utils/ZipOutputStreamWriterFactory.java | 16 +++++++++++++++ .../export/InMemoryFileWriterFactory.java | 6 +++++- 5 files changed, 35 insertions(+), 21 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index cdf0a6ae36f..4c131234b3a 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -4,8 +4,6 @@ import org.cbioportal.application.file.export.services.ExportService; import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -22,7 +20,6 @@ @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") public class ExportController { - private static final Logger LOG = LoggerFactory.getLogger(ExportController.class); private final ExportService exportService; private final CancerStudyMetadataService cancerStudyMetadataService; @@ -41,14 +38,7 @@ public ResponseEntity downloadStudyData(@PathVariable Str StreamingResponseBody stream = outputStream -> { try (BufferedOutputStream bos = new BufferedOutputStream(outputStream); ZipOutputStreamWriterFactory zipFactory = new ZipOutputStreamWriterFactory(bos)) { - try { - exportService.exportData(zipFactory, studyId); - } catch (Exception e) { - LOG.error("Error exporting data for study {}: {}. The file will be intentionally corrupted.", studyId, e.getMessage(), e); - // corrupt the zip file intentionally - outputStream.write(("ERROR: " + e.getMessage()).getBytes()); - outputStream.flush(); - } + exportService.exportData(zipFactory, studyId); } }; diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index 78eec4ff8ce..f7e3029997f 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -25,15 +25,17 @@ public ExportService( public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { boolean atLeastOneDataFileExportedSuccesfully = false; for (Exporter exporter : exporters) { - boolean exportedDataType = exporter.exportData(fileWriterFactory, studyId); - LOG.debug("{} data for studyId: {} using exporter: {}", - exportedDataType ? "Exported" : "No data exported", - studyId, - exporter.getClass().getSimpleName()); - atLeastOneDataFileExportedSuccesfully |= exportedDataType; - - //TODO catch exceptions in the exporters and return them as README.ERRORS.txt file so users know that they did not get whole study - //OR corrupt the whole zip file + try { + boolean exportedDataType = exporter.exportData(fileWriterFactory, studyId); + LOG.debug("{} data for studyId: {} using exporter: {}", + exportedDataType ? "Exported" : "No data exported", + studyId, + exporter.getClass().getSimpleName()); + atLeastOneDataFileExportedSuccesfully |= exportedDataType; + } catch (Exception e) { + LOG.error("Error exporting data for study {}: {}. The file will be intentionally corrupted.", studyId, e.getMessage(), e); + fileWriterFactory.fail(e); + } } return atLeastOneDataFileExportedSuccesfully; } diff --git a/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java index d769d425da2..f2ce5c2ec2e 100644 --- a/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java @@ -5,4 +5,6 @@ public interface FileWriterFactory { Writer newWriter(String name) throws IOException; + + void fail(Exception e); } diff --git a/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java index 42ce54489df..a0072a85512 100644 --- a/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java @@ -10,9 +10,11 @@ public class ZipOutputStreamWriterFactory implements FileWriterFactory, Closeable { + private final OutputStream outputStream; private final ZipOutputStream zipOutputStream; public ZipOutputStreamWriterFactory(OutputStream outputStream) { + this.outputStream = outputStream; this.zipOutputStream = new ZipOutputStream(outputStream); } @@ -21,6 +23,20 @@ public Writer newWriter(String name) throws IOException { return new ZipEntryOutputStreamWriter(name, zipOutputStream); } + @Override + public void fail(Exception e) { + // corrupt the whole zip file intentionally + RuntimeException primaryException = new RuntimeException(e); + try { + outputStream.write(("ERROR: " + e.getMessage()).getBytes()); + outputStream.flush(); + } catch (IOException ex) { + primaryException.addSuppressed(ex); + } + // and stop the following writes + throw primaryException; + } + @Override public void close() throws IOException { zipOutputStream.close(); diff --git a/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java index d8c6a9a3288..464e552ac85 100644 --- a/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java +++ b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java @@ -21,7 +21,11 @@ public Writer newWriter(String name) throws IOException { fileContents.put(name, stringWriter); return stringWriter; } - + + @Override + public void fail(Exception e) { + } + public LinkedHashMap getFileContents() { return fileContents; } From 24f81d17cab2c39ae62437c688e972aad9d528a4 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Tue, 29 Apr 2025 17:33:46 +0200 Subject: [PATCH 59/69] Add posibility to export study under alternative study id --- .../application/file/export/ExportConfig.java | 11 ++++- .../file/export/ExportController.java | 3 +- .../export/exporters/CaseListsExporter.java | 16 +++++-- .../export/exporters/DataTypeExporter.java | 22 ++++++---- .../file/export/exporters/ExportDetails.java | 34 +++++++++++++++ .../file/export/exporters/Exporter.java | 4 +- .../GeneticProfileDatatypeExporter.java | 6 +-- .../export/exporters/MetadataExporter.java | 20 ++++++--- .../file/export/services/ExportService.java | 9 ++-- .../CancerStudyMetadataExporterTests.java | 21 +++++++-- .../file/export/CaseListsExporterTests.java | 43 ++++++++++++++++--- ...linicalAttributeDataTypeExporterTests.java | 27 ++++++++++-- ...ClinicalTimelineDataTypeExporterTests.java | 9 ++-- ...cAssayLimitValueDatatypeExporterTests.java | 19 ++++---- .../file/export/MafDataTypeExporterTests.java | 33 ++++++++++++-- .../MrnaExpressionDatatypeExporterTests.java | 11 ++--- 16 files changed, 226 insertions(+), 62 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index bdb0800460e..6107ca3f004 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -62,8 +62,15 @@ import java.io.IOException; import java.io.Writer; import java.util.List; +import java.util.Optional; import java.util.Properties; +//2. Add posibility to specify alternative study id while exporting +//3. Add posiblity to filter out data based on set of sample ids +//1. Add posibility to specify base (study folder) path without disruptiong the current implementation to much +//4. Read definition of Virtual study from the mongodb +//5. Think how to reevaluate the dynamic virtual study +//5. Add explanation if virtual study is exported @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") @@ -333,9 +340,9 @@ public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetad @Bean public Exporter readmeExporter() { - return (fileWriterFactory, studyId) -> { + return (fileWriterFactory, studyDetails) -> { try (Writer readmeWriter = fileWriterFactory.newWriter("README.txt")) { - readmeWriter.write("This is a README file for the study " + studyId + ".\n"); + readmeWriter.write("This is a README file for the study " + Optional.ofNullable(studyDetails.getExportAsStudyId()).orElseGet(studyDetails::getStudyId) + ".\n"); readmeWriter.write(""" This study export may not include all data types available in the study, as export is implemented only for certain data types. Refer to the documentation for details on the data files included in this export. diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 4c131234b3a..c9926fc5bf4 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.export.services.ExportService; import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; @@ -38,7 +39,7 @@ public ResponseEntity downloadStudyData(@PathVariable Str StreamingResponseBody stream = outputStream -> { try (BufferedOutputStream bos = new BufferedOutputStream(outputStream); ZipOutputStreamWriterFactory zipFactory = new ZipOutputStreamWriterFactory(bos)) { - exportService.exportData(zipFactory, studyId); + exportService.exportData(zipFactory, new ExportDetails(studyId)); } }; diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java index bf610bcde93..73302ea1c83 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Optional; +import java.util.SequencedMap; /** * Exports all case lists for a study @@ -19,11 +20,11 @@ public CaseListsExporter(CaseListMetadataService caseListMetadataService) { } @Override - public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { - List caseLists = caseListMetadataService.getCaseListsMetadata(studyId); + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { + List caseLists = caseListMetadataService.getCaseListsMetadata(exportDetails.getStudyId()); boolean exported = false; for (CaseListMetadata metadata : caseLists) { - exported |= new CaseListExporter(metadata).exportData(fileWriterFactory, studyId); + exported |= new CaseListExporter(metadata).exportData(fileWriterFactory, exportDetails); } return exported; } @@ -48,5 +49,14 @@ public String getMetaFilename(CaseListMetadata metadata) { protected Optional getMetadata(String studyId) { return Optional.of(caseListMetadata); } + + + @Override + protected void updateStudyIdInMetadataIfNeeded(ExportDetails exportDetails, SequencedMap metadataSeqMap) { + super.updateStudyIdInMetadataIfNeeded(exportDetails, metadataSeqMap); + if (exportDetails.getExportAsStudyId() != null) { + metadataSeqMap.put("stable_id", exportDetails.getExportAsStudyId() + "_" + caseListMetadata.getCaseListTypeStableId()); + } + } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java index d36f0c2f057..2f7e184ee7f 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java @@ -3,6 +3,7 @@ import org.cbioportal.application.file.export.writers.KeyValueMetadataWriter; import org.cbioportal.application.file.export.writers.TsvDataWriter; import org.cbioportal.application.file.model.GeneticDatatypeMetadata; +import org.cbioportal.application.file.model.StudyRelatedMetadata; import org.cbioportal.application.file.utils.FileWriterFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -24,21 +25,21 @@ public abstract class DataTypeExporter metadataOptional = getMetadata(studyId); + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { + Optional metadataOptional = getMetadata(exportDetails.getStudyId()); if (metadataOptional.isEmpty()) { - LOG.debug("No metadata found for study {} by {} exporter. Skipping export of this datatype.", studyId, getClass().getSimpleName()); + LOG.debug("No metadata found for study {} by {} exporter. Skipping export of this datatype.", exportDetails.getExportAsStudyId(), getClass().getSimpleName()); return false; } M metadata = metadataOptional.get(); - if (!metadata.getCancerStudyIdentifier().equals(studyId)) { - throw new IllegalStateException("Metadata study ID (" + metadata.getGeneticAlterationType() + ") does not match the provided study ID (" + studyId + ")."); + if (!metadata.getCancerStudyIdentifier().equals(exportDetails.getStudyId())) { + throw new IllegalStateException("Metadata study ID (" + metadata.getGeneticAlterationType() + ") does not match the provided study ID (" + exportDetails.getStudyId() + ")."); } String metaFilename = getMetaFilename(metadata); String dataFilename = getDataFilename(metadata); - writeMetadata(fileWriterFactory, metaFilename, metadata, dataFilename); + writeMetadata(fileWriterFactory, metaFilename, metadata, dataFilename, exportDetails); writeData(fileWriterFactory, metadata, dataFilename); - LOG.debug("Data (genetic alteration type: {}, datatype: {}) has been exported for study {} by {} exporter.", metadata.getGeneticAlterationType(), metadata.getDatatype(), studyId, getClass().getSimpleName()); + LOG.debug("Data (genetic alteration type: {}, datatype: {}) has been exported for study {} by {} exporter.", metadata.getGeneticAlterationType(), metadata.getDatatype(), exportDetails.getStudyId(), getClass().getSimpleName()); return true; } @@ -65,11 +66,16 @@ public String getMetaFilename(M metadata) { /** * Write metadata to a file. */ - protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFilename, M metadata, String dataFilename) { + protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFilename, M metadata, String dataFilename, ExportDetails exportDetails) { try (Writer metaFileWriter = fileWriterFactory.newWriter(metaFilename)) { SequencedMap metadataSeqMap = metadata.toMetadataKeyValues(); LOG.debug("Writing metadata (genetic alteration type: {}, datatype: {}) to file: {}", metadata.getGeneticAlterationType(), metadata.getDatatype(), metaFilename); + if (exportDetails.getExportAsStudyId() != null) { + LOG.debug("Exporting {} metadata for study {} as study {}", + this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), exportDetails.getExportAsStudyId()); + metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportAsStudyId).toMetadataKeyValues()); + } metadataSeqMap.put("data_filename", dataFilename); new KeyValueMetadataWriter(metaFileWriter).write(metadataSeqMap); } catch (Exception e) { diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java new file mode 100644 index 00000000000..acabcfb5340 --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java @@ -0,0 +1,34 @@ +package org.cbioportal.application.file.export.exporters; + +import java.util.Optional; + +public class ExportDetails { + /** + * The study id to export + */ + private final String studyId; + /** + * The study id to export as. This is used when exporting data for a study that is not the same as the study id + * e.g. when exporting a Virtual Study + */ + private final String exportAsStudyId; + + public ExportDetails(String studyId) { + this.studyId = studyId; + this.exportAsStudyId = null; + } + + public ExportDetails(String studyId, String exportAsStudyId) { + this.studyId = studyId; + this.exportAsStudyId = exportAsStudyId; + } + + public String getStudyId() { + return studyId; + } + + public String getExportAsStudyId() { + return exportAsStudyId; + } + +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java index 1da6f8ef06f..80119fd6a47 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/Exporter.java @@ -9,8 +9,8 @@ public interface Exporter { /** * @param fileWriterFactory - a factory to create writers - * @param studyId - the study id + * @param exportDetails - details of the export. e.g. study id to export * @return true - if data was exported, false - if no data was exported e.g. no data available for the study */ - boolean exportData(FileWriterFactory fileWriterFactory, String studyId); + boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails); } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index 53612d67044..67b0605fa22 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -22,15 +22,15 @@ public GeneticProfileDatatypeExporter(GeneticProfileService geneticProfileServic } @Override - public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { - List geneticProfiles = geneticProfileService.getGeneticProfiles(studyId, getGeneticAlterationType(), getDatatype()); + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { + List geneticProfiles = geneticProfileService.getGeneticProfiles(exportDetails.getStudyId(), getGeneticAlterationType(), getDatatype()); boolean exported = false; for (GeneticProfileDatatypeMetadata metadata : geneticProfiles) { if (metadata.getPatientLevel() != null && metadata.getPatientLevel()) { LOG.debug("Skipping unsupported patient-level genetic profile: {}", metadata.getStableId()); continue; } - exported |= composeExporterFor(metadata).exportData(fileWriterFactory, studyId); + exported |= composeExporterFor(metadata).exportData(fileWriterFactory, exportDetails); } return exported; } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java index 5ae43169967..e05743e1c05 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java @@ -18,31 +18,41 @@ public abstract class MetadataExporter implement private static final Logger LOG = org.slf4j.LoggerFactory.getLogger(MetadataExporter.class); - public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { - Optional metadata = getMetadata(studyId); + @Override + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { + Optional metadata = getMetadata(exportDetails.getStudyId()); if (metadata.isEmpty()) { - LOG.debug("No {} metadata available for study {}", this.getClass().getSimpleName(), studyId); + LOG.debug("No {} metadata available for study {}", this.getClass().getSimpleName(), exportDetails.getStudyId()); return false; } String metaFilename = getMetaFilename(metadata.get()); - writeMetadata(fileWriterFactory, metaFilename, metadata.get()); + writeMetadata(fileWriterFactory, metaFilename, metadata.get(), exportDetails); return true; } /** * Write the metadata to a file */ - protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFilename, M metadata) { + protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFilename, M metadata, ExportDetails exportDetails) { try (Writer metaFileWriter = fileWriterFactory.newWriter(metaFilename)) { SequencedMap metadataSeqMap = metadata.toMetadataKeyValues(); LOG.debug("Writing {} metadata for {} study to file: {}", this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), metaFilename); + updateStudyIdInMetadataIfNeeded(exportDetails, metadataSeqMap); // update the study ID if needed new KeyValueMetadataWriter(metaFileWriter).write(metadataSeqMap); } catch (Exception e) { throw new RuntimeException(e); } } + protected void updateStudyIdInMetadataIfNeeded(ExportDetails exportDetails, SequencedMap metadataSeqMap) { + if (exportDetails.getExportAsStudyId() != null) { + LOG.debug("Exporting {} metadata for study {} as study {}", + this.getClass().getSimpleName(), exportDetails.getStudyId(), exportDetails.getExportAsStudyId()); + metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportAsStudyId).toMetadataKeyValues()); + } + } + /** * @param metadata - metadata to write. Can be used to determine the unique filename * @return the filename to write the metadata to diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index f7e3029997f..9f5fa8fa7c8 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export.services; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.Exporter; import org.cbioportal.application.file.utils.FileWriterFactory; import org.slf4j.Logger; @@ -22,18 +23,18 @@ public ExportService( @Transactional @Override - public boolean exportData(FileWriterFactory fileWriterFactory, String studyId) { + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { boolean atLeastOneDataFileExportedSuccesfully = false; for (Exporter exporter : exporters) { try { - boolean exportedDataType = exporter.exportData(fileWriterFactory, studyId); + boolean exportedDataType = exporter.exportData(fileWriterFactory, exportDetails); LOG.debug("{} data for studyId: {} using exporter: {}", exportedDataType ? "Exported" : "No data exported", - studyId, + exportDetails.getStudyId(), exporter.getClass().getSimpleName()); atLeastOneDataFileExportedSuccesfully |= exportedDataType; } catch (Exception e) { - LOG.error("Error exporting data for study {}: {}. The file will be intentionally corrupted.", studyId, e.getMessage(), e); + LOG.error("Error exporting data for study {}: {}. The file will be intentionally corrupted.", exportDetails.getStudyId(), e.getMessage(), e); fileWriterFactory.fail(e); } } diff --git a/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java index 3333cb3bda8..873d0f0c8e8 100644 --- a/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/CancerStudyMetadataExporterTests.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export; import org.cbioportal.application.file.export.exporters.CancerStudyMetadataExporter; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.model.CancerStudyMetadata; import org.junit.Test; @@ -10,7 +11,7 @@ import static org.junit.Assert.assertTrue; public class CancerStudyMetadataExporterTests { - String studyId = "STUDY_ID"; + ExportDetails exportDetails = new ExportDetails("STUDY_ID"); CancerStudyMetadataService cancerStudyMetadataService = new CancerStudyMetadataService(null) { @Override public CancerStudyMetadata getCancerStudyMetadata(String studyId) { @@ -38,7 +39,7 @@ public CancerStudyMetadata getCancerStudyMetadata(String studyId) { } }); - boolean exported = exporter.exportData(factory, studyId); + boolean exported = exporter.exportData(factory, exportDetails); assertFalse("No data should be exported", exported); var fileContents = factory.getFileContents(); @@ -50,7 +51,7 @@ public void testExport() { var factory = new InMemoryFileWriterFactory(); CancerStudyMetadataExporter exporter = new CancerStudyMetadataExporter(cancerStudyMetadataService); - boolean exported = exporter.exportData(factory, studyId); + boolean exported = exporter.exportData(factory, exportDetails); assertTrue("Data should be exported", exported); var fileContents = factory.getFileContents(); @@ -58,4 +59,18 @@ public void testExport() { assertTrue(fileContents.containsKey("meta_study.txt")); assertEquals("cancer_study_identifier: STUDY_ID\n" + "type_of_cancer: Breast Cancer\n" + "name: Breast Cancer Study\n" + "description: A study on breast cancer\n" + "citation: Foo et al. 2023\n" + "pmid: 12345678\n" + "groups: Group1, Group2\n" + "add_global_case_list: true\n" + "reference_genome: GRCh38\n", fileContents.get("meta_study.txt").toString()); } + + @Test + public void testExportUnderAlternativeStudyId() { + var factory = new InMemoryFileWriterFactory(); + CancerStudyMetadataExporter exporter = new CancerStudyMetadataExporter(cancerStudyMetadataService); + + boolean exported = exporter.exportData(factory, new ExportDetails(exportDetails.getStudyId(), "STUDY_ID_B")); + + assertTrue("Data should be exported", exported); + var fileContents = factory.getFileContents(); + assertEquals(1, fileContents.size()); + assertTrue(fileContents.containsKey("meta_study.txt")); + assertEquals("cancer_study_identifier: STUDY_ID_B\n" + "type_of_cancer: Breast Cancer\n" + "name: Breast Cancer Study\n" + "description: A study on breast cancer\n" + "citation: Foo et al. 2023\n" + "pmid: 12345678\n" + "groups: Group1, Group2\n" + "add_global_case_list: true\n" + "reference_genome: GRCh38\n", fileContents.get("meta_study.txt").toString()); + } } diff --git a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java index 3b1430b13d8..e0c149c77b1 100644 --- a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export; import org.cbioportal.application.file.export.exporters.CaseListsExporter; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.CaseListMetadataService; import org.cbioportal.application.file.model.CaseListMetadata; import org.junit.Test; @@ -14,10 +15,12 @@ public class CaseListsExporterTests { - String studyId = "STUDY_ID"; + ExportDetails exportDetails = new ExportDetails("STUDY_ID"); CaseListMetadataService caseListMetadataService = new CaseListMetadataService(null) { @Override public List getCaseListsMetadata(String studyId) { + assertEquals("STUDY_ID", studyId); + var caseList1 = new CaseListMetadata(); caseList1.setCancerStudyIdentifier(studyId); caseList1.setStableId(studyId + "_" + "stable_id_1"); @@ -27,7 +30,7 @@ public List getCaseListsMetadata(String studyId) { var caseList2 = new CaseListMetadata(); caseList2.setCancerStudyIdentifier(studyId); - caseList2.setStableId("stable_id_2"); + caseList2.setStableId(studyId + "_" + "stable_id_2"); caseList2.setName("Case List 2"); caseList2.setDescription("Description for Case List 2"); caseList2.setSampleIds(new LinkedHashSet<>(List.of("SAMPLE_3", "SAMPLE_4"))); @@ -46,7 +49,7 @@ public List getCaseListsMetadata(String studyId) { } }); - boolean exported = exporter.exportData(factory, studyId); + boolean exported = exporter.exportData(factory, exportDetails); assertFalse("No case lists should be exported", exported); assertTrue("No files should be created", factory.getFileContents().isEmpty()); @@ -57,7 +60,7 @@ public void testExportCaseLists() { var factory = new InMemoryFileWriterFactory(); CaseListsExporter exporter = new CaseListsExporter(caseListMetadataService); - boolean exported = exporter.exportData(factory, studyId); + boolean exported = exporter.exportData(factory, exportDetails); var fileContents = factory.getFileContents(); assertTrue("Case lists should be exported", exported); @@ -66,14 +69,42 @@ public void testExportCaseLists() { assertTrue(fileContents.containsKey("case_lists/cases_stable_id_2.txt")); assertEquals("cancer_study_identifier: STUDY_ID\n" - + "stable_id: " + studyId + "_stable_id_1\n" + + "stable_id: STUDY_ID_stable_id_1\n" + "case_list_name: Case List 1\n" + "case_list_description: Description for Case List 1\n" + "case_list_ids: SAMPLE_1\tSAMPLE_2\n", fileContents.get("case_lists/cases_stable_id_1.txt").toString()); //note: the study id is excluded from the stable id in the file name assertEquals("cancer_study_identifier: STUDY_ID\n" - + "stable_id: stable_id_2\n" + + "stable_id: STUDY_ID_stable_id_2\n" + + "case_list_name: Case List 2\n" + + "case_list_description: Description for Case List 2\n" + + "case_list_ids: SAMPLE_3\tSAMPLE_4\n", + fileContents.get("case_lists/cases_stable_id_2.txt").toString()); + } + + @Test + public void testExportCaseListsUnderDifferentStudyId() { + var factory = new InMemoryFileWriterFactory(); + CaseListsExporter exporter = new CaseListsExporter(caseListMetadataService); + + boolean exported = exporter.exportData(factory, new ExportDetails(exportDetails.getStudyId(), "STUDY_ID_B")); + + var fileContents = factory.getFileContents(); + assertTrue("Case lists should be exported", exported); + assertEquals(2, fileContents.size()); + assertTrue(fileContents.containsKey("case_lists/cases_stable_id_1.txt")); + assertTrue(fileContents.containsKey("case_lists/cases_stable_id_2.txt")); + + assertEquals("cancer_study_identifier: STUDY_ID_B\n" + + "stable_id: STUDY_ID_B_stable_id_1\n" + + "case_list_name: Case List 1\n" + + "case_list_description: Description for Case List 1\n" + + "case_list_ids: SAMPLE_1\tSAMPLE_2\n", + fileContents.get("case_lists/cases_stable_id_1.txt").toString()); //note: the study id is excluded from the stable id in the file name + + assertEquals("cancer_study_identifier: STUDY_ID_B\n" + + "stable_id: STUDY_ID_B_stable_id_2\n" + "case_list_name: Case List 2\n" + "case_list_description: Description for Case List 2\n" + "case_list_ids: SAMPLE_3\tSAMPLE_4\n", diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java index 33817a3f3b8..5cbc8a5429c 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java @@ -2,6 +2,7 @@ import org.cbioportal.application.file.export.exporters.ClinicalPatientAttributesDataTypeExporter; import org.cbioportal.application.file.export.exporters.ClinicalSampleAttributesDataTypeExporter; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.model.ClinicalAttribute; import org.cbioportal.application.file.model.ClinicalAttributeValue; @@ -26,7 +27,7 @@ public void testNoClinicalSampleAttributeData() { public boolean hasClinicalSampleAttributes(String studyId) { return false; } - }).exportData(factory, "TEST_STUDY_ID"); + }).exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse("No data should be exported", exported); var fileContents = factory.getFileContents(); @@ -37,7 +38,7 @@ public boolean hasClinicalSampleAttributes(String studyId) { public void testGetClinicalSampleAttributeData() { var factory = new InMemoryFileWriterFactory(); - boolean exported = new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + boolean exported = new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue("Data should be exported", exported); var fileContents = factory.getFileContents(); @@ -62,6 +63,24 @@ public void testGetClinicalSampleAttributeData() { fileContents.get("data_clinical_sample_attributes.txt").toString()); } + @Test + public void testGetClinicalSampleAttributeDataUnderAlternativeStudyId() { + var factory = new InMemoryFileWriterFactory(); + + boolean exported = new ClinicalSampleAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, new ExportDetails("TEST_STUDY_ID", "TEST_STUDY_ID_B")); + + assertTrue("Data should be exported", exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_clinical_sample_attributes.txt", "data_clinical_sample_attributes.txt"), fileContents.keySet()); + + assertEquals( + "cancer_study_identifier: TEST_STUDY_ID_B\n" + + "genetic_alteration_type: CLINICAL\n" + + "datatype: SAMPLE_ATTRIBUTES\n" + + "data_filename: data_clinical_sample_attributes.txt\n", + fileContents.get("meta_clinical_sample_attributes.txt").toString()); + } + @Test public void testNoClinicalPatientAttributeData() { var factory = new InMemoryFileWriterFactory(); @@ -71,7 +90,7 @@ public void testNoClinicalPatientAttributeData() { public boolean hasClinicalPatientAttributes(String studyId) { return false; } - }).exportData(factory, "TEST_STUDY_ID"); + }).exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse("No data should be exported", exported); var fileContents = factory.getFileContents(); @@ -82,7 +101,7 @@ public boolean hasClinicalPatientAttributes(String studyId) { public void testGetClinicalPatientAttributeData() { var factory = new InMemoryFileWriterFactory(); - boolean exported = new ClinicalPatientAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, "TEST_STUDY_ID"); + boolean exported = new ClinicalPatientAttributesDataTypeExporter(clinicalDataAttributeDataService).exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue("Data should be exported", exported); var fileContents = factory.getFileContents(); diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java index 0e82067316d..ef24dec93d2 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java @@ -1,6 +1,7 @@ package org.cbioportal.application.file.export; import org.cbioportal.application.file.export.exporters.ClinicalTimelineDataTypeExporter; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.ClinicalAttributeDataService; import org.cbioportal.application.file.model.ClinicalEvent; import org.cbioportal.application.file.model.ClinicalEventData; @@ -52,7 +53,7 @@ public boolean hasClinicalTimelineData(String studyId) { } }); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse(exported); assertTrue(factory.getFileContents().isEmpty()); @@ -94,7 +95,7 @@ public List getDistinctClinicalEventKeys(String studyId) { } }); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Clinical event IDs are not matching")); } @@ -144,7 +145,7 @@ public List getDistinctClinicalEventKeys(String studyId) { } }); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -195,7 +196,7 @@ public List getDistinctClinicalEventKeys(String studyId) { } }); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Clinical event data key is null")); } } \ No newline at end of file diff --git a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java index 635a86011c1..b9c014dd921 100644 --- a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.GenericAssayLimitValueDatatypeExporter; import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; @@ -56,7 +57,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr }; GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Sample stable ID is null")); } @@ -89,7 +90,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Number of values does not match number of sample stable IDs")); } @@ -124,7 +125,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Genetic entity ID is not in ascending order")); } @@ -165,7 +166,7 @@ public CloseableIterator getData(String molecularProfileStab GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Property name is null")); } @@ -195,7 +196,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Genetic entity is null")); } @@ -226,7 +227,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr }; GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Genetic entity ID is null")); } @@ -287,7 +288,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -335,7 +336,7 @@ public List getDistinctGenericEntityMetaPropertyNames(String molecularPr GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(geneticProfileService, geneticProfileDataService); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -370,7 +371,7 @@ public List getGeneticProfiles(String studyId, S } }, null); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse(exported); assertTrue(factory.getFileContents().isEmpty()); diff --git a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java index 58db205f871..2a1145ef013 100644 --- a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.MafDataTypeExporter; import org.cbioportal.application.file.export.exporters.MutationExtendedDatatypeExporter; import org.cbioportal.application.file.export.services.GeneticProfileService; @@ -49,7 +50,7 @@ public List getGeneticProfiles(String studyId, S } }, mafRecordService); - boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = mafDataTypeExporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse(exported); } @@ -106,7 +107,7 @@ public CloseableIterator getMafRecords(String molecularProfileStableI MafDataTypeExporter mafDataTypeExporter = new MutationExtendedDatatypeExporter(geneticProfileService, mafRecordService); - boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = mafDataTypeExporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -124,6 +125,32 @@ public CloseableIterator getMafRecords(String molecularProfileStableI """, fileContents.get("data_mutation_extended_maf_maf_stable_id.txt").toString()); } + @Test + public void testMafDataTypeExportUnderAlternativeStudyId() { + var factory = new InMemoryFileWriterFactory(); + + MafRecordService mafRecordService = new MafRecordService(null) { + @Override + public CloseableIterator getMafRecords(String molecularProfileStableId) { + MafRecord mafRecord = new MafRecord(); + return new SimpleCloseableIterator<>(List.of(mafRecord)); + } + }; + + MafDataTypeExporter mafDataTypeExporter = new MutationExtendedDatatypeExporter(geneticProfileService, mafRecordService); + + boolean exported = mafDataTypeExporter.exportData(factory, new ExportDetails("TEST_STUDY_ID", "TEST_STUDY_ID_B")); + + assertTrue(exported); + var fileContents = factory.getFileContents(); + assertEquals(Set.of("meta_mutation_extended_maf_maf_stable_id.txt", "data_mutation_extended_maf_maf_stable_id.txt"), fileContents.keySet()); + + assertEquals("cancer_study_identifier: TEST_STUDY_ID_B\n" + + "genetic_alteration_type: MUTATION_EXTENDED\n" + + "datatype: MAF\n" + + "stable_id: MAF_STABLE_ID\n" + + "data_filename: data_mutation_extended_maf_maf_stable_id.txt\n", fileContents.get("meta_mutation_extended_maf_maf_stable_id.txt").toString()); + } @Test public void testMafDataTypeExportNoRows() { var factory = new InMemoryFileWriterFactory(); @@ -137,7 +164,7 @@ public CloseableIterator getMafRecords(String molecularProfileStableI MafDataTypeExporter mafDataTypeExporter = new MutationExtendedDatatypeExporter(geneticProfileService, mafRecordService); - boolean exported = mafDataTypeExporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = mafDataTypeExporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); diff --git a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java index 45982701f4b..4605bb26339 100644 --- a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export; +import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.MrnaExpressionContinuousDatatypeExporter; import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; @@ -53,7 +54,7 @@ public List getGeneticProfiles(String studyId, S } }, geneticProfileDataService); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertFalse(exported); } @@ -82,7 +83,7 @@ public List getSampleStableIds(String molecularProfileStableId) { MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -118,7 +119,7 @@ public List getSampleStableIds(String molecularProfileStableId) { MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); - boolean exported = exporter.exportData(factory, "TEST_STUDY_ID"); + boolean exported = exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID")); assertTrue(exported); var fileContents = factory.getFileContents(); @@ -153,7 +154,7 @@ public List getSampleStableIds(String molecularProfileStableId) { MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Number of values does not match number of sample stable IDs")); } @@ -172,7 +173,7 @@ public List getSampleStableIds(String molecularProfileStableId) { }; MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(geneticProfileService, geneticProfileDataService); - RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, "TEST_STUDY_ID")); + RuntimeException exception = assertThrows(RuntimeException.class, () -> exporter.exportData(factory, new ExportDetails("TEST_STUDY_ID"))); assertThat(exception.getMessage(), containsString("Sample stable ID is null")); } } \ No newline at end of file From 041d726956e2b92a661b7260f5421b5f359e91a8 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Wed, 30 Apr 2025 16:36:52 +0200 Subject: [PATCH 60/69] Enable filtering exported data by sample id --- .../application/file/export/ExportConfig.java | 6 -- .../exporters/CancerTypeDataTypeExporter.java | 5 +- .../export/exporters/CaseListsExporter.java | 3 +- ...icalPatientAttributesDataTypeExporter.java | 9 +- ...nicalSampleAttributesDataTypeExporter.java | 9 +- .../ClinicalTimelineDataTypeExporter.java | 11 +-- .../exporters/CnaSegDatatypeExporter.java | 9 +- .../export/exporters/DataTypeExporter.java | 15 ++-- .../file/export/exporters/ExportDetails.java | 15 +++- .../GenePanelMatrixDatatypeExporter.java | 11 +-- .../GeneSampleWideTableDatatypeExporter.java | 23 +++-- .../GenericAssayDatatypeExporter.java | 23 +++-- .../GeneticProfileDatatypeExporter.java | 2 +- .../export/exporters/MafDataTypeExporter.java | 7 +- .../ProteinLevelDatatypeExporter.java | 23 +++-- .../StructuralVariantDataTypeExporter.java | 7 +- .../mappers/CaseListMetadataMapper.java | 3 +- .../mappers/ClinicalAttributeDataMapper.java | 15 ++-- .../file/export/mappers/CnaSegmentMapper.java | 6 +- .../export/mappers/GenePanelMatrixMapper.java | 7 +- .../export/mappers/GeneticProfileMapper.java | 3 +- .../file/export/mappers/MafRecordMapper.java | 4 +- .../file/export/mappers/SVMapper.java | 4 +- .../services/CaseListMetadataService.java | 5 +- .../ClinicalAttributeDataService.java | 29 +++---- .../export/services/CnaSegmentService.java | 10 ++- .../services/GenePanelMatrixService.java | 13 +-- .../services/GeneticProfileService.java | 5 +- .../export/services/MafRecordService.java | 6 +- .../services/StructuralVariantService.java | 6 +- .../mappers/export/CaseListMetadataMapper.xml | 10 +++ .../export/ClinicalAttributeDataMapper.xml | 83 +++++++++++++++++- .../mappers/export/CnaSegmentMapper.xml | 21 +++++ .../mappers/export/GenePanelMatrixMapper.xml | 32 +++++++ .../mappers/export/GeneticProfileMapper.xml | 34 +++++--- .../mappers/export/MafRecordMapper.xml | 84 +++++++++++-------- .../resources/mappers/export/SVMapper.xml | 10 +++ .../file/export/CaseListsExporterTests.java | 5 +- ...linicalAttributeDataTypeExporterTests.java | 12 +-- ...ClinicalTimelineDataTypeExporterTests.java | 26 +++--- ...cAssayLimitValueDatatypeExporterTests.java | 4 +- .../file/export/MafDataTypeExporterTests.java | 12 +-- .../MrnaExpressionDatatypeExporterTests.java | 4 +- 43 files changed, 431 insertions(+), 200 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 6107ca3f004..6d6c2ed2fff 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -65,12 +65,6 @@ import java.util.Optional; import java.util.Properties; -//2. Add posibility to specify alternative study id while exporting -//3. Add posiblity to filter out data based on set of sample ids -//1. Add posibility to specify base (study folder) path without disruptiong the current implementation to much -//4. Read definition of Virtual study from the mongodb -//5. Think how to reevaluate the dynamic virtual study -//5. Add explanation if virtual study is exported @Configuration @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") @MapperScan(basePackages = "org.cbioportal.application.file.export.mappers", sqlSessionFactoryRef = "exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java index f4a2605df00..1b419d5a335 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CancerTypeDataTypeExporter.java @@ -9,6 +9,7 @@ import java.util.List; import java.util.Optional; +import java.util.Set; public class CancerTypeDataTypeExporter extends DataTypeExporter { @@ -19,7 +20,7 @@ public CancerTypeDataTypeExporter(CancerStudyMetadataService cancerStudyMetadata } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(new ClinicalAttributesMetadata( studyId, "CANCER_TYPE", @@ -38,7 +39,7 @@ public String getMetaFilename(ClinicalAttributesMetadata metadata) { } @Override - protected Table getData(String studyId) { + protected Table getData(String studyId, Set sampleIds) { List cancerTypes = cancerStudyMetadataService.getCancerTypeHierarchy(studyId); var iterator = cancerTypes.iterator(); return new Table(new CloseableIterator<>() { diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java index 73302ea1c83..38af9e4c03f 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java @@ -7,6 +7,7 @@ import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.Set; /** * Exports all case lists for a study @@ -21,7 +22,7 @@ public CaseListsExporter(CaseListMetadataService caseListMetadataService) { @Override public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { - List caseLists = caseListMetadataService.getCaseListsMetadata(exportDetails.getStudyId()); + List caseLists = caseListMetadataService.getCaseListsMetadata(exportDetails.getStudyId(), exportDetails.getSampleIds()); boolean exported = false; for (CaseListMetadata metadata : caseLists) { exported |= new CaseListExporter(metadata).exportData(fileWriterFactory, exportDetails); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java index e75a84b449a..5ce4a22c048 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalPatientAttributesDataTypeExporter.java @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.Set; /** * Export metadata and data for clinical patient attributes. @@ -23,19 +24,19 @@ public ClinicalPatientAttributesDataTypeExporter(ClinicalAttributeDataService cl } @Override - protected Optional getMetadata(String studyId) { - if (!clinicalDataAttributeDataService.hasClinicalPatientAttributes(studyId)) { + protected Optional getMetadata(String studyId, Set sampleIds) { + if (!clinicalDataAttributeDataService.hasClinicalPatientAttributes(studyId, sampleIds)) { return Optional.empty(); } return Optional.of(new ClinicalAttributesMetadata(studyId, "CLINICAL", "PATIENT_ATTRIBUTES")); } @Override - protected ClinicalAttributesTable getData(String studyId) { + protected ClinicalAttributesTable getData(String studyId, Set sampleIds) { List clinicalPatientAttributes = new ArrayList<>(); clinicalPatientAttributes.add(ClinicalAttribute.PATIENT_ID); clinicalPatientAttributes.addAll(clinicalDataAttributeDataService.getClinicalPatientAttributes(studyId)); - CloseableIterator clinicalPatientAttributeValues = clinicalDataAttributeDataService.getClinicalPatientAttributeValues(studyId); + CloseableIterator clinicalPatientAttributeValues = clinicalDataAttributeDataService.getClinicalPatientAttributeValues(studyId, sampleIds); return new ClinicalAttributesTable(clinicalPatientAttributes, clinicalPatientAttributeValues); } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java index 25c8330fbe2..af33eee3be2 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalSampleAttributesDataTypeExporter.java @@ -10,6 +10,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Optional; +import java.util.Set; /** * Export metadata and data for clinical sample attributes. @@ -23,20 +24,20 @@ public ClinicalSampleAttributesDataTypeExporter(ClinicalAttributeDataService cli } @Override - protected Optional getMetadata(String studyId) { - if (!clinicalDataAttributeDataService.hasClinicalSampleAttributes(studyId)) { + protected Optional getMetadata(String studyId, Set sampleIds) { + if (!clinicalDataAttributeDataService.hasClinicalSampleAttributes(studyId, sampleIds)) { return Optional.empty(); } return Optional.of(new ClinicalAttributesMetadata(studyId, "CLINICAL", "SAMPLE_ATTRIBUTES")); } @Override - protected ClinicalAttributesTable getData(String studyId) { + protected ClinicalAttributesTable getData(String studyId, Set sampleIds) { List clinicalSampleAttributes = new ArrayList<>(); clinicalSampleAttributes.add(ClinicalAttribute.PATIENT_ID); clinicalSampleAttributes.add(ClinicalAttribute.SAMPLE_ID); clinicalSampleAttributes.addAll(clinicalDataAttributeDataService.getClinicalSampleAttributes(studyId)); - CloseableIterator clinicalSampleAttributeValues = clinicalDataAttributeDataService.getClinicalSampleAttributeValues(studyId); + CloseableIterator clinicalSampleAttributeValues = clinicalDataAttributeDataService.getClinicalSampleAttributeValues(studyId, sampleIds); return new ClinicalAttributesTable(clinicalSampleAttributes, clinicalSampleAttributeValues); } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java index 991460a8231..69c6d6c7a4e 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ClinicalTimelineDataTypeExporter.java @@ -16,6 +16,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; +import java.util.Set; import java.util.function.Function; /** @@ -39,24 +40,24 @@ public ClinicalTimelineDataTypeExporter(ClinicalAttributeDataService clinicalDat } @Override - protected Optional getMetadata(String studyId) { - if (!clinicalDataAttributeDataService.hasClinicalTimelineData(studyId)) { + protected Optional getMetadata(String studyId, Set sampleIds) { + if (!clinicalDataAttributeDataService.hasClinicalTimelineData(studyId, sampleIds)) { return Optional.empty(); } return Optional.of(new ClinicalAttributesMetadata(studyId, "CLINICAL", "TIMELINE")); } @Override - protected Table getData(String studyId) { + protected Table getData(String studyId, Set sampleIds) { List clinicalEventKeys = clinicalDataAttributeDataService.getDistinctClinicalEventKeys(studyId); CloseableIterator clinicalEventDataIterator; if (clinicalEventKeys.isEmpty()) { clinicalEventDataIterator = CloseableIterator.empty(); } else { - clinicalEventDataIterator = clinicalDataAttributeDataService.getClinicalEventData(studyId); + clinicalEventDataIterator = clinicalDataAttributeDataService.getClinicalEventData(studyId, sampleIds); } - CloseableIterator clinicalEventsIterator = clinicalDataAttributeDataService.getClinicalEvents(studyId); + CloseableIterator clinicalEventsIterator = clinicalDataAttributeDataService.getClinicalEvents(studyId, sampleIds); return getTable(clinicalEventsIterator, clinicalEventKeys, clinicalEventDataIterator); } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CnaSegDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CnaSegDatatypeExporter.java index 24298aee1c3..16dd677de80 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CnaSegDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CnaSegDatatypeExporter.java @@ -8,6 +8,7 @@ import org.cbioportal.application.file.model.Table; import java.util.Optional; +import java.util.Set; public class CnaSegDatatypeExporter extends DataTypeExporter { @@ -20,8 +21,8 @@ public CnaSegDatatypeExporter(CancerStudyMetadataService cancerStudyMetadataServ } @Override - protected Optional getMetadata(String studyId) { - if (!this.cnaSegmentService.hasCnaSegments(studyId)) { + protected Optional getMetadata(String studyId, Set sampleIds) { + if (!this.cnaSegmentService.hasCnaSegments(studyId, sampleIds)) { return Optional.empty(); } CnaSegMetadata metadata = new CnaSegMetadata(); @@ -37,7 +38,7 @@ protected Optional getMetadata(String studyId) { } @Override - protected Table getData(String studyId) { - return new Table(cnaSegmentService.getCnaSegments(studyId), CnaSegment.getHeader()); + protected Table getData(String studyId, Set sampleIds) { + return new Table(cnaSegmentService.getCnaSegments(studyId, sampleIds), CnaSegment.getHeader()); } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java index 2f7e184ee7f..c3d81facdeb 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java @@ -13,6 +13,7 @@ import java.util.Iterator; import java.util.Optional; import java.util.SequencedMap; +import java.util.Set; /** * Export metadata and data for a specific data type (genetic alteration type + datatype). @@ -26,7 +27,7 @@ public abstract class DataTypeExporter metadataOptional = getMetadata(exportDetails.getStudyId()); + Optional metadataOptional = getMetadata(exportDetails.getStudyId(), exportDetails.getSampleIds()); if (metadataOptional.isEmpty()) { LOG.debug("No metadata found for study {} by {} exporter. Skipping export of this datatype.", exportDetails.getExportAsStudyId(), getClass().getSimpleName()); return false; @@ -38,7 +39,7 @@ public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exp String metaFilename = getMetaFilename(metadata); String dataFilename = getDataFilename(metadata); writeMetadata(fileWriterFactory, metaFilename, metadata, dataFilename, exportDetails); - writeData(fileWriterFactory, metadata, dataFilename); + writeData(fileWriterFactory, metadata, dataFilename, exportDetails); LOG.debug("Data (genetic alteration type: {}, datatype: {}) has been exported for study {} by {} exporter.", metadata.getGeneticAlterationType(), metadata.getDatatype(), exportDetails.getStudyId(), getClass().getSimpleName()); return true; } @@ -86,8 +87,8 @@ protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFil /** * Write data to a file. */ - protected void writeData(FileWriterFactory fileWriterFactory, M metadata, String dataFilename) { - try (D data = getData(metadata.getCancerStudyIdentifier()); Writer dataFileWriter = fileWriterFactory.newWriter(dataFilename)) { + protected void writeData(FileWriterFactory fileWriterFactory, M metadata, String dataFilename, ExportDetails exportDetails) { + try (D data = getData(metadata.getCancerStudyIdentifier(), exportDetails.getSampleIds()); Writer dataFileWriter = fileWriterFactory.newWriter(dataFilename)) { LOG.debug("Writing data for study {} (genetic alteration type: {}, datatype: {}) to file: {}", metadata.getCancerStudyIdentifier(), metadata.getGeneticAlterationType(), metadata.getDatatype(), dataFilename); new TsvDataWriter(dataFileWriter).write(data); @@ -100,16 +101,18 @@ protected void writeData(FileWriterFactory fileWriterFactory, M metadata, String * Get metadata for the datatype of a specific study. * * @param studyId - study stable identifier + * @param sampleIds - set of sample IDs to filter the metadata; can be null * @return metadata for the datatype of the study if available */ - protected abstract Optional getMetadata(String studyId); + protected abstract Optional getMetadata(String studyId, Set sampleIds); /** * Get the data for the datatype of a specific study. * * @param studyId - study stable identifier + * @param sampleIds - set of sample IDs to filter the data; can be null * @return data for the datatype of the study */ - protected abstract D getData(String studyId); + protected abstract D getData(String studyId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java index acabcfb5340..a8d2c69ea0b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java @@ -1,6 +1,6 @@ package org.cbioportal.application.file.export.exporters; -import java.util.Optional; +import java.util.Set; public class ExportDetails { /** @@ -13,14 +13,24 @@ public class ExportDetails { */ private final String exportAsStudyId; + private final Set sampleIds; + public ExportDetails(String studyId) { this.studyId = studyId; this.exportAsStudyId = null; + this.sampleIds = null; } public ExportDetails(String studyId, String exportAsStudyId) { this.studyId = studyId; this.exportAsStudyId = exportAsStudyId; + this.sampleIds = null; + } + + public ExportDetails(String studyId, String exportAsStudyId, Set sampleIds) { + this.studyId = studyId; + this.exportAsStudyId = exportAsStudyId; + this.sampleIds = sampleIds; } public String getStudyId() { @@ -31,4 +41,7 @@ public String getExportAsStudyId() { return exportAsStudyId; } + public Set getSampleIds() { + return sampleIds; + } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java index a3916b105b6..838e4811dbb 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenePanelMatrixDatatypeExporter.java @@ -14,6 +14,7 @@ import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; +import java.util.Set; public class GenePanelMatrixDatatypeExporter extends DataTypeExporter { @@ -24,8 +25,8 @@ public GenePanelMatrixDatatypeExporter(GenePanelMatrixService genePanelMatrixSer } @Override - protected Optional getMetadata(String studyId) { - if (!genePanelMatrixService.hasGenePanelMatrix(studyId)) { + protected Optional getMetadata(String studyId, Set sampleIds) { + if (!genePanelMatrixService.hasGenePanelMatrix(studyId, sampleIds)) { return Optional.empty(); } GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); @@ -36,10 +37,10 @@ protected Optional getMetadata(String studyId) { } @Override - protected Table getData(String studyId) { - CloseableIterator genePanelMatrixItems = genePanelMatrixService.getGenePanelMatrix(studyId); + protected Table getData(String studyId, Set sampleIds) { + CloseableIterator genePanelMatrixItems = genePanelMatrixService.getGenePanelMatrix(studyId, sampleIds); var rowIterator = Iterators.peekingIterator(genePanelMatrixItems); - List geneProfileIds = genePanelMatrixService.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId); + List geneProfileIds = genePanelMatrixService.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId, sampleIds); var header = new LinkedHashSet(); header.add("SAMPLE_ID"); List genePlatforms = geneProfileIds.stream().map(stableId -> withoutStudySuffix(studyId, stableId)).toList(); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java index 159235600a8..0c141f55575 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java @@ -9,11 +9,13 @@ import org.cbioportal.application.file.utils.CloseableIterator; import java.io.IOException; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.Set; import java.util.function.Function; public abstract class GeneSampleWideTableDatatypeExporter extends GeneticProfileDatatypeExporter { @@ -45,7 +47,7 @@ public ProfileDataExporter(GeneticProfileDatatypeMetadata metadata) { this.metatdata = metadata; } - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds) { + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, boolean numberOfSamplesHasToMatch) { return new CloseableIterator<>() { @Override public void close() throws IOException { @@ -60,7 +62,7 @@ public boolean hasNext() { @Override public TableRow next() { var data = geneticProfileData.next(); - if (data.getValues().size() != sampleStableIds.size()) { + if (numberOfSamplesHasToMatch && data.getValues().size() != sampleStableIds.size()) { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } var row = new LinkedHashMap(); @@ -76,14 +78,19 @@ public TableRow next() { } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(metatdata); } @Override - protected CloseableIterator> getData(String studyId) { - var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - for (String sampleStableId : sampleStableIds) { + protected CloseableIterator> getData(String studyId, Set sampleIds) { + List sampleIdsList; + if (sampleIds == null) { + sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + } else { + sampleIdsList = new ArrayList<>(sampleIds); + } + for (String sampleStableId : sampleIdsList) { if (sampleStableId == null) { throw new IllegalStateException("Sample stable ID is null"); } @@ -91,8 +98,8 @@ protected CloseableIterator> getData(String studyId var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); var header = new LinkedHashSet(); header.addAll(GENE_ROW.keySet()); - header.addAll(sampleStableIds); - return new Table(composeRows(geneticProfileData, sampleStableIds), header); + header.addAll(sampleIdsList); + return new Table(composeRows(geneticProfileData, sampleIdsList, sampleIds == null), header); } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java index 15d23ec16df..d885f8f0a38 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java @@ -12,12 +12,14 @@ import org.cbioportal.application.file.utils.CloseableIterator; import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.Set; import java.util.function.Function; public abstract class GenericAssayDatatypeExporter extends GeneticProfileDatatypeExporter { @@ -53,7 +55,7 @@ public GenericProfileExporter(GeneticProfileDatatypeMetadata metadata) { geneticProfileDataService.getDistinctGenericEntityMetaPropertyNames(metadata.getStableId())); } - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, List genericEntitiesMetaProperties, CloseableIterator properties) { + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, List genericEntitiesMetaProperties, CloseableIterator properties, boolean samplesNumberHasToMatch) { PeekingIterator geneticProfileDataPeekingIterator = Iterators.peekingIterator(geneticProfileData); PeekingIterator propertyPeekingIterator = Iterators.peekingIterator(properties); return new CloseableIterator<>() { @@ -83,7 +85,7 @@ public TableRow next() { && data.getGeneticEntity().getGeneticEntityId() > geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId()) { throw new IllegalStateException("Genetic entity ID is not in ascending order"); } - if (data.getValues().size() != sampleStableIds.size()) { + if (samplesNumberHasToMatch && data.getValues().size() != sampleStableIds.size()) { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } var row = new LinkedHashMap(); @@ -123,14 +125,19 @@ public TableRow next() { } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(metatdata); } @Override - protected CloseableIterator> getData(String studyId) { - var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - for (String sampleStableId : sampleStableIds) { + protected CloseableIterator> getData(String studyId, Set sampleIds) { + List sampleIdsList; + if (sampleIds == null) { + sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + } else { + sampleIdsList = new ArrayList<>(sampleIds); + } + for (String sampleStableId : sampleIdsList) { if (sampleStableId == null) { throw new IllegalStateException("Sample stable ID is null"); } @@ -143,8 +150,8 @@ protected CloseableIterator> getData(String studyId var header = new LinkedHashSet(); header.addAll(ROW.keySet()); header.addAll(this.metatdata.getGenericEntitiesMetaProperties()); - header.addAll(sampleStableIds); - return new Table(composeRows(geneticProfileData, sampleStableIds, metatdata.getGenericEntitiesMetaProperties(), properties), header); + header.addAll(sampleIdsList); + return new Table(composeRows(geneticProfileData, sampleIdsList, metatdata.getGenericEntitiesMetaProperties(), properties, sampleIds == null), header); } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index 67b0605fa22..c29f5aa9f6d 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -23,7 +23,7 @@ public GeneticProfileDatatypeExporter(GeneticProfileService geneticProfileServic @Override public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { - List geneticProfiles = geneticProfileService.getGeneticProfiles(exportDetails.getStudyId(), getGeneticAlterationType(), getDatatype()); + List geneticProfiles = geneticProfileService.getGeneticProfiles(exportDetails.getStudyId(), exportDetails.getSampleIds(), getGeneticAlterationType(), getDatatype()); boolean exported = false; for (GeneticProfileDatatypeMetadata metadata : geneticProfiles) { if (metadata.getPatientLevel() != null && metadata.getPatientLevel()) { diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MafDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MafDataTypeExporter.java index c56167c97f0..6300e714f7b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MafDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MafDataTypeExporter.java @@ -8,6 +8,7 @@ import org.cbioportal.application.file.utils.CloseableIterator; import java.util.Optional; +import java.util.Set; public abstract class MafDataTypeExporter extends GeneticProfileDatatypeExporter { @@ -37,13 +38,13 @@ public MAFGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(metadata); } @Override - protected Table getData(String studyId) { - CloseableIterator mafRecords = mafRecordService.getMafRecords(metadata.getStableId()); + protected Table getData(String studyId, Set sampleIds) { + CloseableIterator mafRecords = mafRecordService.getMafRecords(metadata.getStableId(), sampleIds); return new Table(mafRecords, MafRecord.getHeader()); } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java index 3adcd5b0f55..e65e7b1064c 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java @@ -11,11 +11,13 @@ import org.slf4j.LoggerFactory; import java.io.IOException; +import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Optional; import java.util.SequencedMap; +import java.util.Set; import java.util.function.Function; public abstract class ProteinLevelDatatypeExporter extends GeneticProfileDatatypeExporter { @@ -73,7 +75,7 @@ public MrnaExpressionGeneticProfileExporter(GeneticProfileDatatypeMetadata metad this.metatdata = metadata; } - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds) { + private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, boolean samplesNumberHasToMatch) { return new CloseableIterator<>() { @Override public void close() throws IOException { @@ -88,7 +90,7 @@ public boolean hasNext() { @Override public TableRow next() { var data = geneticProfileData.next(); - if (data.getValues().size() != sampleStableIds.size()) { + if (samplesNumberHasToMatch && data.getValues().size() != sampleStableIds.size()) { throw new IllegalStateException("Number of values does not match number of sample stable IDs"); } var row = new LinkedHashMap(); @@ -104,14 +106,19 @@ public TableRow next() { } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(metatdata); } @Override - protected CloseableIterator> getData(String studyId) { - var sampleStableIds = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - for (String sampleStableId : sampleStableIds) { + protected CloseableIterator> getData(String studyId, Set sampleIds) { + List sampleIdsList; + if (sampleIds == null) { + sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); + } else { + sampleIdsList = new ArrayList<>(sampleIds); + } + for (String sampleStableId : sampleIdsList) { if (sampleStableId == null) { throw new IllegalStateException("Sample stable ID is null"); } @@ -119,8 +126,8 @@ protected CloseableIterator> getData(String studyId var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); var header = new LinkedHashSet(); header.addAll(ROW.keySet()); - header.addAll(sampleStableIds); - return new Table(composeRows(geneticProfileData, sampleStableIds), header); + header.addAll(sampleIdsList); + return new Table(composeRows(geneticProfileData, sampleIdsList, sampleIds == null), header); } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java index ab6d794d4d4..553a875600e 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/StructuralVariantDataTypeExporter.java @@ -8,6 +8,7 @@ import org.cbioportal.application.file.utils.CloseableIterator; import java.util.Optional; +import java.util.Set; public class StructuralVariantDataTypeExporter extends GeneticProfileDatatypeExporter { @@ -42,13 +43,13 @@ public SVGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { } @Override - protected Optional getMetadata(String studyId) { + protected Optional getMetadata(String studyId, Set sampleIds) { return Optional.of(metadata); } @Override - protected Table getData(String studyId) { - CloseableIterator structuralVariantData = structuralVariantService.getStructuralVariants(metadata.getStableId()); + protected Table getData(String studyId, Set sampleIds) { + CloseableIterator structuralVariantData = structuralVariantService.getStructuralVariants(metadata.getStableId(), sampleIds); return new Table(structuralVariantData, StructuralVariant.getHeader()); } } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java index bc23a505bf5..130b11b56cc 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/CaseListMetadataMapper.java @@ -3,7 +3,8 @@ import org.cbioportal.application.file.model.CaseListMetadata; import java.util.List; +import java.util.Set; public interface CaseListMetadataMapper { - List getCaseListsMetadata(String studyId); + List getCaseListsMetadata(String studyId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java index 92aa62b3b89..d6973d92b69 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/ClinicalAttributeDataMapper.java @@ -7,26 +7,27 @@ import org.cbioportal.application.file.model.ClinicalEventData; import java.util.List; +import java.util.Set; public interface ClinicalAttributeDataMapper { List getClinicalSampleAttributes(String studyId); - Cursor getClinicalSampleAttributeValues(String studyId); + Cursor getClinicalSampleAttributeValues(String studyId, Set sampleIds); List getClinicalPatientAttributes(String studyId); - Cursor getClinicalPatientAttributeValues(String studyId); + Cursor getClinicalPatientAttributeValues(String studyId, Set sampleIds); - boolean hasClinicalPatientAttributes(String studyId); + boolean hasClinicalPatientAttributes(String studyId, Set sampleIds); - boolean hasClinicalSampleAttributes(String studyId); + boolean hasClinicalSampleAttributes(String studyId, Set sampleIds); - boolean hasClinicalTimelineData(String studyId); + boolean hasClinicalTimelineData(String studyId, Set sampleIds); List getDistinctClinicalEventKeys(String studyId); - Cursor getClinicalEventData(String studyId); + Cursor getClinicalEventData(String studyId, Set sampleIds); - Cursor getClinicalEvents(String studyId); + Cursor getClinicalEvents(String studyId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/CnaSegmentMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/CnaSegmentMapper.java index d0804b40632..05dd9ba450f 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/CnaSegmentMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/CnaSegmentMapper.java @@ -3,8 +3,10 @@ import org.apache.ibatis.cursor.Cursor; import org.cbioportal.application.file.model.CnaSegment; +import java.util.Set; + public interface CnaSegmentMapper { - Cursor getCnaSegments(String studyId); + Cursor getCnaSegments(String studyId, Set sampleIds); - boolean hasCnaSegments(String studyId); + boolean hasCnaSegments(String studyId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java index 75c15228d9b..b0ee9ab0b48 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GenePanelMatrixMapper.java @@ -4,12 +4,13 @@ import org.cbioportal.application.file.model.GenePanelMatrixItem; import java.util.List; +import java.util.Set; public interface GenePanelMatrixMapper { - boolean hasGenePanelMatrix(String studyId); + boolean hasGenePanelMatrix(String studyId, Set sampleIds); - Cursor getGenePanelMatrix(String studyId); + Cursor getGenePanelMatrix(String studyId, Set sampleIds); - List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId); + List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java index 43fd6684a73..c61b64b0789 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/GeneticProfileMapper.java @@ -3,7 +3,8 @@ import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; import java.util.List; +import java.util.Set; public interface GeneticProfileMapper { - List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype); + List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java index ee12424999f..39343544ebe 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/MafRecordMapper.java @@ -3,6 +3,8 @@ import org.apache.ibatis.cursor.Cursor; import org.cbioportal.application.file.model.MafRecord; +import java.util.Set; + public interface MafRecordMapper { - Cursor getMafRecords(String molecularProfileStableId); + Cursor getMafRecords(String molecularProfileStableId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java b/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java index d34153e9fbc..04d89c31e46 100644 --- a/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java +++ b/src/main/java/org/cbioportal/application/file/export/mappers/SVMapper.java @@ -3,6 +3,8 @@ import org.apache.ibatis.cursor.Cursor; import org.cbioportal.application.file.model.StructuralVariant; +import java.util.Set; + public interface SVMapper { - Cursor getStructuralVariants(String molecularProfileStableId); + Cursor getStructuralVariants(String molecularProfileStableId, Set sampleIds); } diff --git a/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java b/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java index b73c0aba970..9a3966bcef1 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/CaseListMetadataService.java @@ -4,6 +4,7 @@ import org.cbioportal.application.file.model.CaseListMetadata; import java.util.List; +import java.util.Set; public class CaseListMetadataService { @@ -13,7 +14,7 @@ public CaseListMetadataService(CaseListMetadataMapper caseListMetadataMapper) { this.caseListMetadataMapper = caseListMetadataMapper; } - public List getCaseListsMetadata(String studyId) { - return caseListMetadataMapper.getCaseListsMetadata(studyId); + public List getCaseListsMetadata(String studyId, Set sampleIds) { + return caseListMetadataMapper.getCaseListsMetadata(studyId, sampleIds); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java index ee6046f7f45..47efc2fcf60 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ClinicalAttributeDataService.java @@ -9,6 +9,7 @@ import org.cbioportal.application.file.utils.CursorAdapter; import java.util.List; +import java.util.Set; /** * Service to retrieve clinical data attributes and values for a study @@ -21,43 +22,43 @@ public ClinicalAttributeDataService(ClinicalAttributeDataMapper clinicalAttribut this.clinicalAttributeDataMapper = clinicalAttributeDataMapper; } - public CloseableIterator getClinicalSampleAttributeValues(String studyId) { - return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId)); + public CloseableIterator getClinicalSampleAttributeValues(String studyId, Set sampleIds) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalSampleAttributeValues(studyId, sampleIds)); } public List getClinicalSampleAttributes(String studyId) { return clinicalAttributeDataMapper.getClinicalSampleAttributes(studyId); } - public CloseableIterator getClinicalPatientAttributeValues(String studyId) { - return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId)); + public CloseableIterator getClinicalPatientAttributeValues(String studyId, Set sampleIds) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalPatientAttributeValues(studyId, sampleIds)); } public List getClinicalPatientAttributes(String studyId) { return clinicalAttributeDataMapper.getClinicalPatientAttributes(studyId); } - public boolean hasClinicalPatientAttributes(String studyId) { - return clinicalAttributeDataMapper.hasClinicalPatientAttributes(studyId); + public boolean hasClinicalPatientAttributes(String studyId, Set sampleIds) { + return clinicalAttributeDataMapper.hasClinicalPatientAttributes(studyId, sampleIds); } - public boolean hasClinicalSampleAttributes(String studyId) { - return clinicalAttributeDataMapper.hasClinicalSampleAttributes(studyId); + public boolean hasClinicalSampleAttributes(String studyId, Set sampleIds) { + return clinicalAttributeDataMapper.hasClinicalSampleAttributes(studyId, sampleIds); } - public boolean hasClinicalTimelineData(String studyId) { - return clinicalAttributeDataMapper.hasClinicalTimelineData(studyId); + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { + return clinicalAttributeDataMapper.hasClinicalTimelineData(studyId, sampleIds); } public List getDistinctClinicalEventKeys(String studyId) { return clinicalAttributeDataMapper.getDistinctClinicalEventKeys(studyId); } - public CloseableIterator getClinicalEventData(String studyId) { - return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEventData(studyId)); + public CloseableIterator getClinicalEventData(String studyId, Set sampleIds) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEventData(studyId, sampleIds)); } - public CloseableIterator getClinicalEvents(String studyId) { - return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEvents(studyId)); + public CloseableIterator getClinicalEvents(String studyId, Set sampleIds) { + return new CursorAdapter<>(clinicalAttributeDataMapper.getClinicalEvents(studyId, sampleIds)); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/CnaSegmentService.java b/src/main/java/org/cbioportal/application/file/export/services/CnaSegmentService.java index 3aac8353049..e88c0cb7b29 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/CnaSegmentService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/CnaSegmentService.java @@ -5,6 +5,8 @@ import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; +import java.util.Set; + public class CnaSegmentService { private final CnaSegmentMapper cnaSegmentMapper; @@ -12,11 +14,11 @@ public CnaSegmentService(CnaSegmentMapper cnaSegmentMapper) { this.cnaSegmentMapper = cnaSegmentMapper; } - public CloseableIterator getCnaSegments(String studyId) { - return new CursorAdapter<>(cnaSegmentMapper.getCnaSegments(studyId)); + public CloseableIterator getCnaSegments(String studyId, Set sampleIds) { + return new CursorAdapter<>(cnaSegmentMapper.getCnaSegments(studyId, sampleIds)); } - public boolean hasCnaSegments(String studyId) { - return cnaSegmentMapper.hasCnaSegments(studyId); + public boolean hasCnaSegments(String studyId, Set sampleIds) { + return cnaSegmentMapper.hasCnaSegments(studyId, sampleIds); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java b/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java index 65867b6e7e5..fe58adf1289 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/GenePanelMatrixService.java @@ -6,6 +6,7 @@ import org.cbioportal.application.file.utils.CursorAdapter; import java.util.List; +import java.util.Set; public class GenePanelMatrixService { private final GenePanelMatrixMapper genePanelMatrixMapper; @@ -14,15 +15,15 @@ public GenePanelMatrixService(GenePanelMatrixMapper genePanelMatrixMapper) { this.genePanelMatrixMapper = genePanelMatrixMapper; } - public boolean hasGenePanelMatrix(String studyId) { - return genePanelMatrixMapper.hasGenePanelMatrix(studyId); + public boolean hasGenePanelMatrix(String studyId, Set sampleIds) { + return genePanelMatrixMapper.hasGenePanelMatrix(studyId, sampleIds); } - public CloseableIterator getGenePanelMatrix(String studyId) { - return new CursorAdapter<>(genePanelMatrixMapper.getGenePanelMatrix(studyId)); + public CloseableIterator getGenePanelMatrix(String studyId, Set sampleIds) { + return new CursorAdapter<>(genePanelMatrixMapper.getGenePanelMatrix(studyId, sampleIds)); } - public List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId) { - return genePanelMatrixMapper.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId); + public List getDistinctGeneProfileIdsWithGenePanelMatrix(String studyId, Set sampleIds) { + return genePanelMatrixMapper.getDistinctGeneProfileIdsWithGenePanelMatrix(studyId, sampleIds); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java index fafd3b78a85..c02fbc2ba3f 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/GeneticProfileService.java @@ -4,6 +4,7 @@ import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; import java.util.List; +import java.util.Set; public class GeneticProfileService { @@ -13,7 +14,7 @@ public GeneticProfileService(GeneticProfileMapper geneticProfileMapper) { this.geneticProfileMapper = geneticProfileMapper; } - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { - return geneticProfileMapper.getGeneticProfiles(studyId, geneticAlterationType, datatype); + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { + return geneticProfileMapper.getGeneticProfiles(studyId, sampleIds, geneticAlterationType, datatype); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java b/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java index 1e35cd6d7a3..67e870f6755 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/MafRecordService.java @@ -5,6 +5,8 @@ import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; +import java.util.Set; + public class MafRecordService { private final MafRecordMapper mafRecordMapper; @@ -13,7 +15,7 @@ public MafRecordService(MafRecordMapper mafRecordMapper) { this.mafRecordMapper = mafRecordMapper; } - public CloseableIterator getMafRecords(String molecularProfileStableId) { - return new CursorAdapter<>(mafRecordMapper.getMafRecords(molecularProfileStableId)); + public CloseableIterator getMafRecords(String molecularProfileStableId, Set sampleIds) { + return new CursorAdapter<>(mafRecordMapper.getMafRecords(molecularProfileStableId, sampleIds)); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java b/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java index f1def5c92c5..0562959722f 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/StructuralVariantService.java @@ -5,6 +5,8 @@ import org.cbioportal.application.file.utils.CloseableIterator; import org.cbioportal.application.file.utils.CursorAdapter; +import java.util.Set; + public class StructuralVariantService { private final SVMapper structuralVariantMapper; @@ -13,7 +15,7 @@ public StructuralVariantService(SVMapper structuralVariantMapper) { this.structuralVariantMapper = structuralVariantMapper; } - public CloseableIterator getStructuralVariants(String geneticDatatypeStableId) { - return new CursorAdapter<>(structuralVariantMapper.getStructuralVariants(geneticDatatypeStableId)); + public CloseableIterator getStructuralVariants(String geneticDatatypeStableId, Set sampleIds) { + return new CursorAdapter<>(structuralVariantMapper.getStructuralVariants(geneticDatatypeStableId, sampleIds)); } } diff --git a/src/main/resources/mappers/export/CaseListMetadataMapper.xml b/src/main/resources/mappers/export/CaseListMetadataMapper.xml index 160190cf3a1..04c4844109f 100644 --- a/src/main/resources/mappers/export/CaseListMetadataMapper.xml +++ b/src/main/resources/mappers/export/CaseListMetadataMapper.xml @@ -26,6 +26,16 @@ JOIN cancer_study cs ON cs.CANCER_STUDY_ID = sl.CANCER_STUDY_ID JOIN sample_list_list sll ON sll.LIST_ID = sl.LIST_ID JOIN sample s ON s.INTERNAL_ID = sll.SAMPLE_ID + + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} \ No newline at end of file diff --git a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml index 63352fa8013..5bab5412008 100644 --- a/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml +++ b/src/main/resources/mappers/export/ClinicalAttributeDataMapper.xml @@ -27,7 +27,17 @@ FROM sample s JOIN patient p ON p.INTERNAL_ID = s.PATIENT_ID JOIN cancer_study cs ON cs.CANCER_STUDY_ID = p.CANCER_STUDY_ID - WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} + + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + + WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} ) diff --git a/src/main/resources/mappers/export/GenePanelMatrixMapper.xml b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml index 5728d9d0d78..57a76c85e43 100644 --- a/src/main/resources/mappers/export/GenePanelMatrixMapper.xml +++ b/src/main/resources/mappers/export/GenePanelMatrixMapper.xml @@ -8,6 +8,17 @@ FROM sample_profile sp JOIN genetic_profile gp ON gp.genetic_profile_id = sp.genetic_profile_id JOIN cancer_study cs ON cs.cancer_study_id = gp.cancer_study_id + + JOIN sample s ON s.internal_id = sp.sample_id + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + WHERE cs.cancer_study_identifier = #{studyId} AND sp.panel_id IS NOT NULL ) @@ -20,6 +31,16 @@ gpan.stable_id as genePanelStableId FROM sample_profile sp JOIN sample s ON s.internal_id = sp.sample_id + + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + JOIN gene_panel gpan ON gpan.internal_id = sp.panel_id JOIN genetic_profile gp ON gp.genetic_profile_id = sp.genetic_profile_id JOIN cancer_study cs ON cs.cancer_study_id = gp.cancer_study_id @@ -30,6 +51,17 @@ SELECT DISTINCT gp.stable_id FROM sample_profile sp + + JOIN sample s ON s.internal_id = sp.sample_id + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + JOIN genetic_profile gp ON gp.genetic_profile_id = sp.genetic_profile_id JOIN cancer_study cs ON cs.cancer_study_id = gp.cancer_study_id WHERE cs.cancer_study_identifier = #{studyId} AND sp.panel_id IS NOT NULL diff --git a/src/main/resources/mappers/export/GeneticProfileMapper.xml b/src/main/resources/mappers/export/GeneticProfileMapper.xml index c055bbe3e62..23a3b25b82b 100644 --- a/src/main/resources/mappers/export/GeneticProfileMapper.xml +++ b/src/main/resources/mappers/export/GeneticProfileMapper.xml @@ -6,19 +6,31 @@ id="getGeneticProfiles" resultType="org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata"> SELECT - cs.CANCER_STUDY_IDENTIFIER AS cancerStudyIdentifier, - gp.STABLE_ID AS stableId, - gp.NAME AS profileName, - gp.DESCRIPTION AS profileDescription, - gp.GENETIC_ALTERATION_TYPE AS geneticAlterationType, - gp.DATATYPE AS datatype, - gp.GENERIC_ASSAY_TYPE AS genericAssayType, - gp.SHOW_PROFILE_IN_ANALYSIS_TAB AS showProfileInAnalysisTab, - gp.PIVOT_THRESHOLD AS pivotThreshold, - gp.SORT_ORDER AS sortOrder, - gp.PATIENT_LEVEL AS patientLevel + cs.CANCER_STUDY_IDENTIFIER AS cancerStudyIdentifier, + gp.STABLE_ID AS stableId, + gp.NAME AS profileName, + gp.DESCRIPTION AS profileDescription, + gp.GENETIC_ALTERATION_TYPE AS geneticAlterationType, + gp.DATATYPE AS datatype, + gp.GENERIC_ASSAY_TYPE AS genericAssayType, + gp.SHOW_PROFILE_IN_ANALYSIS_TAB AS showProfileInAnalysisTab, + gp.PIVOT_THRESHOLD AS pivotThreshold, + gp.SORT_ORDER AS sortOrder, + gp.PATIENT_LEVEL AS patientLevel FROM genetic_profile gp JOIN cancer_study cs ON gp.CANCER_STUDY_ID = cs.CANCER_STUDY_ID WHERE cs.CANCER_STUDY_IDENTIFIER = #{studyId} AND gp.GENETIC_ALTERATION_TYPE = #{geneticAlterationType} AND gp.DATATYPE = #{datatype} + + AND EXISTS ( + SELECT 1 + FROM sample_profile sp + JOIN sample s ON sp.SAMPLE_ID = s.INTERNAL_ID + WHERE s.STABLE_ID IN + + #{sid} + + AND sp.GENETIC_PROFILE_ID = gp.GENETIC_PROFILE_ID + ) + \ No newline at end of file diff --git a/src/main/resources/mappers/export/MafRecordMapper.xml b/src/main/resources/mappers/export/MafRecordMapper.xml index 03719cb78c9..06d1656bc0b 100644 --- a/src/main/resources/mappers/export/MafRecordMapper.xml +++ b/src/main/resources/mappers/export/MafRecordMapper.xml @@ -7,46 +7,56 @@ resultType="org.cbioportal.application.file.model.MafRecord" resultSetType="FORWARD_ONLY"> SELECT - g.ENTREZ_GENE_ID AS entrezGeneId, - m.CENTER AS center, - g.HUGO_GENE_SYMBOL AS hugoSymbol, - me.NCBI_BUILD AS ncbiBuild, - me.CHR AS chromosome, - me.START_POSITION AS startPosition, - me.END_POSITION AS endPosition, - "+" AS strand, - me.MUTATION_TYPE AS variantClassification, - me.VARIANT_TYPE AS variantType, - me.REFERENCE_ALLELE AS referenceAllele, - me.TUMOR_SEQ_ALLELE AS tumorSeqAllele1, - me.TUMOR_SEQ_ALLELE AS tumorSeqAllele2, -- is this correct? - me.DB_SNP_RS AS dbSnpRs, - me.DB_SNP_VAL_STATUS AS dbSnpValStatus, - s.STABLE_ID AS tumorSampleBarcode, - m.MATCHED_NORM_SAMPLE_BARCODE AS matchedNormSampleBarcode, - m.MATCH_NORM_SEQ_ALLELE1 AS matchNormSeqAllele1, - m.MATCH_NORM_SEQ_ALLELE2 AS matchNormSeqAllele2, - m.TUMOR_VALIDATION_ALLELE1 AS tumorValidationAllele1, - m.TUMOR_VALIDATION_ALLELE2 AS tumorValidationAllele2, - m.MATCH_NORM_VALIDATION_ALLELE1 AS matchNormValidationAllele1, - m.MATCH_NORM_VALIDATION_ALLELE2 AS matchNormValidationAllele2, - m.VERIFICATION_STATUS AS verificationStatus, - m.VALIDATION_STATUS AS validationStatus, - m.MUTATION_STATUS AS mutationStatus, - m.SEQUENCING_PHASE AS sequencingPhase, - m.SEQUENCE_SOURCE AS sequenceSource, - m.VALIDATION_METHOD AS validationMethod, - m.SCORE AS score, - m.BAM_FILE AS bamFile, - m.SEQUENCER AS sequencer, - "" AS hgvspShort, -- how to calculate HgvpShort? - m.TUMOR_ALT_COUNT AS tAltCount, - m.TUMOR_REF_COUNT AS tRefCount, - m.NORMAL_ALT_COUNT AS nAltCount, - m.NORMAL_REF_COUNT AS nRefCount + g.ENTREZ_GENE_ID AS entrezGeneId, + m.CENTER AS center, + g.HUGO_GENE_SYMBOL AS hugoSymbol, + me.NCBI_BUILD AS ncbiBuild, + me.CHR AS chromosome, + me.START_POSITION AS startPosition, + me.END_POSITION AS endPosition, + "+" AS strand, + me.MUTATION_TYPE AS variantClassification, + me.VARIANT_TYPE AS variantType, + me.REFERENCE_ALLELE AS referenceAllele, + me.TUMOR_SEQ_ALLELE AS tumorSeqAllele1, + me.TUMOR_SEQ_ALLELE AS tumorSeqAllele2, -- is this correct? + me.DB_SNP_RS AS dbSnpRs, + me.DB_SNP_VAL_STATUS AS dbSnpValStatus, + s.STABLE_ID AS tumorSampleBarcode, + m.MATCHED_NORM_SAMPLE_BARCODE AS matchedNormSampleBarcode, + m.MATCH_NORM_SEQ_ALLELE1 AS matchNormSeqAllele1, + m.MATCH_NORM_SEQ_ALLELE2 AS matchNormSeqAllele2, + m.TUMOR_VALIDATION_ALLELE1 AS tumorValidationAllele1, + m.TUMOR_VALIDATION_ALLELE2 AS tumorValidationAllele2, + m.MATCH_NORM_VALIDATION_ALLELE1 AS matchNormValidationAllele1, + m.MATCH_NORM_VALIDATION_ALLELE2 AS matchNormValidationAllele2, + m.VERIFICATION_STATUS AS verificationStatus, + m.VALIDATION_STATUS AS validationStatus, + m.MUTATION_STATUS AS mutationStatus, + m.SEQUENCING_PHASE AS sequencingPhase, + m.SEQUENCE_SOURCE AS sequenceSource, + m.VALIDATION_METHOD AS validationMethod, + m.SCORE AS score, + m.BAM_FILE AS bamFile, + m.SEQUENCER AS sequencer, + "" AS hgvspShort, -- how to calculate HgvpShort? + m.TUMOR_ALT_COUNT AS tAltCount, + m.TUMOR_REF_COUNT AS tRefCount, + m.NORMAL_ALT_COUNT AS nAltCount, + m.NORMAL_REF_COUNT AS nRefCount FROM mutation m JOIN genetic_profile gp ON gp.GENETIC_PROFILE_ID = m.GENETIC_PROFILE_ID JOIN sample s ON s.INTERNAL_ID = m.SAMPLE_ID + + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + JOIN gene g ON g.ENTREZ_GENE_ID = m.ENTREZ_GENE_ID JOIN mutation_event me ON me.MUTATION_EVENT_ID = m.MUTATION_EVENT_ID WHERE gp.STABLE_ID = #{molecularProfileStableId} diff --git a/src/main/resources/mappers/export/SVMapper.xml b/src/main/resources/mappers/export/SVMapper.xml index b6a5d8c843a..1c213dca9e1 100644 --- a/src/main/resources/mappers/export/SVMapper.xml +++ b/src/main/resources/mappers/export/SVMapper.xml @@ -49,6 +49,16 @@ FROM structural_variant sv JOIN genetic_profile gp ON gp.genetic_profile_id = sv.genetic_profile_id JOIN sample s ON s.internal_id = sv.sample_id + + JOIN ( + SELECT * + FROM (VALUES + + ROW(#{sid}) + + ) AS temp(sample_id) + ) AS sample_ids_subquery ON sample_ids_subquery.sample_id = s.STABLE_ID + LEFT JOIN gene g1 ON g1.entrez_gene_id = sv.site1_entrez_gene_id LEFT JOIN gene g2 ON g2.entrez_gene_id = sv.site2_entrez_gene_id WHERE gp.stable_id = #{molecularProfileStableId} diff --git a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java index e0c149c77b1..0df448c0408 100644 --- a/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/CaseListsExporterTests.java @@ -8,6 +8,7 @@ import java.util.LinkedHashSet; import java.util.List; +import java.util.Set; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -18,7 +19,7 @@ public class CaseListsExporterTests { ExportDetails exportDetails = new ExportDetails("STUDY_ID"); CaseListMetadataService caseListMetadataService = new CaseListMetadataService(null) { @Override - public List getCaseListsMetadata(String studyId) { + public List getCaseListsMetadata(String studyId, Set sampleIds) { assertEquals("STUDY_ID", studyId); var caseList1 = new CaseListMetadata(); @@ -44,7 +45,7 @@ public void testNoCaseLists() { var factory = new InMemoryFileWriterFactory(); CaseListsExporter exporter = new CaseListsExporter(new CaseListMetadataService(null) { @Override - public List getCaseListsMetadata(String studyId) { + public List getCaseListsMetadata(String studyId, Set sampleIds) { return List.of(); } }); diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java index 5cbc8a5429c..16b343f6949 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalAttributeDataTypeExporterTests.java @@ -24,7 +24,7 @@ public void testNoClinicalSampleAttributeData() { boolean exported = new ClinicalSampleAttributesDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public boolean hasClinicalSampleAttributes(String studyId) { + public boolean hasClinicalSampleAttributes(String studyId, Set sampleIds) { return false; } }).exportData(factory, new ExportDetails("TEST_STUDY_ID")); @@ -87,7 +87,7 @@ public void testNoClinicalPatientAttributeData() { boolean exported = new ClinicalPatientAttributesDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public boolean hasClinicalPatientAttributes(String studyId) { + public boolean hasClinicalPatientAttributes(String studyId, Set sampleIds) { return false; } }).exportData(factory, new ExportDetails("TEST_STUDY_ID")); @@ -127,7 +127,7 @@ public void testGetClinicalPatientAttributeData() { ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(null) { @Override - public boolean hasClinicalSampleAttributes(String studyId) { + public boolean hasClinicalSampleAttributes(String studyId, Set sampleIds) { return true; } @@ -138,12 +138,12 @@ public List getClinicalSampleAttributes(String studyId) { new ClinicalAttribute("test string sample displayName", "test string sample description", "STRING", "3", "TEST_STRING_SAMPLE_ATTRIBUTE_ID")); } - public boolean hasClinicalPatientAttributes(String studyId) { + public boolean hasClinicalPatientAttributes(String studyId, Set sampleIds) { return true; } @Override - public CloseableIterator getClinicalSampleAttributeValues(String studyId) { + public CloseableIterator getClinicalSampleAttributeValues(String studyId, Set sampleIds) { return new SimpleCloseableIterator<>( List.of( new ClinicalAttributeValue(1L, "PATIENT_ID", "TEST_PATIENT_ID_1"), @@ -166,7 +166,7 @@ public List getClinicalPatientAttributes(String studyId) { } @Override - public CloseableIterator getClinicalPatientAttributeValues(String studyId) { + public CloseableIterator getClinicalPatientAttributeValues(String studyId, Set sampleIds) { return new SimpleCloseableIterator<>(List.of( new ClinicalAttributeValue(1L, "PATIENT_ID", "TEST_PATIENT_ID_1"), new ClinicalAttributeValue(1L, "TEST_STRING_PATIENT_ATTRIBUTE_ID", "C"), diff --git a/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java index ef24dec93d2..bf470d40d2e 100644 --- a/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/ClinicalTimelineDataTypeExporterTests.java @@ -22,7 +22,7 @@ public class ClinicalTimelineDataTypeExporterTests { ClinicalAttributeDataService clinicalDataAttributeDataService = new ClinicalAttributeDataService(null) { @Override - public boolean hasClinicalTimelineData(String studyId) { + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { return true; } @@ -32,12 +32,12 @@ public List getDistinctClinicalEventKeys(String studyId) { } @Override - public CloseableIterator getClinicalEvents(String studyId) { + public CloseableIterator getClinicalEvents(String studyId, Set sampleIds) { return CloseableIterator.empty(); } @Override - public CloseableIterator getClinicalEventData(String studyId) { + public CloseableIterator getClinicalEventData(String studyId, Set sampleIds) { return CloseableIterator.empty(); } }; @@ -48,7 +48,7 @@ public void testNoClinicalEvents() { ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public boolean hasClinicalTimelineData(String studyId) { + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { return false; } }); @@ -65,7 +65,7 @@ public void testMismatchedEventData() { ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public CloseableIterator getClinicalEvents(String studyId) { + public CloseableIterator getClinicalEvents(String studyId, Set sampleIds) { ClinicalEvent event1 = new ClinicalEvent(); event1.setClinicalEventId(1); event1.setPatientId("PATIENT_1"); @@ -76,7 +76,7 @@ public CloseableIterator getClinicalEvents(String studyId) { } @Override - public CloseableIterator getClinicalEventData(String studyId) { + public CloseableIterator getClinicalEventData(String studyId, Set sampleIds) { ClinicalEventData eventData = new ClinicalEventData(); eventData.setClinicalEventId(2); // Mismatched ID eventData.setKey("KEY1"); @@ -85,7 +85,7 @@ public CloseableIterator getClinicalEventData(String studyId) } @Override - public boolean hasClinicalTimelineData(String studyId) { + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { return true; } @@ -105,7 +105,7 @@ public void testExport() { ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public CloseableIterator getClinicalEvents(String studyId) { + public CloseableIterator getClinicalEvents(String studyId, Set sampleIds) { ClinicalEvent event1 = new ClinicalEvent(); event1.setClinicalEventId(1); event1.setPatientId("PATIENT_1"); @@ -120,7 +120,7 @@ public CloseableIterator getClinicalEvents(String studyId) { } @Override - public CloseableIterator getClinicalEventData(String studyId) { + public CloseableIterator getClinicalEventData(String studyId, Set sampleIds) { ClinicalEventData eventData1 = new ClinicalEventData(); eventData1.setClinicalEventId(1); eventData1.setKey("KEY1"); @@ -135,7 +135,7 @@ public CloseableIterator getClinicalEventData(String studyId) } @Override - public boolean hasClinicalTimelineData(String studyId) { + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { return true; } @@ -169,7 +169,7 @@ public void testClinicalEventDataKeyIsNull() { ClinicalTimelineDataTypeExporter exporter = new ClinicalTimelineDataTypeExporter(new ClinicalAttributeDataService(null) { @Override - public CloseableIterator getClinicalEvents(String studyId) { + public CloseableIterator getClinicalEvents(String studyId, Set sampleIds) { ClinicalEvent event = new ClinicalEvent(); event.setClinicalEventId(1); event.setPatientId("PATIENT_1"); @@ -177,7 +177,7 @@ public CloseableIterator getClinicalEvents(String studyId) { } @Override - public CloseableIterator getClinicalEventData(String studyId) { + public CloseableIterator getClinicalEventData(String studyId, Set sampleIds) { ClinicalEventData eventData = new ClinicalEventData(); eventData.setClinicalEventId(1); eventData.setKey(null); // Null key to trigger the exception @@ -186,7 +186,7 @@ public CloseableIterator getClinicalEventData(String studyId) } @Override - public boolean hasClinicalTimelineData(String studyId) { + public boolean hasClinicalTimelineData(String studyId, Set sampleIds) { return true; } diff --git a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java index b9c014dd921..39e87a0ea69 100644 --- a/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/GenericAssayLimitValueDatatypeExporterTests.java @@ -27,7 +27,7 @@ public class GenericAssayLimitValueDatatypeExporterTests { GeneticProfileService geneticProfileService = new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); metadata.setCancerStudyIdentifier(studyId); metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); @@ -360,7 +360,7 @@ public void testDoNotExportPatientLevelData() { GenericAssayLimitValueDatatypeExporter exporter = new GenericAssayLimitValueDatatypeExporter(new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); metadata.setCancerStudyIdentifier(studyId); metadata.setStableId("GENERIC_ASSAY_STABLE_ID"); diff --git a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java index 2a1145ef013..60fc5dedc81 100644 --- a/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MafDataTypeExporterTests.java @@ -22,7 +22,7 @@ public class MafDataTypeExporterTests { GeneticProfileService geneticProfileService = new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { GeneticProfileDatatypeMetadata genProf = new GeneticProfileDatatypeMetadata(); genProf.setCancerStudyIdentifier(studyId); genProf.setStableId("MAF_STABLE_ID"); @@ -38,14 +38,14 @@ public void testNotExported() { MafRecordService mafRecordService = new MafRecordService(null) { @Override - public CloseableIterator getMafRecords(String molecularProfileStableId) { + public CloseableIterator getMafRecords(String molecularProfileStableId, Set sampleIds) { return new SimpleCloseableIterator<>(emptyList()); } }; MutationExtendedDatatypeExporter mafDataTypeExporter = new MutationExtendedDatatypeExporter(new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { return emptyList(); } }, mafRecordService); @@ -61,7 +61,7 @@ public void testMafDataTypeExport() { MafRecordService mafRecordService = new MafRecordService(null) { @Override - public CloseableIterator getMafRecords(String molecularProfileStableId) { + public CloseableIterator getMafRecords(String molecularProfileStableId, Set sampleIds) { MafRecord mafRecord = new MafRecord(); mafRecord.setHugoSymbol("HUGO"); mafRecord.setEntrezGeneId("12345"); @@ -131,7 +131,7 @@ public void testMafDataTypeExportUnderAlternativeStudyId() { MafRecordService mafRecordService = new MafRecordService(null) { @Override - public CloseableIterator getMafRecords(String molecularProfileStableId) { + public CloseableIterator getMafRecords(String molecularProfileStableId, Set sampleIds) { MafRecord mafRecord = new MafRecord(); return new SimpleCloseableIterator<>(List.of(mafRecord)); } @@ -157,7 +157,7 @@ public void testMafDataTypeExportNoRows() { MafRecordService mafRecordService = new MafRecordService(null) { @Override - public CloseableIterator getMafRecords(String molecularProfileStableId) { + public CloseableIterator getMafRecords(String molecularProfileStableId, Set sampleIds) { return new SimpleCloseableIterator<>(emptyList()); } }; diff --git a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java index 4605bb26339..7f966cb28f6 100644 --- a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java @@ -26,7 +26,7 @@ public class MrnaExpressionDatatypeExporterTests { GeneticProfileService geneticProfileService = new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { GeneticProfileDatatypeMetadata metadata = new GeneticProfileDatatypeMetadata(); metadata.setCancerStudyIdentifier(studyId); metadata.setStableId("MAF_STABLE_ID"); @@ -49,7 +49,7 @@ public CloseableIterator getData(String molecularProfileStab MrnaExpressionContinuousDatatypeExporter exporter = new MrnaExpressionContinuousDatatypeExporter(new GeneticProfileService(null) { @Override - public List getGeneticProfiles(String studyId, String geneticAlterationType, String datatype) { + public List getGeneticProfiles(String studyId, Set sampleIds, String geneticAlterationType, String datatype) { return emptyList(); } }, geneticProfileDataService); From 7c4a40bd59b08ffce658c89e1e85caf4c79bbec0 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 1 May 2025 09:36:57 +0200 Subject: [PATCH 61/69] Move pre authorization check to the service layer Preparation to support export of virtual studies --- .../cbioportal/application/file/export/ExportController.java | 2 -- .../application/file/export/services/ExportService.java | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index c9926fc5bf4..794ca7b721a 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -7,7 +7,6 @@ import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; -import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; @@ -30,7 +29,6 @@ public ExportController(CancerStudyMetadataService cancerStudyMetadataService, E } @GetMapping("/export/study/{studyId}.zip") - @PreAuthorize("hasPermission(#studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") public ResponseEntity downloadStudyData(@PathVariable String studyId) { if (cancerStudyMetadataService.getCancerStudyMetadata(studyId) == null) { return ResponseEntity.notFound().build(); diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index 9f5fa8fa7c8..d8cd78651f1 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -5,6 +5,7 @@ import org.cbioportal.application.file.utils.FileWriterFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -22,6 +23,7 @@ public ExportService( } @Transactional + @PreAuthorize("hasPermission(#exportDetails.studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") @Override public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { boolean atLeastOneDataFileExportedSuccesfully = false; From 5472cdf94e2cfb19d571c94680a29f1462f821ac Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 1 May 2025 12:17:49 +0200 Subject: [PATCH 62/69] Move check for presense of study into the service As a preparation to support of Virtual Study export --- .../application/file/export/ExportConfig.java | 9 +++++++-- .../file/export/ExportController.java | 6 ++---- .../file/export/services/ExportService.java | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 6d6c2ed2fff..66f5816b667 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -46,9 +46,11 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.export.services.MafRecordService; import org.cbioportal.application.file.export.services.StructuralVariantService; +import org.cbioportal.application.security.CancerStudyPermissionEvaluator; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; @@ -115,9 +117,12 @@ public CaseListMetadataService caseListMetadataService(CaseListMetadataMapper ca return new CaseListMetadataService(caseListMetadataMapper); } + @Autowired(required = false) + public CancerStudyPermissionEvaluator cancerStudyPermissionEvaluator; + @Bean - public ExportService exportService(List exporters) { - return new ExportService(exporters); + public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, List exporters) { + return new ExportService(cancerStudyMetadataService, cancerStudyPermissionEvaluator, exporters); } @Bean("exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 794ca7b721a..2769fce7728 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -21,16 +21,14 @@ public class ExportController { private final ExportService exportService; - private final CancerStudyMetadataService cancerStudyMetadataService; - public ExportController(CancerStudyMetadataService cancerStudyMetadataService, ExportService exportService) { + public ExportController(ExportService exportService) { this.exportService = exportService; - this.cancerStudyMetadataService = cancerStudyMetadataService; } @GetMapping("/export/study/{studyId}.zip") public ResponseEntity downloadStudyData(@PathVariable String studyId) { - if (cancerStudyMetadataService.getCancerStudyMetadata(studyId) == null) { + if (!exportService.isStudyExportable(studyId)) { return ResponseEntity.notFound().build(); } diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index d8cd78651f1..e0526065436 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -2,10 +2,15 @@ import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.Exporter; +import org.cbioportal.application.file.model.CancerStudyMetadata; import org.cbioportal.application.file.utils.FileWriterFactory; +import org.cbioportal.application.security.CancerStudyPermissionEvaluator; +import org.cbioportal.legacy.utils.security.AccessLevel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.transaction.annotation.Transactional; import java.util.List; @@ -14,14 +19,27 @@ public class ExportService implements Exporter { private static final Logger LOG = LoggerFactory.getLogger(ExportService.class); + private final CancerStudyMetadataService cancerStudyMetadataService; private final List exporters; + private final CancerStudyPermissionEvaluator cancerStudyPermissionEvaluator; public ExportService( + CancerStudyMetadataService cancerStudyMetadataService, + CancerStudyPermissionEvaluator cancerStudyPermissionEvaluator, List exporters ) { + this.cancerStudyMetadataService = cancerStudyMetadataService; + this.cancerStudyPermissionEvaluator = cancerStudyPermissionEvaluator; this.exporters = exporters; } + public boolean isStudyExportable(String studyId) { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + CancerStudyMetadata cancerStudyMetadata = this.cancerStudyMetadataService.getCancerStudyMetadata(studyId); + return cancerStudyMetadata != null && (authentication == null || cancerStudyPermissionEvaluator == null || + cancerStudyPermissionEvaluator.hasPermission(authentication, studyId, "CancerStudyId", AccessLevel.READ)); + } + @Transactional @PreAuthorize("hasPermission(#exportDetails.studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") @Override From c4ebc2fb6d3074e5da7747f65e1f04df88beac76 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Thu, 1 May 2025 17:40:01 +0200 Subject: [PATCH 63/69] Enable downloading virtual studies --- .../application/file/export/ExportConfig.java | 22 ++- .../file/export/ExportController.java | 7 +- .../export/exporters/DataTypeExporter.java | 5 + .../GeneSampleWideTableDatatypeExporter.java | 90 +--------- .../GenericAssayDatatypeExporter.java | 147 ++--------------- .../GeneticAlterationTsvExporter.java | 154 ++++++++++++++++++ .../GeneticProfileDatatypeExporter.java | 2 +- .../export/exporters/MetadataExporter.java | 5 + .../ProteinLevelDatatypeExporter.java | 88 +--------- .../file/export/services/ExportService.java | 2 +- .../VirtualStudyAwareExportService.java | 74 +++++++++ .../file/utils/FileWriterFactory.java | 4 + .../utils/ZipOutputStreamWriterFactory.java | 17 +- .../util/SessionServiceRequestHandler.java | 43 ++++- .../export/InMemoryFileWriterFactory.java | 13 +- .../MrnaExpressionDatatypeExporterTests.java | 9 + 16 files changed, 367 insertions(+), 315 deletions(-) create mode 100644 src/main/java/org/cbioportal/application/file/export/exporters/GeneticAlterationTsvExporter.java create mode 100644 src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index 66f5816b667..f1986349c38 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -46,13 +46,16 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.export.services.MafRecordService; import org.cbioportal.application.file.export.services.StructuralVariantService; +import org.cbioportal.application.file.export.services.VirtualStudyAwareExportService; import org.cbioportal.application.security.CancerStudyPermissionEvaluator; +import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.condition.ConditionalOnBean; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Bean; @@ -117,14 +120,23 @@ public CaseListMetadataService caseListMetadataService(CaseListMetadataMapper ca return new CaseListMetadataService(caseListMetadataMapper); } - @Autowired(required = false) - public CancerStudyPermissionEvaluator cancerStudyPermissionEvaluator; - @Bean - public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, List exporters) { + @ConditionalOnBean(CancerStudyPermissionEvaluator.class) + public ExportService exportService(CancerStudyMetadataService cancerStudyMetadataService, CancerStudyPermissionEvaluator cancerStudyPermissionEvaluator, List exporters) { return new ExportService(cancerStudyMetadataService, cancerStudyPermissionEvaluator, exporters); } + @Bean + @ConditionalOnMissingBean(CancerStudyPermissionEvaluator.class) + public ExportService exportServiceWithoutAuth(CancerStudyMetadataService cancerStudyMetadataService, List exporters) { + return new ExportService(cancerStudyMetadataService, null, exporters); + } + + @Bean + public VirtualStudyAwareExportService virtualStudyAwareExportService(SessionServiceRequestHandler sessionServiceRequestHandler, ExportService exportService) { + return new VirtualStudyAwareExportService(sessionServiceRequestHandler, exportService); + } + @Bean("exportSqlSessionFactory") public SqlSessionFactoryBean exportSqlSessionFactory(@Qualifier("exportDataSource") DataSource dataSource, ApplicationContext applicationContext) throws IOException { SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean(); diff --git a/src/main/java/org/cbioportal/application/file/export/ExportController.java b/src/main/java/org/cbioportal/application/file/export/ExportController.java index 2769fce7728..158624ced8a 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportController.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportController.java @@ -3,6 +3,7 @@ import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.CancerStudyMetadataService; import org.cbioportal.application.file.export.services.ExportService; +import org.cbioportal.application.file.export.services.VirtualStudyAwareExportService; import org.cbioportal.application.file.utils.ZipOutputStreamWriterFactory; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.springframework.http.MediaType; @@ -20,14 +21,14 @@ @ConditionalOnProperty(name = "dynamic_study_export_mode", havingValue = "true") public class ExportController { - private final ExportService exportService; + private final VirtualStudyAwareExportService exportService; - public ExportController(ExportService exportService) { + public ExportController(VirtualStudyAwareExportService exportService) { this.exportService = exportService; } @GetMapping("/export/study/{studyId}.zip") - public ResponseEntity downloadStudyData(@PathVariable String studyId) { + public ResponseEntity downloadStudyData(@PathVariable String studyId) throws Exception { if (!exportService.isStudyExportable(studyId)) { return ResponseEntity.notFound().build(); } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java index c3d81facdeb..075dd43192b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java @@ -77,6 +77,11 @@ protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFil this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), exportDetails.getExportAsStudyId()); metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportAsStudyId).toMetadataKeyValues()); } + if (exportDetails.getSampleIds() != null && metadataSeqMap.containsKey("description")) { + LOG.debug("Updating description for {} metadata for study {} to include sample count", + this.getClass().getSimpleName(), exportDetails.getStudyId()); + metadataSeqMap.put("description", "Selection of " + exportDetails.getSampleIds().size() + " samples. Original data description:" + metadataSeqMap.get("description")); + } metadataSeqMap.put("data_filename", dataFilename); new KeyValueMetadataWriter(metaFileWriter).write(metadataSeqMap); } catch (Exception e) { diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java index 0c141f55575..af5d3e34108 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneSampleWideTableDatatypeExporter.java @@ -4,35 +4,16 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.GeneticProfileData; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; -import org.cbioportal.application.file.model.Table; -import org.cbioportal.application.file.model.TableRow; -import org.cbioportal.application.file.utils.CloseableIterator; -import java.io.IOException; -import java.util.ArrayList; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Optional; -import java.util.SequencedMap; -import java.util.Set; import java.util.function.Function; -public abstract class GeneSampleWideTableDatatypeExporter extends GeneticProfileDatatypeExporter { - - private final GeneticProfileDataService geneticProfileDataService; +public abstract class GeneSampleWideTableDatatypeExporter extends GeneticAlterationTsvExporter { public GeneSampleWideTableDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { - super(geneticProfileService); - this.geneticProfileDataService = geneticProfileDataService; - } - - @Override - protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { - return new ProfileDataExporter(metadata); + super(geneticProfileService, geneticProfileDataService); } - private static final LinkedHashMap> GENE_ROW = new LinkedHashMap<>(); static { @@ -40,66 +21,13 @@ protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { GENE_ROW.put("Entrez_Gene_Id", data -> data.getGene() == null || data.getGene().getEntrezGeneId() == null ? null : data.getGene().getEntrezGeneId().toString()); } - private class ProfileDataExporter extends GeneticProfileExporter { - private final GeneticProfileDatatypeMetadata metatdata; - - public ProfileDataExporter(GeneticProfileDatatypeMetadata metadata) { - this.metatdata = metadata; - } - - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, boolean numberOfSamplesHasToMatch) { - return new CloseableIterator<>() { - @Override - public void close() throws IOException { - geneticProfileData.close(); - } - - @Override - public boolean hasNext() { - return geneticProfileData.hasNext(); - } - - @Override - public TableRow next() { - var data = geneticProfileData.next(); - if (numberOfSamplesHasToMatch && data.getValues().size() != sampleStableIds.size()) { - throw new IllegalStateException("Number of values does not match number of sample stable IDs"); - } - var row = new LinkedHashMap(); - for (var entry : GENE_ROW.entrySet()) { - row.put(entry.getKey(), entry.getValue().apply(data)); - } - for (int i = 0; i < sampleStableIds.size(); i++) { - row.put(sampleStableIds.get(i), data.getValues().get(i)); - } - return () -> row; - } - }; - } - - @Override - protected Optional getMetadata(String studyId, Set sampleIds) { - return Optional.of(metatdata); - } + @Override + protected LinkedHashMap> getRowMappers() { + return GENE_ROW; + } - @Override - protected CloseableIterator> getData(String studyId, Set sampleIds) { - List sampleIdsList; - if (sampleIds == null) { - sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - } else { - sampleIdsList = new ArrayList<>(sampleIds); - } - for (String sampleStableId : sampleIdsList) { - if (sampleStableId == null) { - throw new IllegalStateException("Sample stable ID is null"); - } - } - var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); - var header = new LinkedHashSet(); - header.addAll(GENE_ROW.keySet()); - header.addAll(sampleIdsList); - return new Table(composeRows(geneticProfileData, sampleIdsList, sampleIds == null), header); - } + @Override + protected void setGenericEntitiesMetaProperties(GeneticProfileDatatypeMetadata metadata) { } + } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java index d885f8f0a38..167d1176313 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GenericAssayDatatypeExporter.java @@ -1,44 +1,16 @@ package org.cbioportal.application.file.export.exporters; -import com.google.common.collect.Iterators; -import com.google.common.collect.PeekingIterator; import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; -import org.cbioportal.application.file.model.GenericEntityProperty; import org.cbioportal.application.file.model.GeneticProfileData; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; -import org.cbioportal.application.file.model.Table; -import org.cbioportal.application.file.model.TableRow; -import org.cbioportal.application.file.utils.CloseableIterator; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Optional; -import java.util.SequencedMap; -import java.util.Set; import java.util.function.Function; -public abstract class GenericAssayDatatypeExporter extends GeneticProfileDatatypeExporter { - - private final GeneticProfileDataService geneticProfileDataService; - +public abstract class GenericAssayDatatypeExporter extends GeneticAlterationTsvExporter { public GenericAssayDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { - super(geneticProfileService); - this.geneticProfileDataService = geneticProfileDataService; - } - - @Override - protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { - return new GenericProfileExporter(metadata); - } - - @Override - protected String getGeneticAlterationType() { - return "GENERIC_ASSAY"; + super(geneticProfileService, geneticProfileDataService); } private static final LinkedHashMap> ROW = new LinkedHashMap<>(); @@ -46,112 +18,19 @@ protected String getGeneticAlterationType() { static { ROW.put("ENTITY_STABLE_ID", data -> data.getGeneticEntity() == null ? null : data.getGeneticEntity().getStableId()); } - private class GenericProfileExporter extends GeneticProfileExporter { - private final GeneticProfileDatatypeMetadata metatdata; - public GenericProfileExporter(GeneticProfileDatatypeMetadata metadata) { - this.metatdata = metadata; - this.metatdata.setGenericEntitiesMetaProperties( - geneticProfileDataService.getDistinctGenericEntityMetaPropertyNames(metadata.getStableId())); - } - - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, List genericEntitiesMetaProperties, CloseableIterator properties, boolean samplesNumberHasToMatch) { - PeekingIterator geneticProfileDataPeekingIterator = Iterators.peekingIterator(geneticProfileData); - PeekingIterator propertyPeekingIterator = Iterators.peekingIterator(properties); - return new CloseableIterator<>() { - @Override - public void close() throws IOException { - geneticProfileData.close(); - properties.close(); - } - - @Override - public boolean hasNext() { - return geneticProfileDataPeekingIterator.hasNext(); - } - - @Override - public TableRow next() { - var data = geneticProfileDataPeekingIterator.next(); - if (data.getGeneticEntity() == null) { - throw new IllegalStateException("Genetic entity is null"); - } - if (data.getGeneticEntity().getGeneticEntityId() == null) { - throw new IllegalStateException("Genetic entity ID is null"); - } - if (geneticProfileDataPeekingIterator.hasNext() - && geneticProfileDataPeekingIterator.peek().getGeneticEntity() != null - && geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId() != null - && data.getGeneticEntity().getGeneticEntityId() > geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId()) { - throw new IllegalStateException("Genetic entity ID is not in ascending order"); - } - if (samplesNumberHasToMatch && data.getValues().size() != sampleStableIds.size()) { - throw new IllegalStateException("Number of values does not match number of sample stable IDs"); - } - var row = new LinkedHashMap(); - for (String columnName : ROW.keySet()) { - row.put(columnName, ROW.get(columnName).apply(data)); - } - if (!genericEntitiesMetaProperties.isEmpty()) { - var propertyMap = new HashMap(); - GenericEntityProperty property = null; - while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId() <= data.getGeneticEntity().getGeneticEntityId()) { - if (propertyPeekingIterator.peek().getGeneticEntityId() < data.getGeneticEntity().getGeneticEntityId()) { - throw new IllegalStateException(String.format("%s property with genetic entity ID %d is not present in the result set.", propertyPeekingIterator.peek().getName(), propertyPeekingIterator.peek().getGeneticEntityId())); - } - property = propertyPeekingIterator.next(); - if (property.getName() == null) { - throw new IllegalStateException("Property name is null"); - } - if (property.getValue() == null) { - throw new IllegalStateException("Property value is null"); - } - propertyMap.put(property.getName(), property.getValue()); - } - if (property != null && propertyPeekingIterator.hasNext() && property.getGeneticEntityId() > propertyPeekingIterator.peek().getGeneticEntityId()) { - throw new IllegalStateException("Genetic entity ID is not in ascending order for properties"); - } - // Add the properties to the row in the order of genericEntitiesMetaProperties - for (String propertyName : genericEntitiesMetaProperties) { - row.put(propertyName, propertyMap.get(propertyName)); - } - } - for (int i = 0; i < sampleStableIds.size(); i++) { - row.put(sampleStableIds.get(i), data.getValues().get(i)); - } - return () -> row; - } - }; - } + @Override + protected LinkedHashMap> getRowMappers() { + return ROW; + } - @Override - protected Optional getMetadata(String studyId, Set sampleIds) { - return Optional.of(metatdata); - } + @Override + protected void setGenericEntitiesMetaProperties(GeneticProfileDatatypeMetadata metadata) { + metadata.setGenericEntitiesMetaProperties( + geneticProfileDataService.getDistinctGenericEntityMetaPropertyNames(metadata.getStableId())); + } - @Override - protected CloseableIterator> getData(String studyId, Set sampleIds) { - List sampleIdsList; - if (sampleIds == null) { - sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - } else { - sampleIdsList = new ArrayList<>(sampleIds); - } - for (String sampleStableId : sampleIdsList) { - if (sampleStableId == null) { - throw new IllegalStateException("Sample stable ID is null"); - } - } - var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); - CloseableIterator properties = CloseableIterator.empty(); - if (!this.metatdata.getGenericEntitiesMetaProperties().isEmpty()) { - properties = geneticProfileDataService.getGenericEntityMetaProperties(metatdata.getStableId()); - } - var header = new LinkedHashSet(); - header.addAll(ROW.keySet()); - header.addAll(this.metatdata.getGenericEntitiesMetaProperties()); - header.addAll(sampleIdsList); - return new Table(composeRows(geneticProfileData, sampleIdsList, metatdata.getGenericEntitiesMetaProperties(), properties, sampleIds == null), header); - } + protected String getGeneticAlterationType() { + return "GENERIC_ASSAY"; } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticAlterationTsvExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticAlterationTsvExporter.java new file mode 100644 index 00000000000..6383e01d24e --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticAlterationTsvExporter.java @@ -0,0 +1,154 @@ +package org.cbioportal.application.file.export.exporters; + +import com.google.common.collect.Iterators; +import com.google.common.collect.PeekingIterator; +import org.cbioportal.application.file.export.services.GeneticProfileDataService; +import org.cbioportal.application.file.export.services.GeneticProfileService; +import org.cbioportal.application.file.model.GenericEntityProperty; +import org.cbioportal.application.file.model.GeneticProfileData; +import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; +import org.cbioportal.application.file.model.Table; +import org.cbioportal.application.file.model.TableRow; +import org.cbioportal.application.file.utils.CloseableIterator; + +import java.io.IOException; +import java.util.Collection; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Optional; +import java.util.SequencedMap; +import java.util.Set; +import java.util.function.Function; + +public abstract class GeneticAlterationTsvExporter extends GeneticProfileDatatypeExporter { + + protected final GeneticProfileDataService geneticProfileDataService; + + public GeneticAlterationTsvExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { + super(geneticProfileService); + this.geneticProfileDataService = geneticProfileDataService; + } + + @Override + protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { + setGenericEntitiesMetaProperties(metadata); + return new GenericProfileExporter(metadata); + } + + private class GenericProfileExporter extends GeneticProfileExporter { + private final GeneticProfileDatatypeMetadata metadata; + + public GenericProfileExporter(GeneticProfileDatatypeMetadata metadata) { + this.metadata = metadata; + } + + @Override + protected Optional getMetadata(String studyId, Set sampleIds) { + return Optional.of(metadata); + } + + @Override + protected CloseableIterator> getData(String studyId, Set selectSampleIds) { + List sampleIdsList = geneticProfileDataService.getSampleStableIds(metadata.getStableId()); + for (String sampleStableId : sampleIdsList) { + if (sampleStableId == null) { + throw new IllegalStateException("Sample stable ID is null"); + } + } + var geneticProfileData = geneticProfileDataService.getData(metadata.getStableId()); + CloseableIterator properties = CloseableIterator.empty(); + var header = new LinkedHashSet(); + header.addAll(getRowMappers().keySet()); + if (this.metadata.getGenericEntitiesMetaProperties() != null && !this.metadata.getGenericEntitiesMetaProperties().isEmpty()) { + properties = geneticProfileDataService.getGenericEntityMetaProperties(metadata.getStableId()); + header.addAll(this.metadata.getGenericEntitiesMetaProperties()); + } + header.addAll(selectSampleIds == null ? sampleIdsList : + selectSampleIds.stream().filter(sampleIdsList::contains).toList()); + return new Table(composeRows(geneticProfileData, sampleIdsList, selectSampleIds, metadata.getGenericEntitiesMetaProperties(), properties), header); + } + } + + protected CloseableIterator composeRows(CloseableIterator geneticProfileData, + List sampleStableIds, + Collection selectSampleIds, + List genericEntitiesMetaProperties, + CloseableIterator properties) { + PeekingIterator geneticProfileDataPeekingIterator = Iterators.peekingIterator(geneticProfileData); + PeekingIterator propertyPeekingIterator = Iterators.peekingIterator(properties); + return new CloseableIterator<>() { + @Override + public void close() throws IOException { + geneticProfileData.close(); + properties.close(); + } + + @Override + public boolean hasNext() { + return geneticProfileDataPeekingIterator.hasNext(); + } + + @Override + public TableRow next() { + var data = geneticProfileDataPeekingIterator.next(); + if (data.getGeneticEntity() == null) { + throw new IllegalStateException("Genetic entity is null"); + } + if (data.getGeneticEntity().getGeneticEntityId() == null) { + throw new IllegalStateException("Genetic entity ID is null"); + } + if (geneticProfileDataPeekingIterator.hasNext() + && geneticProfileDataPeekingIterator.peek().getGeneticEntity() != null + && geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId() != null + && data.getGeneticEntity().getGeneticEntityId() > geneticProfileDataPeekingIterator.peek().getGeneticEntity().getGeneticEntityId()) { + throw new IllegalStateException("Genetic entity ID is not in ascending order"); + } + if (data.getValues().size() != sampleStableIds.size()) { + throw new IllegalStateException("Number of values does not match number of sample stable IDs"); + } + var row = new LinkedHashMap(); + LinkedHashMap> rowMappers = getRowMappers(); + for (String columnName : rowMappers.keySet()) { + row.put(columnName, rowMappers.get(columnName).apply(data)); + } + if (genericEntitiesMetaProperties != null && !genericEntitiesMetaProperties.isEmpty()) { + var propertyMap = new HashMap(); + GenericEntityProperty property = null; + while (propertyPeekingIterator.hasNext() && propertyPeekingIterator.peek().getGeneticEntityId() <= data.getGeneticEntity().getGeneticEntityId()) { + if (propertyPeekingIterator.peek().getGeneticEntityId() < data.getGeneticEntity().getGeneticEntityId()) { + throw new IllegalStateException(String.format("%s property with genetic entity ID %d is not present in the result set.", propertyPeekingIterator.peek().getName(), propertyPeekingIterator.peek().getGeneticEntityId())); + } + property = propertyPeekingIterator.next(); + if (property.getName() == null) { + throw new IllegalStateException("Property name is null"); + } + if (property.getValue() == null) { + throw new IllegalStateException("Property value is null"); + } + propertyMap.put(property.getName(), property.getValue()); + } + if (property != null && propertyPeekingIterator.hasNext() && property.getGeneticEntityId() > propertyPeekingIterator.peek().getGeneticEntityId()) { + throw new IllegalStateException("Genetic entity ID is not in ascending order for properties"); + } + // Add the properties to the row in the order of genericEntitiesMetaProperties + for (String propertyName : genericEntitiesMetaProperties) { + row.put(propertyName, propertyMap.get(propertyName)); + } + } + for (int i = 0; i < sampleStableIds.size(); i++) { + if (selectSampleIds != null && !selectSampleIds.contains(sampleStableIds.get(i))) { + continue; + } + row.put(sampleStableIds.get(i), data.getValues().get(i)); + } + return () -> row; + } + }; + } + + protected abstract LinkedHashMap> getRowMappers(); + + protected abstract void setGenericEntitiesMetaProperties(GeneticProfileDatatypeMetadata metadata); +} diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java index c29f5aa9f6d..14c5de50f3b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/GeneticProfileDatatypeExporter.java @@ -41,7 +41,7 @@ public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exp protected abstract String getDatatype(); - protected abstract class GeneticProfileExporter extends DataTypeExporter>> { + protected abstract static class GeneticProfileExporter extends DataTypeExporter>> { @Override public String getDataFilename(GeneticProfileDatatypeMetadata metadata) { return "data_" + metadata.getGeneticAlterationType().toLowerCase() diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java index e05743e1c05..a7b5a59b5be 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java @@ -39,6 +39,11 @@ protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFil LOG.debug("Writing {} metadata for {} study to file: {}", this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), metaFilename); updateStudyIdInMetadataIfNeeded(exportDetails, metadataSeqMap); // update the study ID if needed + if (exportDetails.getSampleIds() != null && metadataSeqMap.containsKey("description")) { + LOG.debug("Updating description for {} metadata for study {} to include sample count", + this.getClass().getSimpleName(), exportDetails.getStudyId()); + metadataSeqMap.put("description", "Selection of " + exportDetails.getSampleIds().size() + " samples. Original data description:" + metadataSeqMap.get("description")); + } new KeyValueMetadataWriter(metaFileWriter).write(metadataSeqMap); } catch (Exception e) { throw new RuntimeException(e); diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java index e65e7b1064c..4d78e62450b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java @@ -4,36 +4,18 @@ import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.GeneticProfileData; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; -import org.cbioportal.application.file.model.Table; -import org.cbioportal.application.file.model.TableRow; -import org.cbioportal.application.file.utils.CloseableIterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.util.ArrayList; import java.util.LinkedHashMap; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Optional; -import java.util.SequencedMap; -import java.util.Set; import java.util.function.Function; -public abstract class ProteinLevelDatatypeExporter extends GeneticProfileDatatypeExporter { +public abstract class ProteinLevelDatatypeExporter extends GeneticAlterationTsvExporter { private static final Logger LOG = LoggerFactory.getLogger(ProteinLevelDatatypeExporter.class); - private final GeneticProfileDataService geneticProfileDataService; - public ProteinLevelDatatypeExporter(GeneticProfileService geneticProfileService, GeneticProfileDataService geneticProfileDataService) { - super(geneticProfileService); - this.geneticProfileDataService = geneticProfileDataService; - } - - @Override - protected Exporter composeExporterFor(GeneticProfileDatatypeMetadata metadata) { - return new MrnaExpressionGeneticProfileExporter(metadata); + super(geneticProfileService, geneticProfileDataService); } @Override @@ -68,66 +50,12 @@ protected String getGeneticAlterationType() { }); } - private class MrnaExpressionGeneticProfileExporter extends GeneticProfileExporter { - private final GeneticProfileDatatypeMetadata metatdata; - - public MrnaExpressionGeneticProfileExporter(GeneticProfileDatatypeMetadata metadata) { - this.metatdata = metadata; - } - - private static CloseableIterator composeRows(CloseableIterator geneticProfileData, List sampleStableIds, boolean samplesNumberHasToMatch) { - return new CloseableIterator<>() { - @Override - public void close() throws IOException { - geneticProfileData.close(); - } - - @Override - public boolean hasNext() { - return geneticProfileData.hasNext(); - } - - @Override - public TableRow next() { - var data = geneticProfileData.next(); - if (samplesNumberHasToMatch && data.getValues().size() != sampleStableIds.size()) { - throw new IllegalStateException("Number of values does not match number of sample stable IDs"); - } - var row = new LinkedHashMap(); - for (var entry : ROW.entrySet()) { - row.put(entry.getKey(), entry.getValue().apply(data)); - } - for (int i = 0; i < sampleStableIds.size(); i++) { - row.put(sampleStableIds.get(i), data.getValues().get(i)); - } - return () -> row; - } - }; - } - - @Override - protected Optional getMetadata(String studyId, Set sampleIds) { - return Optional.of(metatdata); - } + @Override + protected LinkedHashMap> getRowMappers() { + return ROW; + } - @Override - protected CloseableIterator> getData(String studyId, Set sampleIds) { - List sampleIdsList; - if (sampleIds == null) { - sampleIdsList = geneticProfileDataService.getSampleStableIds(metatdata.getStableId()); - } else { - sampleIdsList = new ArrayList<>(sampleIds); - } - for (String sampleStableId : sampleIdsList) { - if (sampleStableId == null) { - throw new IllegalStateException("Sample stable ID is null"); - } - } - var geneticProfileData = geneticProfileDataService.getData(metatdata.getStableId()); - var header = new LinkedHashSet(); - header.addAll(ROW.keySet()); - header.addAll(sampleIdsList); - return new Table(composeRows(geneticProfileData, sampleIdsList, sampleIds == null), header); - } + @Override + protected void setGenericEntitiesMetaProperties(GeneticProfileDatatypeMetadata metadata) { } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java index e0526065436..c4036cd3f77 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/ExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/ExportService.java @@ -41,7 +41,7 @@ public boolean isStudyExportable(String studyId) { } @Transactional - @PreAuthorize("hasPermission(#exportDetails.studyId, 'CancerStudyId', T(org.cbioportal.utils.security.AccessLevel).READ)") + @PreAuthorize("hasPermission(#exportDetails.studyId, 'CancerStudyId', T(org.cbioportal.legacy.utils.security.AccessLevel).READ)") @Override public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { boolean atLeastOneDataFileExportedSuccesfully = false; diff --git a/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java new file mode 100644 index 00000000000..ffcc5ade3ad --- /dev/null +++ b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java @@ -0,0 +1,74 @@ +package org.cbioportal.application.file.export.services; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.cbioportal.application.file.export.exporters.ExportDetails; +import org.cbioportal.application.file.export.exporters.Exporter; +import org.cbioportal.application.file.utils.FileWriterFactory; +import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; +import org.cbioportal.legacy.web.parameter.VirtualStudy; +import org.cbioportal.legacy.web.parameter.VirtualStudySamples; + +import java.io.IOException; +import java.io.Writer; +import java.util.Set; + +public class VirtualStudyAwareExportService implements Exporter { + + private final SessionServiceRequestHandler sessionServiceRequestHandler; + private final ExportService exportService; + + public VirtualStudyAwareExportService(SessionServiceRequestHandler sessionServiceRequestHandler, ExportService exportService) { + this.sessionServiceRequestHandler = sessionServiceRequestHandler; + this.exportService = exportService; + } + + public boolean isStudyExportable(String studyId) { + var virtualStudy = sessionServiceRequestHandler.getVirtualStudyByIdIfExists(studyId); + return virtualStudy + .map(study -> study.getData() + .getStudies().stream().map(VirtualStudySamples::getId) + .allMatch(exportService::isStudyExportable)) + .orElseGet(() -> exportService.isStudyExportable(studyId)); + } + + @Override + public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { + var virtualStudyOpt = sessionServiceRequestHandler.getVirtualStudyByIdIfExists(exportDetails.getStudyId()); + if (virtualStudyOpt.isEmpty()) { + return exportService.exportData(fileWriterFactory, exportDetails); + } else { + VirtualStudy virtualStudy = virtualStudyOpt.get(); + writeVirtualStudyDefinitionJsonFile(fileWriterFactory, virtualStudy); + Set virtualStudySamples = virtualStudy.getData().getStudies(); + if (virtualStudySamples.size() == 1) { + VirtualStudySamples virtualStudySample = virtualStudySamples.iterator().next(); + ExportDetails newExportDetails = new ExportDetails(virtualStudySample.getId(), exportDetails.getStudyId(), virtualStudySample.getSamples()); + return exportService.exportData(fileWriterFactory, newExportDetails); + } else { + boolean allStudiesExported = true; + for (VirtualStudySamples virtualStudySample : virtualStudySamples) { + String exportAsStudyId = exportDetails.getStudyId() + "_" + virtualStudySample.getId(); + fileWriterFactory.setBasePath(exportAsStudyId); + ExportDetails newExportDetails = new ExportDetails(exportDetails.getStudyId(), + exportAsStudyId, + virtualStudySample.getSamples()); + allStudiesExported &= exportService.exportData( + fileWriterFactory, + newExportDetails); + } + fileWriterFactory.setBasePath(null); + return allStudiesExported; + } + } + } + + private static void writeVirtualStudyDefinitionJsonFile(FileWriterFactory fileWriterFactory, VirtualStudy virtualStudy) { + try (Writer writer = fileWriterFactory.newWriter("virtual_study_definition.json")) { + ObjectMapper mapper = new ObjectMapper(); + String json = mapper.writeValueAsString(virtualStudy); + writer.write(json); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java index f2ce5c2ec2e..75de7401b72 100644 --- a/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/FileWriterFactory.java @@ -4,6 +4,10 @@ import java.io.Writer; public interface FileWriterFactory { + void setBasePath(String basePath); + + String getBasePath(); + Writer newWriter(String name) throws IOException; void fail(Exception e); diff --git a/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java index a0072a85512..47ce22204ac 100644 --- a/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java +++ b/src/main/java/org/cbioportal/application/file/utils/ZipOutputStreamWriterFactory.java @@ -12,15 +12,30 @@ public class ZipOutputStreamWriterFactory implements FileWriterFactory, Closeabl private final OutputStream outputStream; private final ZipOutputStream zipOutputStream; + private String basePath; public ZipOutputStreamWriterFactory(OutputStream outputStream) { this.outputStream = outputStream; this.zipOutputStream = new ZipOutputStream(outputStream); } + @Override + public void setBasePath(String basePath) { + if (basePath != null) { + this.basePath = basePath.endsWith("/") ? basePath : basePath + "/"; + } else { + this.basePath = null; + } + } + + @Override + public String getBasePath() { + return basePath; + } + @Override public Writer newWriter(String name) throws IOException { - return new ZipEntryOutputStreamWriter(name, zipOutputStream); + return new ZipEntryOutputStreamWriter(basePath == null ? name : (basePath + name), zipOutputStream); } @Override diff --git a/src/main/java/org/cbioportal/legacy/service/util/SessionServiceRequestHandler.java b/src/main/java/org/cbioportal/legacy/service/util/SessionServiceRequestHandler.java index f02dc93bb52..67441c79507 100644 --- a/src/main/java/org/cbioportal/legacy/service/util/SessionServiceRequestHandler.java +++ b/src/main/java/org/cbioportal/legacy/service/util/SessionServiceRequestHandler.java @@ -1,12 +1,5 @@ package org.cbioportal.legacy.service.util; -import static org.cbioportal.legacy.utils.removeme.Session.*; - - -import java.nio.charset.Charset; -import java.util.Collections; -import java.util.List; - import com.mongodb.BasicDBObject; import org.apache.commons.codec.binary.Base64; import org.apache.commons.lang3.StringUtils; @@ -21,9 +14,19 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatusCode; import org.springframework.http.ResponseEntity; +import org.springframework.http.client.ClientHttpResponse; import org.springframework.stereotype.Component; +import org.springframework.web.client.DefaultResponseErrorHandler; import org.springframework.web.client.RestTemplate; +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.Collections; +import java.util.List; +import java.util.Optional; + +import static org.cbioportal.legacy.utils.removeme.Session.SessionType; + @Component public class SessionServiceRequestHandler { @@ -76,7 +79,7 @@ public String getSessionDataJson(SessionType type, String id) throws Exception { /** * Gets virtual study by id * @param id - id of the virtual study to read - * @return virtual study + * @return virtual study or throws exception if not found */ public VirtualStudy getVirtualStudyById(String id) { ResponseEntity responseEntity = new RestTemplate() @@ -95,6 +98,30 @@ public VirtualStudy getVirtualStudyById(String id) { return responseEntity.getBody(); } + /** + * Gets virtual study by id if exists + * + * @param id - id of the virtual study to read + * @return virtual study or empty if not found + */ + public Optional getVirtualStudyByIdIfExists(String id) { + RestTemplate restTemplate = new RestTemplate(); + restTemplate.setErrorHandler(new DefaultResponseErrorHandler() { + @Override + public boolean hasError(ClientHttpResponse response) throws IOException { + return response.getStatusCode().is5xxServerError(); + } + }); + ResponseEntity responseEntity = restTemplate + .exchange(sessionServiceURL + "/virtual_study/" + id, + HttpMethod.GET, + new HttpEntity<>(getHttpHeaders()), + VirtualStudy.class); + return responseEntity.getStatusCode().is4xxClientError() || responseEntity.getBody() == null || responseEntity.getBody().getId() == null ? + Optional.empty() + : Optional.ofNullable(responseEntity.getBody()); + } + /** * Get list of virtual studies accessible to user * @param username - user for whom get list of virtual studies diff --git a/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java index 464e552ac85..cb315b8bc00 100644 --- a/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java +++ b/src/test/java/org/cbioportal/application/file/export/InMemoryFileWriterFactory.java @@ -14,11 +14,22 @@ public class InMemoryFileWriterFactory implements FileWriterFactory { private final LinkedHashMap fileContents = new LinkedHashMap<>(); + private String basePath; + + @Override + public void setBasePath(String basePath) { + this.basePath = basePath; + } + + @Override + public String getBasePath() { + return basePath; + } @Override public Writer newWriter(String name) throws IOException { StringWriter stringWriter = new StringWriter(); - fileContents.put(name, stringWriter); + fileContents.put(basePath == null ? name : (basePath + name), stringWriter); return stringWriter; } diff --git a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java index 7f966cb28f6..4afb2c65a49 100644 --- a/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java +++ b/src/test/java/org/cbioportal/application/file/export/MrnaExpressionDatatypeExporterTests.java @@ -5,6 +5,7 @@ import org.cbioportal.application.file.export.services.GeneticProfileDataService; import org.cbioportal.application.file.export.services.GeneticProfileService; import org.cbioportal.application.file.model.Gene; +import org.cbioportal.application.file.model.GeneticEntity; import org.cbioportal.application.file.model.GeneticProfileData; import org.cbioportal.application.file.model.GeneticProfileDatatypeMetadata; import org.cbioportal.application.file.utils.CloseableIterator; @@ -71,6 +72,10 @@ public CloseableIterator getData(String molecularProfileStab gene.setHugoGeneSymbol("GENE_SYMBOL"); gene.setEntrezGeneId(12345); data.setGene(gene); + GeneticEntity geneticEntity = new GeneticEntity(); + geneticEntity.setGeneticEntityId(43210); + geneticEntity.setStableId("GENE1"); + data.setGeneticEntity(geneticEntity); data.setCommaSeparatedValues("1.23,4.56,"); return new SimpleCloseableIterator<>(List.of(data)); } @@ -142,6 +147,10 @@ public CloseableIterator getData(String molecularProfileStab gene.setHugoGeneSymbol("GENE_SYMBOL"); gene.setEntrezGeneId(12345); data.setGene(gene); + GeneticEntity geneticEntity = new GeneticEntity(); + geneticEntity.setGeneticEntityId(43210); + geneticEntity.setStableId("GENE1"); + data.setGeneticEntity(geneticEntity); data.setCommaSeparatedValues("1.23"); // Only one value return new SimpleCloseableIterator<>(List.of(data)); } From d3d8e796211e7cf35ebd3dd3bdda21d6f857b2dd Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 2 May 2025 14:40:32 +0200 Subject: [PATCH 64/69] Use CI session service instead of default remote one Fixing the test for study impor export on the build --- .github/workflows/integration-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 10732cd868d..af6d779b7a3 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -46,6 +46,7 @@ jobs: sed 's|spring.datasource.url=.*|spring.datasource.url=jdbc:mysql://cbioportal-database:3306/cbioportal?useSSL=false|' | \ sed 's|spring.datasource.username=.*|spring.datasource.username=cbio_user|' | \ sed 's|spring.datasource.password=.*|spring.datasource.password=somepassword|' | \ + sed 's|session.service.url=.*|session.service.url=http://cbioportal-session:5001/api/sessions/my_portal/|' | \ sed 's|dynamic_study_export_mode=.*|dynamic_study_export_mode=true|' \ > application.properties - name: 'Copy cgds.sql file into Docker Compose' From 32f9ce0dc538f0d4048655c6f3c1c5d19966e5ec Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 2 May 2025 16:34:28 +0200 Subject: [PATCH 65/69] Improve splitting gene name to hugo symbol and phosphosite Phosphosite can contain underscore in it's id --- .../export/exporters/ProteinLevelDatatypeExporter.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java index 4d78e62450b..42ec2525224 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ProteinLevelDatatypeExporter.java @@ -32,13 +32,12 @@ protected String getGeneticAlterationType() { } String hugoGeneSymbol = data.getGene().getHugoGeneSymbol(); if ("phosphoprotein".equals(data.getGene().getType())) { - String[] parts = hugoGeneSymbol.split("_"); - //first part is actual hugo gene symbol. the second part is the phosphosite. example of composed string: PDK1|PDK1_pS24 - if (parts.length != 2) { + int underscorePosition = hugoGeneSymbol.indexOf("_"); + if (underscorePosition == -1) { throw new IllegalStateException("Unexpected format for phosphoprotein: " + hugoGeneSymbol); } - String hgs = parts[0]; - String phosphosite = parts[1]; + String hgs = hugoGeneSymbol.substring(0, underscorePosition); + String phosphosite = hugoGeneSymbol.substring(underscorePosition + 1); if (phosphosite.charAt(0) != 'p' && phosphosite.charAt(0) != 'P') { LOG.warn("Unexpected format for phosphosite: {}", phosphosite); return hugoGeneSymbol + "|" + hugoGeneSymbol; From 2b4c552ef9af92e2c8b3b8aa324324c0c6061108 Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 2 May 2025 16:38:12 +0200 Subject: [PATCH 66/69] Override name, description, pmid and cancer type of virtual study that have one physical study in the definition --- .../application/file/export/ExportConfig.java | 2 +- .../CancerStudyMetadataExporter.java | 17 +++++++ .../export/exporters/CaseListsExporter.java | 9 ++-- .../export/exporters/DataTypeExporter.java | 8 +-- .../file/export/exporters/ExportDetails.java | 51 ++++++++++++++----- .../export/exporters/MetadataExporter.java | 20 ++++---- .../VirtualStudyAwareExportService.java | 14 ++++- 7 files changed, 87 insertions(+), 34 deletions(-) diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index f1986349c38..e5b2f017f64 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -353,7 +353,7 @@ public CaseListsExporter caseListsExporter(CaseListMetadataService caseListMetad public Exporter readmeExporter() { return (fileWriterFactory, studyDetails) -> { try (Writer readmeWriter = fileWriterFactory.newWriter("README.txt")) { - readmeWriter.write("This is a README file for the study " + Optional.ofNullable(studyDetails.getExportAsStudyId()).orElseGet(studyDetails::getStudyId) + ".\n"); + readmeWriter.write("This is a README file for the study " + Optional.ofNullable(studyDetails.getExportWithStudyId()).orElseGet(studyDetails::getStudyId) + ".\n"); readmeWriter.write(""" This study export may not include all data types available in the study, as export is implemented only for certain data types. Refer to the documentation for details on the data files included in this export. diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java index 3c93b8492e8..5e2a24bab16 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CancerStudyMetadataExporter.java @@ -4,6 +4,7 @@ import org.cbioportal.application.file.model.CancerStudyMetadata; import java.util.Optional; +import java.util.SequencedMap; /** * Exports metadata for a cancer study @@ -26,4 +27,20 @@ protected Optional getMetadata(String studyId) { return Optional.ofNullable(cancerStudyMetadataService.getCancerStudyMetadata(studyId)); } + @Override + protected void updateMetadata(ExportDetails exportDetails, SequencedMap metadataSeqMap) { + super.updateMetadata(exportDetails, metadataSeqMap); + // used primarily while downloading a Virtual Study + CancerStudyMetadata alternativeCancerStudyMetadata = new CancerStudyMetadata(); + alternativeCancerStudyMetadata.setCancerStudyIdentifier(exportDetails.getExportWithStudyId()); + alternativeCancerStudyMetadata.setName(exportDetails.getExportWithStudyName()); + alternativeCancerStudyMetadata.setDescription(exportDetails.getExportAsStudyDescription()); + alternativeCancerStudyMetadata.setPmid(exportDetails.getExportWithStudyPmid()); + alternativeCancerStudyMetadata.setTypeOfCancer(exportDetails.getExportWithStudyTypeOfCancerId()); + alternativeCancerStudyMetadata.toMetadataKeyValues().forEach((key, value) -> { + if (value != null && metadataSeqMap.containsKey(key)) { + metadataSeqMap.put(key, value); + } + }); + } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java index 38af9e4c03f..51f73ca32f6 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/CaseListsExporter.java @@ -7,7 +7,6 @@ import java.util.List; import java.util.Optional; import java.util.SequencedMap; -import java.util.Set; /** * Exports all case lists for a study @@ -53,10 +52,10 @@ protected Optional getMetadata(String studyId) { @Override - protected void updateStudyIdInMetadataIfNeeded(ExportDetails exportDetails, SequencedMap metadataSeqMap) { - super.updateStudyIdInMetadataIfNeeded(exportDetails, metadataSeqMap); - if (exportDetails.getExportAsStudyId() != null) { - metadataSeqMap.put("stable_id", exportDetails.getExportAsStudyId() + "_" + caseListMetadata.getCaseListTypeStableId()); + protected void updateMetadata(ExportDetails exportDetails, SequencedMap metadataSeqMap) { + super.updateMetadata(exportDetails, metadataSeqMap); + if (exportDetails.getExportWithStudyId() != null) { + metadataSeqMap.put("stable_id", exportDetails.getExportWithStudyId() + "_" + caseListMetadata.getCaseListTypeStableId()); } } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java index 075dd43192b..484909ebbd5 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/DataTypeExporter.java @@ -29,7 +29,7 @@ public abstract class DataTypeExporter metadataOptional = getMetadata(exportDetails.getStudyId(), exportDetails.getSampleIds()); if (metadataOptional.isEmpty()) { - LOG.debug("No metadata found for study {} by {} exporter. Skipping export of this datatype.", exportDetails.getExportAsStudyId(), getClass().getSimpleName()); + LOG.debug("No metadata found for study {} by {} exporter. Skipping export of this datatype.", exportDetails.getExportWithStudyId(), getClass().getSimpleName()); return false; } M metadata = metadataOptional.get(); @@ -72,10 +72,10 @@ protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFil SequencedMap metadataSeqMap = metadata.toMetadataKeyValues(); LOG.debug("Writing metadata (genetic alteration type: {}, datatype: {}) to file: {}", metadata.getGeneticAlterationType(), metadata.getDatatype(), metaFilename); - if (exportDetails.getExportAsStudyId() != null) { + if (exportDetails.getExportWithStudyId() != null) { LOG.debug("Exporting {} metadata for study {} as study {}", - this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), exportDetails.getExportAsStudyId()); - metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportAsStudyId).toMetadataKeyValues()); + this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), exportDetails.getExportWithStudyId()); + metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportWithStudyId).toMetadataKeyValues()); } if (exportDetails.getSampleIds() != null && metadataSeqMap.containsKey("description")) { LOG.debug("Updating description for {} metadata for study {} to include sample count", diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java index a8d2c69ea0b..b409d87e73e 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java @@ -11,37 +11,64 @@ public class ExportDetails { * The study id to export as. This is used when exporting data for a study that is not the same as the study id * e.g. when exporting a Virtual Study */ - private final String exportAsStudyId; - - private final Set sampleIds; + private String exportWithStudyId; + private Set sampleIds; + private String exportWithStudyName; + private String exportAsStudyDescription; + private String exportWithStudyPmid; + private String exportWithStudyTypeOfCancerId; public ExportDetails(String studyId) { this.studyId = studyId; - this.exportAsStudyId = null; - this.sampleIds = null; } - public ExportDetails(String studyId, String exportAsStudyId) { + public ExportDetails(String studyId, String exportWithStudyId) { this.studyId = studyId; - this.exportAsStudyId = exportAsStudyId; - this.sampleIds = null; + this.exportWithStudyId = exportWithStudyId; } - public ExportDetails(String studyId, String exportAsStudyId, Set sampleIds) { + public ExportDetails(String studyId, String exportWithStudyId, Set sampleIds) { this.studyId = studyId; - this.exportAsStudyId = exportAsStudyId; + this.exportWithStudyId = exportWithStudyId; this.sampleIds = sampleIds; } + public ExportDetails(String studyId, String exportWithStudyId, Set sampleIds, String exportWithStudyName, String exportAsStudyDescription, String exportWithStudyPmid, String exportWithStudyTypeOfCancerId) { + this.studyId = studyId; + this.exportWithStudyId = exportWithStudyId; + this.sampleIds = sampleIds; + this.exportWithStudyName = exportWithStudyName; + this.exportAsStudyDescription = exportAsStudyDescription; + this.exportWithStudyPmid = exportWithStudyPmid; + this.exportWithStudyTypeOfCancerId = exportWithStudyTypeOfCancerId; + } + public String getStudyId() { return studyId; } - public String getExportAsStudyId() { - return exportAsStudyId; + public String getExportWithStudyId() { + return exportWithStudyId; } public Set getSampleIds() { return sampleIds; } + + public String getExportWithStudyName() { + return exportWithStudyName; + } + + public String getExportAsStudyDescription() { + return exportAsStudyDescription; + } + + public String getExportWithStudyPmid() { + return exportWithStudyPmid; + } + + public String getExportWithStudyTypeOfCancerId() { + return exportWithStudyTypeOfCancerId; + } + } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java index a7b5a59b5be..c4619f6b011 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java @@ -38,23 +38,23 @@ protected void writeMetadata(FileWriterFactory fileWriterFactory, String metaFil SequencedMap metadataSeqMap = metadata.toMetadataKeyValues(); LOG.debug("Writing {} metadata for {} study to file: {}", this.getClass().getSimpleName(), metadata.getCancerStudyIdentifier(), metaFilename); - updateStudyIdInMetadataIfNeeded(exportDetails, metadataSeqMap); // update the study ID if needed - if (exportDetails.getSampleIds() != null && metadataSeqMap.containsKey("description")) { - LOG.debug("Updating description for {} metadata for study {} to include sample count", - this.getClass().getSimpleName(), exportDetails.getStudyId()); - metadataSeqMap.put("description", "Selection of " + exportDetails.getSampleIds().size() + " samples. Original data description:" + metadataSeqMap.get("description")); - } + updateMetadata(exportDetails, metadataSeqMap); // update the study metadata with the export details new KeyValueMetadataWriter(metaFileWriter).write(metadataSeqMap); } catch (Exception e) { throw new RuntimeException(e); } } - protected void updateStudyIdInMetadataIfNeeded(ExportDetails exportDetails, SequencedMap metadataSeqMap) { - if (exportDetails.getExportAsStudyId() != null) { + protected void updateMetadata(ExportDetails exportDetails, SequencedMap metadataSeqMap) { + if (exportDetails.getExportWithStudyId() != null) { LOG.debug("Exporting {} metadata for study {} as study {}", - this.getClass().getSimpleName(), exportDetails.getStudyId(), exportDetails.getExportAsStudyId()); - metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportAsStudyId).toMetadataKeyValues()); + this.getClass().getSimpleName(), exportDetails.getStudyId(), exportDetails.getExportWithStudyId()); + metadataSeqMap.putAll(((StudyRelatedMetadata) exportDetails::getExportWithStudyId).toMetadataKeyValues()); + } + if (exportDetails.getSampleIds() != null && metadataSeqMap.containsKey("description")) { + LOG.debug("Updating description for {} metadata for study {} to include sample count", + this.getClass().getSimpleName(), exportDetails.getStudyId()); + metadataSeqMap.put("description", "Selection of samples. Original data description:" + metadataSeqMap.get("description")); } } diff --git a/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java index ffcc5ade3ad..64ab43990bd 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java @@ -6,6 +6,7 @@ import org.cbioportal.application.file.utils.FileWriterFactory; import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; import org.cbioportal.legacy.web.parameter.VirtualStudy; +import org.cbioportal.legacy.web.parameter.VirtualStudyData; import org.cbioportal.legacy.web.parameter.VirtualStudySamples; import java.io.IOException; @@ -39,10 +40,19 @@ public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exp } else { VirtualStudy virtualStudy = virtualStudyOpt.get(); writeVirtualStudyDefinitionJsonFile(fileWriterFactory, virtualStudy); - Set virtualStudySamples = virtualStudy.getData().getStudies(); + VirtualStudyData virtualStudyData = virtualStudy.getData(); + Set virtualStudySamples = virtualStudyData.getStudies(); if (virtualStudySamples.size() == 1) { + String name = virtualStudyData.getName(); + String description = virtualStudyData.getDescription(); + String pmid = virtualStudyData.getPmid(); + String typeOfCancerId = virtualStudyData.getTypeOfCancerId(); VirtualStudySamples virtualStudySample = virtualStudySamples.iterator().next(); - ExportDetails newExportDetails = new ExportDetails(virtualStudySample.getId(), exportDetails.getStudyId(), virtualStudySample.getSamples()); + ExportDetails newExportDetails = new ExportDetails( + virtualStudySample.getId(), + exportDetails.getStudyId(), + virtualStudySample.getSamples(), + name, description, pmid, typeOfCancerId); return exportService.exportData(fileWriterFactory, newExportDetails); } else { boolean allStudiesExported = true; From b3e89972d09d0acbc761b42e28a86a920815fe9d Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Fri, 2 May 2025 17:12:22 +0200 Subject: [PATCH 67/69] Test Virtual Study download that is defined with multiple Materialised Studies --- .../file/export/exporters/ExportDetails.java | 12 ++ .../export/exporters/MetadataExporter.java | 2 +- .../VirtualStudyAwareExportService.java | 2 +- .../VirtualStudyAwareExportServiceTest.java | 146 ++++++++++++++++++ 4 files changed, 160 insertions(+), 2 deletions(-) create mode 100644 src/test/java/org/cbioportal/application/file/export/VirtualStudyAwareExportServiceTest.java diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java index b409d87e73e..869d6170b33 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/ExportDetails.java @@ -1,5 +1,6 @@ package org.cbioportal.application.file.export.exporters; +import java.util.Objects; import java.util.Set; public class ExportDetails { @@ -71,4 +72,15 @@ public String getExportWithStudyTypeOfCancerId() { return exportWithStudyTypeOfCancerId; } + @Override + public boolean equals(Object o) { + if (o == null || getClass() != o.getClass()) return false; + ExportDetails that = (ExportDetails) o; + return Objects.equals(studyId, that.studyId) && Objects.equals(exportWithStudyId, that.exportWithStudyId) && Objects.equals(sampleIds, that.sampleIds) && Objects.equals(exportWithStudyName, that.exportWithStudyName) && Objects.equals(exportAsStudyDescription, that.exportAsStudyDescription) && Objects.equals(exportWithStudyPmid, that.exportWithStudyPmid) && Objects.equals(exportWithStudyTypeOfCancerId, that.exportWithStudyTypeOfCancerId); + } + + @Override + public int hashCode() { + return Objects.hash(studyId, exportWithStudyId, sampleIds, exportWithStudyName, exportAsStudyDescription, exportWithStudyPmid, exportWithStudyTypeOfCancerId); + } } diff --git a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java index c4619f6b011..d7a1cdc2e6b 100644 --- a/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java +++ b/src/main/java/org/cbioportal/application/file/export/exporters/MetadataExporter.java @@ -54,7 +54,7 @@ protected void updateMetadata(ExportDetails exportDetails, SequencedMap Date: Fri, 2 May 2025 17:49:31 +0200 Subject: [PATCH 68/69] Refresh dynamic Virtual Studies before export --- .../application/file/export/ExportConfig.java | 6 +- .../VirtualStudyAwareExportService.java | 11 ++- .../legacy/service/VirtualStudyService.java | 98 +++++++++++++++++++ .../legacy/web/SessionServiceController.java | 74 ++------------ .../VirtualStudyAwareExportServiceTest.java | 16 +-- 5 files changed, 121 insertions(+), 84 deletions(-) create mode 100644 src/main/java/org/cbioportal/legacy/service/VirtualStudyService.java diff --git a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java index e5b2f017f64..6bbaaeba18e 100644 --- a/src/main/java/org/cbioportal/application/file/export/ExportConfig.java +++ b/src/main/java/org/cbioportal/application/file/export/ExportConfig.java @@ -48,7 +48,7 @@ import org.cbioportal.application.file.export.services.StructuralVariantService; import org.cbioportal.application.file.export.services.VirtualStudyAwareExportService; import org.cbioportal.application.security.CancerStudyPermissionEvaluator; -import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; +import org.cbioportal.legacy.service.VirtualStudyService; import org.cbioportal.legacy.utils.config.annotation.ConditionalOnProperty; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.annotation.MapperScan; @@ -133,8 +133,8 @@ public ExportService exportServiceWithoutAuth(CancerStudyMetadataService cancerS } @Bean - public VirtualStudyAwareExportService virtualStudyAwareExportService(SessionServiceRequestHandler sessionServiceRequestHandler, ExportService exportService) { - return new VirtualStudyAwareExportService(sessionServiceRequestHandler, exportService); + public VirtualStudyAwareExportService virtualStudyAwareExportService(VirtualStudyService virtualStudyService, ExportService exportService) { + return new VirtualStudyAwareExportService(virtualStudyService, exportService); } @Bean("exportSqlSessionFactory") diff --git a/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java index da1d47ec6ee..6d3a7eea81e 100644 --- a/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java +++ b/src/main/java/org/cbioportal/application/file/export/services/VirtualStudyAwareExportService.java @@ -4,6 +4,7 @@ import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.exporters.Exporter; import org.cbioportal.application.file.utils.FileWriterFactory; +import org.cbioportal.legacy.service.VirtualStudyService; import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; import org.cbioportal.legacy.web.parameter.VirtualStudy; import org.cbioportal.legacy.web.parameter.VirtualStudyData; @@ -15,16 +16,16 @@ public class VirtualStudyAwareExportService implements Exporter { - private final SessionServiceRequestHandler sessionServiceRequestHandler; + private final VirtualStudyService virtualStudyService; private final ExportService exportService; - public VirtualStudyAwareExportService(SessionServiceRequestHandler sessionServiceRequestHandler, ExportService exportService) { - this.sessionServiceRequestHandler = sessionServiceRequestHandler; + public VirtualStudyAwareExportService(VirtualStudyService virtualStudyService, ExportService exportService) { + this.virtualStudyService = virtualStudyService; this.exportService = exportService; } public boolean isStudyExportable(String studyId) { - var virtualStudy = sessionServiceRequestHandler.getVirtualStudyByIdIfExists(studyId); + var virtualStudy = virtualStudyService.getVirtualStudyByIdIfExists(studyId); return virtualStudy .map(study -> study.getData() .getStudies().stream().map(VirtualStudySamples::getId) @@ -34,7 +35,7 @@ public boolean isStudyExportable(String studyId) { @Override public boolean exportData(FileWriterFactory fileWriterFactory, ExportDetails exportDetails) { - var virtualStudyOpt = sessionServiceRequestHandler.getVirtualStudyByIdIfExists(exportDetails.getStudyId()); + var virtualStudyOpt = virtualStudyService.getVirtualStudyByIdIfExists(exportDetails.getStudyId()); if (virtualStudyOpt.isEmpty()) { return exportService.exportData(fileWriterFactory, exportDetails); } else { diff --git a/src/main/java/org/cbioportal/legacy/service/VirtualStudyService.java b/src/main/java/org/cbioportal/legacy/service/VirtualStudyService.java new file mode 100644 index 00000000000..f6940f09081 --- /dev/null +++ b/src/main/java/org/cbioportal/legacy/service/VirtualStudyService.java @@ -0,0 +1,98 @@ +package org.cbioportal.legacy.service; + +import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; +import org.cbioportal.legacy.web.parameter.SampleIdentifier; +import org.cbioportal.legacy.web.parameter.VirtualStudy; +import org.cbioportal.legacy.web.parameter.VirtualStudyData; +import org.cbioportal.legacy.web.parameter.VirtualStudySamples; +import org.cbioportal.legacy.web.util.StudyViewFilterApplier; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.stream.Collectors; + +@Service +public class VirtualStudyService { + private final SessionServiceRequestHandler sessionServiceRequestHandler; + private final StudyViewFilterApplier studyViewFilterApplier; + + public VirtualStudyService(SessionServiceRequestHandler sessionServiceRequestHandler, + StudyViewFilterApplier studyViewFilterApplier) { + this.sessionServiceRequestHandler = sessionServiceRequestHandler; + this.studyViewFilterApplier = studyViewFilterApplier; + } + + public VirtualStudy getVirtualStudy(String id) { + VirtualStudy virtualStudy = sessionServiceRequestHandler.getVirtualStudyById(id); + VirtualStudyData virtualStudyData = virtualStudy.getData(); + if (Boolean.TRUE.equals(virtualStudyData.getDynamic())) { + populateVirtualStudySamples(virtualStudyData); + } + return virtualStudy; + } + + public Optional getVirtualStudyByIdIfExists(String id) { + return sessionServiceRequestHandler.getVirtualStudyByIdIfExists(id).map(virtualStudy -> { + VirtualStudyData virtualStudyData = virtualStudy.getData(); + if (Boolean.TRUE.equals(virtualStudyData.getDynamic())) { + populateVirtualStudySamples(virtualStudyData); + } + return virtualStudy; + }); + } + + public List getUserVirtualStudies(String user) { + return sessionServiceRequestHandler.getVirtualStudiesAccessibleToUser(user).stream().peek(virtualStudy -> { + VirtualStudyData virtualStudyData = virtualStudy.getData(); + if (Boolean.TRUE.equals(virtualStudyData.getDynamic())) { + populateVirtualStudySamples(virtualStudyData); + } + }).toList(); + } + + /** + * This method populates the `virtualStudyData` object with a new set of sample IDs retrieved as the result of executing a query based on virtual study view filters. + * It first applies the filters defined within the study view, runs the query to fetch the relevant sample IDs, and then updates the virtualStudyData to reflect these fresh results. + * This ensures that the virtual study contains the latest sample IDs. + * + * @param virtualStudyData + */ + private void populateVirtualStudySamples(VirtualStudyData virtualStudyData) { + List sampleIdentifiers = studyViewFilterApplier.apply(virtualStudyData.getStudyViewFilter()); + Set virtualStudySamples = extractVirtualStudySamples(sampleIdentifiers); + virtualStudyData.setStudies(virtualStudySamples); + } + + /** + * Transforms list of sample identifiers to set of virtual study samples + * + * @param sampleIdentifiers + */ + private Set extractVirtualStudySamples(List sampleIdentifiers) { + Map> sampleIdsByStudyId = groupSampleIdsByStudyId(sampleIdentifiers); + return sampleIdsByStudyId.entrySet().stream().map(entry -> { + VirtualStudySamples vss = new VirtualStudySamples(); + vss.setId(entry.getKey()); + vss.setSamples(entry.getValue()); + return vss; + }).collect(Collectors.toSet()); + } + + /** + * Groups sample IDs by their study ID + * + * @param sampleIdentifiers + */ + private Map> groupSampleIdsByStudyId(List sampleIdentifiers) { + return sampleIdentifiers + .stream() + .collect( + Collectors.groupingBy( + SampleIdentifier::getStudyId, + Collectors.mapping(SampleIdentifier::getSampleId, Collectors.toSet()))); + } + +} diff --git a/src/main/java/org/cbioportal/legacy/web/SessionServiceController.java b/src/main/java/org/cbioportal/legacy/web/SessionServiceController.java index d23f3528d80..0a7cd656983 100644 --- a/src/main/java/org/cbioportal/legacy/web/SessionServiceController.java +++ b/src/main/java/org/cbioportal/legacy/web/SessionServiceController.java @@ -12,6 +12,7 @@ import io.swagger.v3.oas.annotations.responses.ApiResponse; import jakarta.servlet.http.HttpServletResponse; import jakarta.validation.constraints.Size; +import org.cbioportal.legacy.service.VirtualStudyService; import org.cbioportal.legacy.service.util.CustomAttributeWithData; import org.cbioportal.legacy.service.util.CustomDataSession; import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; @@ -23,13 +24,10 @@ import org.cbioportal.legacy.web.parameter.PageSettingsIdentifier; import org.cbioportal.legacy.web.parameter.PagingConstants; import org.cbioportal.legacy.web.parameter.ResultsPageSettings; -import org.cbioportal.legacy.web.parameter.SampleIdentifier; import org.cbioportal.legacy.web.parameter.SessionPage; import org.cbioportal.legacy.web.parameter.StudyPageSettings; import org.cbioportal.legacy.web.parameter.VirtualStudy; import org.cbioportal.legacy.web.parameter.VirtualStudyData; -import org.cbioportal.legacy.web.parameter.VirtualStudySamples; -import org.cbioportal.legacy.web.util.StudyViewFilterApplier; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; @@ -59,7 +57,6 @@ import java.util.Optional; import java.util.Set; import java.util.regex.Pattern; -import java.util.stream.Collectors; import static org.cbioportal.legacy.web.PublicVirtualStudiesController.ALL_USERS; @@ -72,19 +69,17 @@ public class SessionServiceController { private static final String QUERY_OPERATOR_ALL = "$all"; private static final String QUERY_OPERATOR_SIZE = "$size"; private static final String QUERY_OPERATOR_AND = "$and"; + private final VirtualStudyService virtualStudyService; SessionServiceRequestHandler sessionServiceRequestHandler; private ObjectMapper sessionServiceObjectMapper; - private StudyViewFilterApplier studyViewFilterApplier; - public SessionServiceController(SessionServiceRequestHandler sessionServiceRequestHandler, - ObjectMapper sessionServiceObjectMapper, - StudyViewFilterApplier studyViewFilterApplier) { + ObjectMapper sessionServiceObjectMapper, VirtualStudyService virtualStudyService) { this.sessionServiceRequestHandler = sessionServiceRequestHandler; this.sessionServiceObjectMapper = sessionServiceObjectMapper; - this.studyViewFilterApplier = studyViewFilterApplier; + this.virtualStudyService = virtualStudyService; } @Value("${session.service.url:}") @@ -222,12 +217,7 @@ public ResponseEntity getSession(@PathVariable Session.SessionType type Session session; switch (type) { case virtual_study: - VirtualStudy virtualStudy = sessionServiceObjectMapper.readValue(sessionDataJson, VirtualStudy.class); - VirtualStudyData virtualStudyData = virtualStudy.getData(); - if (Boolean.TRUE.equals(virtualStudyData.getDynamic())) { - populateVirtualStudySamples(virtualStudyData); - } - session = virtualStudy; + session = virtualStudyService.getVirtualStudy(id); break; case settings: session = sessionServiceObjectMapper.readValue(sessionDataJson, PageSettings.class); @@ -248,45 +238,6 @@ public ResponseEntity getSession(@PathVariable Session.SessionType type } } - /** - * This method populates the `virtualStudyData` object with a new set of sample IDs retrieved as the result of executing a query based on virtual study view filters. - * It first applies the filters defined within the study view, runs the query to fetch the relevant sample IDs, and then updates the virtualStudyData to reflect these fresh results. - * This ensures that the virtual study contains the latest sample IDs. - * @param virtualStudyData - */ - private void populateVirtualStudySamples(VirtualStudyData virtualStudyData) { - List sampleIdentifiers = studyViewFilterApplier.apply(virtualStudyData.getStudyViewFilter()); - Set virtualStudySamples = extractVirtualStudySamples(sampleIdentifiers); - virtualStudyData.setStudies(virtualStudySamples); - } - - /** - * Transforms list of sample identifiers to set of virtual study samples - * @param sampleIdentifiers - */ - private Set extractVirtualStudySamples(List sampleIdentifiers) { - Map> sampleIdsByStudyId = groupSampleIdsByStudyId(sampleIdentifiers); - return sampleIdsByStudyId.entrySet().stream().map(entry -> { - VirtualStudySamples vss = new VirtualStudySamples(); - vss.setId(entry.getKey()); - vss.setSamples(entry.getValue()); - return vss; - }).collect(Collectors.toSet()); - } - - /** - * Groups sample IDs by their study ID - * @param sampleIdentifiers - */ - private Map> groupSampleIdsByStudyId(List sampleIdentifiers) { - return sampleIdentifiers - .stream() - .collect( - Collectors.groupingBy( - SampleIdentifier::getStudyId, - Collectors.mapping(SampleIdentifier::getSampleId, Collectors.toSet()))); - } - @RequestMapping(value = "/virtual_study", method = RequestMethod.GET) @ApiResponse(responseCode = "200", description = "OK", content = @Content(array = @ArraySchema(schema = @Schema(implementation = VirtualStudy.class)))) @@ -295,20 +246,7 @@ public ResponseEntity> getUserStudies() throws JsonProcessing if (sessionServiceRequestHandler.isSessionServiceEnabled() && isAuthorized()) { try { - BasicDBObject basicDBObject = new BasicDBObject(); - basicDBObject.put("data.users", Pattern.compile(userName(), Pattern.CASE_INSENSITIVE)); - - RestTemplate restTemplate = new RestTemplate(); - - HttpEntity httpEntity = new HttpEntity<>(basicDBObject.toString(), sessionServiceRequestHandler.getHttpHeaders()); - - ResponseEntity> responseEntity = restTemplate.exchange( - sessionServiceURL + Session.SessionType.virtual_study + "/query/fetch", - HttpMethod.POST, - httpEntity, - new ParameterizedTypeReference>() {}); - - List virtualStudyList = responseEntity.getBody(); + List virtualStudyList = virtualStudyService.getUserVirtualStudies(userName()); return new ResponseEntity<>(virtualStudyList, HttpStatus.OK); } catch (Exception exception) { LOG.error("Error occurred", exception); diff --git a/src/test/java/org/cbioportal/application/file/export/VirtualStudyAwareExportServiceTest.java b/src/test/java/org/cbioportal/application/file/export/VirtualStudyAwareExportServiceTest.java index af4d8da6dcd..da213351c8a 100644 --- a/src/test/java/org/cbioportal/application/file/export/VirtualStudyAwareExportServiceTest.java +++ b/src/test/java/org/cbioportal/application/file/export/VirtualStudyAwareExportServiceTest.java @@ -3,7 +3,7 @@ import org.cbioportal.application.file.export.exporters.ExportDetails; import org.cbioportal.application.file.export.services.ExportService; import org.cbioportal.application.file.export.services.VirtualStudyAwareExportService; -import org.cbioportal.legacy.service.util.SessionServiceRequestHandler; +import org.cbioportal.legacy.service.VirtualStudyService; import org.cbioportal.legacy.web.parameter.VirtualStudy; import org.cbioportal.legacy.web.parameter.VirtualStudyData; import org.cbioportal.legacy.web.parameter.VirtualStudySamples; @@ -22,9 +22,9 @@ public class VirtualStudyAwareExportServiceTest { - private final SessionServiceRequestHandler sessionServiceRequestHandler = mock(SessionServiceRequestHandler.class); + private final VirtualStudyService virtualStudyService = mock(VirtualStudyService.class); private final ExportService exportService = mock(ExportService.class); - private final VirtualStudyAwareExportService service = new VirtualStudyAwareExportService(sessionServiceRequestHandler, exportService); + private final VirtualStudyAwareExportService service = new VirtualStudyAwareExportService(virtualStudyService, exportService); @Test public void testIsStudyExportableWithVirtualStudy() { @@ -36,7 +36,7 @@ public void testIsStudyExportableWithVirtualStudy() { data.setStudies(Set.of(sample1)); virtualStudy.setData(data); - when(sessionServiceRequestHandler.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) + when(virtualStudyService.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) .thenReturn(Optional.of(virtualStudy)); when(exportService.isStudyExportable("STUDY_1")).thenReturn(true); @@ -46,7 +46,7 @@ public void testIsStudyExportableWithVirtualStudy() { @Test public void testIsStudyExportableWithoutVirtualStudy() { - when(sessionServiceRequestHandler.getVirtualStudyByIdIfExists("STUDY_ID")) + when(virtualStudyService.getVirtualStudyByIdIfExists("STUDY_ID")) .thenReturn(Optional.empty()); when(exportService.isStudyExportable("STUDY_ID")).thenReturn(true); @@ -70,7 +70,7 @@ public void testExportDataForSingleStudy() { var factory = new InMemoryFileWriterFactory(); - when(sessionServiceRequestHandler.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) + when(virtualStudyService.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) .thenReturn(Optional.of(virtualStudy)); when(exportService.exportData(eq(factory), eq( new ExportDetails( @@ -109,7 +109,7 @@ public void testExportDataForMultipleStudies() { var factory = new InMemoryFileWriterFactory(); - when(sessionServiceRequestHandler.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) + when(virtualStudyService.getVirtualStudyByIdIfExists("VIRTUAL_STUDY_ID")) .thenReturn(Optional.of(virtualStudy)); when(exportService.exportData(eq(factory), eq( new ExportDetails( @@ -133,7 +133,7 @@ public void testExportDataForMultipleStudies() { @Test public void testExportDataWithoutVirtualStudy() { - when(sessionServiceRequestHandler.getVirtualStudyByIdIfExists("STUDY_ID")) + when(virtualStudyService.getVirtualStudyByIdIfExists("STUDY_ID")) .thenReturn(Optional.empty()); when(exportService.exportData(any(), any())).thenReturn(true); From b805178174a904c67db6bb9aa5c8965ff3a8ff6e Mon Sep 17 00:00:00 2001 From: Ruslan Forostianov Date: Mon, 5 May 2025 14:57:52 +0200 Subject: [PATCH 69/69] Add dynamic_study_export_mode property --- .../legacy/service/FrontendPropertiesServiceImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cbioportal/legacy/service/FrontendPropertiesServiceImpl.java b/src/main/java/org/cbioportal/legacy/service/FrontendPropertiesServiceImpl.java index 0f8f9779406..01a44dde9f7 100644 --- a/src/main/java/org/cbioportal/legacy/service/FrontendPropertiesServiceImpl.java +++ b/src/main/java/org/cbioportal/legacy/service/FrontendPropertiesServiceImpl.java @@ -194,8 +194,8 @@ public enum FrontendProperty { enable_study_tags("enable_study_tags", null), enable_darwin("enable_darwin", null), - clickhouse_mode("clickhouse_mode", "false"); - + clickhouse_mode("clickhouse_mode", "false"), + dynamic_study_export_mode("dynamic_study_export_mode", "false"); private final String propertyName;