Search in sources :

Example 1 with GenomeLocParser

use of org.broadinstitute.hellbender.utils.GenomeLocParser in project gatk by broadinstitute.

the class ReferenceConfidenceModelUnitTest method setUp.

@BeforeClass
public void setUp() {
    header = ArtificialReadUtils.createArtificialSamHeader(1, 1, 1000);
    rg = new SAMReadGroupRecord(RGID);
    rg.setSample(sample);
    header.addReadGroup(rg);
    parser = new GenomeLocParser(header.getSequenceDictionary());
}
Also used : SAMReadGroupRecord(htsjdk.samtools.SAMReadGroupRecord) GenomeLocParser(org.broadinstitute.hellbender.utils.GenomeLocParser) BeforeClass(org.testng.annotations.BeforeClass)

Example 2 with GenomeLocParser

use of org.broadinstitute.hellbender.utils.GenomeLocParser in project gatk by broadinstitute.

the class AssemblyResultSetUnitTest method init.

@BeforeClass
public void init() {
    header = ArtificialReadUtils.createArtificialSamHeader(1, 1, 1000000);
    genomeLocParser = new GenomeLocParser(header.getSequenceDictionary());
}
Also used : GenomeLocParser(org.broadinstitute.hellbender.utils.GenomeLocParser) BeforeClass(org.testng.annotations.BeforeClass)

Example 3 with GenomeLocParser

use of org.broadinstitute.hellbender.utils.GenomeLocParser in project gatk by broadinstitute.

the class SplitNCigarReads method onTraversalStart.

@Override
public void onTraversalStart() {
    header = getHeaderForSAMWriter();
    rnaReadTransform = REFACTOR_NDN_CIGAR_READS ? new NDNCigarReadTransformer() : ReadTransformer.identity();
    try {
        referenceReader = new CachingIndexedFastaSequenceFile(referenceArguments.getReferenceFile());
        GenomeLocParser genomeLocParser = new GenomeLocParser(getBestAvailableSequenceDictionary());
        outputWriter = createSAMWriter(OUTPUT, false);
        overhangManager = new OverhangFixingManager(header, outputWriter, genomeLocParser, referenceReader, MAX_RECORDS_IN_MEMORY, MAX_MISMATCHES_IN_OVERHANG, MAX_BASES_TO_CLIP, doNotFixOverhangs, processSecondaryAlignments);
    } catch (FileNotFoundException ex) {
        throw new UserException.CouldNotReadInputFile(referenceArguments.getReferenceFile(), ex);
    }
}
Also used : NDNCigarReadTransformer(org.broadinstitute.hellbender.transformers.NDNCigarReadTransformer) FileNotFoundException(java.io.FileNotFoundException) CachingIndexedFastaSequenceFile(org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile) UserException(org.broadinstitute.hellbender.exceptions.UserException) GenomeLocParser(org.broadinstitute.hellbender.utils.GenomeLocParser)

Example 4 with GenomeLocParser

use of org.broadinstitute.hellbender.utils.GenomeLocParser in project gatk-protected by broadinstitute.

the class ReferenceConfidenceModelUnitTest method setUp.

@BeforeClass
public void setUp() {
    header = ArtificialReadUtils.createArtificialSamHeader(1, 1, 1000);
    rg = new SAMReadGroupRecord(RGID);
    rg.setSample(sample);
    header.addReadGroup(rg);
    parser = new GenomeLocParser(header.getSequenceDictionary());
}
Also used : SAMReadGroupRecord(htsjdk.samtools.SAMReadGroupRecord) GenomeLocParser(org.broadinstitute.hellbender.utils.GenomeLocParser) BeforeClass(org.testng.annotations.BeforeClass)

Example 5 with GenomeLocParser

use of org.broadinstitute.hellbender.utils.GenomeLocParser in project gatk by broadinstitute.

the class BandPassActivityProfileUnitTest method init.

@BeforeClass
public void init() throws FileNotFoundException {
    // sequence
    ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(b37_reference_20_21));
    genomeLocParser = new GenomeLocParser(seq);
    header = new SAMFileHeader();
    seq.getSequenceDictionary().getSequences().forEach(sequence -> header.addSequence(sequence));
}
Also used : CachingIndexedFastaSequenceFile(org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile) ReferenceSequenceFile(htsjdk.samtools.reference.ReferenceSequenceFile) GenomeLocParser(org.broadinstitute.hellbender.utils.GenomeLocParser) SAMFileHeader(htsjdk.samtools.SAMFileHeader) CachingIndexedFastaSequenceFile(org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile) File(java.io.File) ReferenceSequenceFile(htsjdk.samtools.reference.ReferenceSequenceFile) BeforeClass(org.testng.annotations.BeforeClass)

Aggregations

GenomeLocParser (org.broadinstitute.hellbender.utils.GenomeLocParser)8 BeforeClass (org.testng.annotations.BeforeClass)7 CachingIndexedFastaSequenceFile (org.broadinstitute.hellbender.utils.fasta.CachingIndexedFastaSequenceFile)3 SAMFileHeader (htsjdk.samtools.SAMFileHeader)2 SAMReadGroupRecord (htsjdk.samtools.SAMReadGroupRecord)2 File (java.io.File)2 ReferenceSequenceFile (htsjdk.samtools.reference.ReferenceSequenceFile)1 FileNotFoundException (java.io.FileNotFoundException)1 UserException (org.broadinstitute.hellbender.exceptions.UserException)1 NDNCigarReadTransformer (org.broadinstitute.hellbender.transformers.NDNCigarReadTransformer)1