@Test public void extractAssayGroupIdsProteomics() { String[] tsvFileHeader = ("GeneID\tg1.SpectralCount\tg2.SpectralCount\tg3.SpectralCount\tg4.SpectralCount\tg5.SpectralCount\t" + "g6.SpectralCount\tg7.SpectralCount\tg8.SpectralCount\tg9.SpectralCount\tg10.SpectralCount\t" + "g11.SpectralCount\tg12.SpectralCount\tg13.SpectralCount\tg14.SpectralCount\t" + "g15.SpectralCount\tg16.SpectralCount\tg17.SpectralCount\tg18.SpectralCount\t" + "g19.SpectralCount\tg20.SpectralCount\tg21.SpectralCount\tg22.SpectralCount\t" + "g23.SpectralCount\tg24.SpectralCount\tg25.SpectralCount\tg26.SpectralCount\t" + "g27.SpectralCount\tg28.SpectralCount\tg29.SpectralCount\tg30.SpectralCount\t" + "g1.WithInSampleAbundance\tg2.WithInSampleAbundance\tg3.WithInSampleAbundance\t" + "g4.WithInSampleAbundance\tg5.WithInSampleAbundance\tg6.WithInSampleAbundance\t" + "g7.WithInSampleAbundance\tg8.WithInSampleAbundance\tg9.WithInSampleAbundance\t" + "g10.WithInSampleAbundance\tg11.WithInSampleAbundance\tg12.WithInSampleAbundance\t" + "g13.WithInSampleAbundance\tg14.WithInSampleAbundance\tg15.WithInSampleAbundance\t" + "g16.WithInSampleAbundance\tg17.WithInSampleAbundance\tg18.WithInSampleAbundance\t" + "g19.WithInSampleAbundance\tg20.WithInSampleAbundance\tg21.WithInSampleAbundance\t" + "g22.WithInSampleAbundance\tg23.WithInSampleAbundance\tg24.WithInSampleAbundance\t" + "g25.WithInSampleAbundance\tg26.WithInSampleAbundance\tg27.WithInSampleAbundance\t" + "g28.WithInSampleAbundance\tg29.WithInSampleAbundance\tg30.WithInSampleAbundance").split("\t"); assertThat(subject.proteomicsIdsFromHeader(tsvFileHeader), is(new String[]{"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g9", "g10", "g11", "g12", "g13", "g14", "g15", "g16", "g17", "g18", "g19", "g20", "g21", "g22", "g23", "g24", "g25", "g26", "g27", "g28", "g29", "g30"})); }
String[] proteomicsIdsFromHeader(String[] header) { return StringArrayUtil.substringBefore(StringArrayUtil.filterBySubstring(header, "WithInSampleAbundance"), "."); }
ExpressionAtlasExperimentChecker implements ExperimentChecker { String[] proteomicsIdsFromHeader(String[] header) { return StringArrayUtil.substringBefore(StringArrayUtil.filterBySubstring(header, "WithInSampleAbundance"), "."); } }
ExpressionAtlasExperimentChecker implements ExperimentChecker { String[] proteomicsIdsFromHeader(String[] header) { return StringArrayUtil.substringBefore(StringArrayUtil.filterBySubstring(header, "WithInSampleAbundance"), "."); } @Inject  ExpressionAtlasExperimentChecker(DataFileHub dataFileHub,
                                            ConfigurationTrader configurationTrader); }
ExpressionAtlasExperimentChecker implements ExperimentChecker { String[] proteomicsIdsFromHeader(String[] header) { return StringArrayUtil.substringBefore(StringArrayUtil.filterBySubstring(header, "WithInSampleAbundance"), "."); } @Inject  ExpressionAtlasExperimentChecker(DataFileHub dataFileHub,
                                            ConfigurationTrader configurationTrader); @Override void checkAllFiles(String experimentAccession, ExperimentType experimentType); }
ExpressionAtlasExperimentChecker implements ExperimentChecker { String[] proteomicsIdsFromHeader(String[] header) { return StringArrayUtil.substringBefore(StringArrayUtil.filterBySubstring(header, "WithInSampleAbundance"), "."); } @Inject  ExpressionAtlasExperimentChecker(DataFileHub dataFileHub,
                                            ConfigurationTrader configurationTrader); @Override void checkAllFiles(String experimentAccession, ExperimentType experimentType);  }