@Override public Set<File> generateFilePath(SequencerPoolPartition partition, Dilution l) throws SubmissionException { Pool<? extends Poolable> pool = partition.getPool(); if (pool != null) { if (pool.getExperiments() != null) { Collection<Experiment> experiments = pool.getExperiments(); Experiment experiment = experiments.iterator().next(); StringBuilder filePath = new StringBuilder(); if (!"".equals(basePath)) { filePath.append( partition.getSequencerPartitionContainer().getRun().getFilePath() + "/Data/Intensities/BaseCalls/PAP/Project_" + experiment.getStudy().getProject().getAlias() + "/Sample_" + l.getLibrary().getName() + "/" + l.getLibrary().getName()); } else { filePath.append( basePath + "/" + experiment.getStudy().getProject().getAlias() + "/Sample_" + l.getLibrary().getName() + "/" + l.getLibrary().getName()); } if (l.getLibrary().getTagBarcodes() != null && !l.getLibrary().getTagBarcodes().isEmpty()) { filePath.append("_"); for (TagBarcode tb : l.getLibrary().getTagBarcodes().values()) { filePath.append(tb.getSequence()); } } filePath.append("_L00" + partition.getPartitionNumber() + "*.fastq.gz"); Set<File> files = new HashSet<File>(); files.add(new File(filePath.toString())); return files; } else { throw new SubmissionException("partition.getPool=null!"); } } else { throw new SubmissionException("Collection of experiments is empty"); } }
@Override public File generateFilePath(SequencerPoolPartition partition, LibraryDilution l) throws SubmissionException { log.debug("Generating filepaths for partition " + partition.getId()); Pool pool = partition.getPool(); if (pool != null) { if (pool.getExperiments() != null) { Collection<Experiment> experiments = pool.getExperiments(); Experiment experiment = experiments.iterator().next(); // String filePath = // lane.getFlowcell().getRun().getFilePath()+"/Data/Intensities/BaseCalls/PAP/Project_"+ String filePath = partition.getSequencerPartitionContainer().getRun().getFilePath() + "/Data/Intensities/BaseCalls/PAP/Project_" + experiment.getStudy().getProject().getAlias() + "/Sample_" + l.getLibrary().getName() + "/" + l.getLibrary().getName() + "_" + l.getLibrary().getTagBarcode().getSequence() + "_L00" + partition.getPartitionNumber() + "*.fastq.gz"; // System.out.println(filePath); File file = new File(filePath); return (file); } else { throw new SubmissionException("partition.getPool=null!"); } } else { throw new SubmissionException("Collection of experiments is empty"); } }