use of com.github.lindenb.jvarkit.util.illumina.FastQName in project jvarkit by lindenb.
the class NgsFilesScanner method getFastqSampleInDirectory.
private Counter<String> getFastqSampleInDirectory(File f) {
if (f == null || !f.isDirectory() || !f.exists() || !f.canRead())
return EMPTY_COUNTER;
File[] array = f.listFiles(this.fastqFilter);
if (array == null)
return EMPTY_COUNTER;
Counter<String> fastqSamples = new Counter<String>();
for (File f2 : array) {
FastQName fqName = FastQName.parse(f2);
if (fqName.isValid() && fqName.getSample() != null) {
fastqSamples.incr(fqName.getSample(), f2.length());
}
}
return fastqSamples;
}
use of com.github.lindenb.jvarkit.util.illumina.FastQName in project jvarkit by lindenb.
the class NgsFilesSummary method readFastq.
@Override
protected void readFastq(final File f) {
// File parent=f.getParentFile();
// if(parent==null || super.VERBOSITY==Log.LogLevel.) return;
final FastQName fq = FastQName.parse(f);
if (!fq.isValid()) {
// bad name
return;
}
print(fq.getSample(), InfoType.FASTQ, f);
}