/** * Sort a collection of String (shorltabel). The given collection is not modified, a new one is returned. * * @param experiments collection to sort. * * @return the sorted collection. */ private static List<String> getSortedShortlabel( Collection<SimplifiedAnnotatedObject<Experiment>> experiments ) { List<String> sorted = new ArrayList<String>( experiments.size() ); for ( SimplifiedAnnotatedObject<Experiment> experiment : experiments ) { sorted.add( experiment.getShortLabel() ); } Collections.sort( sorted ); return sorted; }
/** * Sort a collection of String (shorltabel). The given collection is not modified, a new one is returned. * * @param experiments collection to sort. * * @return the sorted collection. */ private static List<String> getSortedShortlabel( Collection<SimplifiedAnnotatedObject<Experiment>> experiments ) { List<String> sorted = new ArrayList<String>( experiments.size() ); for ( SimplifiedAnnotatedObject<Experiment> experiment : experiments ) { sorted.add( experiment.getShortLabel() ); } Collections.sort( sorted ); return sorted; }
/** * Sort a collection of String (shorltabel). The given collection is not modified, a new one is returned. * * @param experiments collection to sort. * * @return the sorted collection. */ private static List<String> getSortedShortlabel( Collection<SimplifiedAnnotatedObject<Experiment>> experiments ) { List<String> sorted = new ArrayList<String>( experiments.size() ); for ( SimplifiedAnnotatedObject<Experiment> experiment : experiments ) { sorted.add( experiment.getShortLabel() ); } Collections.sort( sorted ); return sorted; }
private void createExperimentListItems( String name, Collection<SimplifiedAnnotatedObject<Experiment>> exps, Integer chunkNumber, Classification classification, Integer largeScaleChunkSize ) { List<String> labels = new ArrayList<String>(); List<String> labelsNegative = new ArrayList<String>(); for ( SimplifiedAnnotatedObject exp : exps ) { if ( isNegative( exp.getShortLabel() ) ) { labelsNegative.add( exp.getShortLabel() ); } else { labels.add( exp.getShortLabel() ); } } String parentFolders = parentFolders( exps, classification ); if ( !labels.isEmpty() ) { addToList( new ExperimentListItem( labels, name, parentFolders, false, chunkNumber, largeScaleChunkSize ), classification ); } if ( !labelsNegative.isEmpty() ) { addToList( new ExperimentListItem( labelsNegative, name, parentFolders, true, chunkNumber, largeScaleChunkSize ), classification ); } }
private void createExperimentListItems( String name, Collection<SimplifiedAnnotatedObject<Experiment>> exps, Integer chunkNumber, Classification classification, Integer largeScaleChunkSize ) { List<String> labels = new ArrayList<String>(); List<String> labelsNegative = new ArrayList<String>(); for ( SimplifiedAnnotatedObject exp : exps ) { if ( isNegative( exp.getShortLabel() ) ) { labelsNegative.add( exp.getShortLabel() ); } else { labels.add( exp.getShortLabel() ); } } String parentFolders = parentFolders( exps, classification ); if ( !labels.isEmpty() ) { addToList( new ExperimentListItem( labels, name, parentFolders, false, chunkNumber, largeScaleChunkSize ), classification ); } if ( !labelsNegative.isEmpty() ) { addToList( new ExperimentListItem( labelsNegative, name, parentFolders, true, chunkNumber, largeScaleChunkSize ), classification ); } }
private void createExperimentListItems( String name, Collection<SimplifiedAnnotatedObject<Experiment>> exps, Integer chunkNumber, Classification classification, Integer largeScaleChunkSize ) { List<String> labels = new ArrayList<String>(); List<String> labelsNegative = new ArrayList<String>(); for ( SimplifiedAnnotatedObject exp : exps ) { if ( isNegative( exp.getShortLabel() ) ) { labelsNegative.add( exp.getShortLabel() ); } else { labels.add( exp.getShortLabel() ); } } String parentFolders = parentFolders( exps, classification ); if ( !labels.isEmpty() ) { addToList( new ExperimentListItem( labels, name, parentFolders, false, chunkNumber, largeScaleChunkSize ), classification ); } if ( !labelsNegative.isEmpty() ) { addToList( new ExperimentListItem( labelsNegative, name, parentFolders, true, chunkNumber, largeScaleChunkSize ), classification ); } }
@Override public String toString() { return getAc() + " " + getShortLabel(); }
@Override public String toString() { return getAc() + " " + getShortLabel(); }
@Override public String toString() { return getAc() + " " + getShortLabel(); }
@Override public boolean equals( Object obj ) { SimplifiedAnnotatedObject o = (SimplifiedAnnotatedObject) obj; return ac.equals( o.getAc() ) && shortLabel.equals( o.getShortLabel() ); }
@Override public boolean equals( Object obj ) { SimplifiedAnnotatedObject o = (SimplifiedAnnotatedObject) obj; return ac.equals( o.getAc() ) && shortLabel.equals( o.getShortLabel() ); }
@Override public boolean equals( Object obj ) { SimplifiedAnnotatedObject o = (SimplifiedAnnotatedObject) obj; return ac.equals( o.getAc() ) && shortLabel.equals( o.getShortLabel() ); }
public void createItemClassificationBySpecies() { for ( SimplifiedAnnotatedObject<BioSource> bioSource : species2experimentSet.keySet() ) { Collection<SimplifiedAnnotatedObject<Experiment>> smallScaleExp = species2experimentSet.get( bioSource ); // split the set into subset of size under SMALL_SCALE_LIMIT String filePrefixGlobal = bioSource.getShortLabel().replace( ' ', '-' ); createExpListItems( smallScaleExp, filePrefixGlobal + "_" + SMALL, // small scale filePrefixGlobal, // large scale Classification.SPECIES ); } }
public void createItemClassificationBySpecies() { for ( SimplifiedAnnotatedObject<BioSource> bioSource : species2experimentSet.keySet() ) { Collection<SimplifiedAnnotatedObject<Experiment>> smallScaleExp = species2experimentSet.get( bioSource ); // split the set into subset of size under SMALL_SCALE_LIMIT String filePrefixGlobal = bioSource.getShortLabel().replace( ' ', '-' ); createExpListItems( smallScaleExp, filePrefixGlobal + "_" + SMALL, // small scale filePrefixGlobal, // large scale Classification.SPECIES ); } }
public void createItemClassificationBySpecies() { for ( SimplifiedAnnotatedObject<BioSource> bioSource : species2experimentSet.keySet() ) { Collection<SimplifiedAnnotatedObject<Experiment>> smallScaleExp = species2experimentSet.get( bioSource ); // split the set into subset of size under SMALL_SCALE_LIMIT String filePrefixGlobal = bioSource.getShortLabel().replace( ' ', '-' ); createExpListItems( smallScaleExp, filePrefixGlobal + "_" + SMALL, // small scale filePrefixGlobal, // large scale Classification.SPECIES ); } }