use of htsjdk.samtools.SAMFileHeader in project gatk by broadinstitute.
the class SATagBuilderUnitTests method testEmptyNMTagSupport.
@Test
public void testEmptyNMTagSupport() {
SAMFileHeader header = ArtificialReadUtils.createArtificialSamHeader();
GATKRead read = ArtificialReadUtils.createArtificialRead(header, "name", "2", 1, "AAAAAAAAAA".getBytes(), "##########".getBytes());
read.setAttribute("SA", "1,191,-,8M2S,60,*;");
List<GATKRead> reads = (new SATagBuilder(read)).getArtificialReadsBasedOnSATag(header);
Assert.assertFalse(reads.get(0).hasAttribute("NM"));
}
use of htsjdk.samtools.SAMFileHeader in project gatk by broadinstitute.
the class ActivityProfileUnitTest method init.
@BeforeClass
public void init() throws FileNotFoundException {
// sequence
ReferenceSequenceFile seq = new CachingIndexedFastaSequenceFile(new File(b37_reference_20_21));
genomeLocParser = new GenomeLocParser(seq);
startLoc = genomeLocParser.createGenomeLoc("20", 0, 1, 100);
header = new SAMFileHeader();
seq.getSequenceDictionary().getSequences().forEach(sequence -> header.addSequence(sequence));
}
use of htsjdk.samtools.SAMFileHeader 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));
}
use of htsjdk.samtools.SAMFileHeader in project gatk by broadinstitute.
the class ReadClipperUnitTest method testSoftClippingOpEdgeCase.
// This test depends on issue #2022 as it tests the current behavior of the clipping operation
@Test
public void testSoftClippingOpEdgeCase() {
final SAMFileHeader header = new SAMFileHeader();
header.setSequenceDictionary(hg19GenomeLocParser.getSequenceDictionary());
GATKRead read = ReadClipperTestUtils.makeReadFromCigar("8M");
ReadClipper clipper = new ReadClipper(read);
ClippingOp op = new ClippingOp(0, 7);
clipper.addOp(op);
GATKRead softResult = clipper.clipRead(ClippingRepresentation.SOFTCLIP_BASES);
Assert.assertEquals(softResult.getCigar().toString(), "7S1M");
}
use of htsjdk.samtools.SAMFileHeader in project gatk by broadinstitute.
the class ActivityProfileStateUnitTest method init.
@BeforeClass
public void init() {
// sequence
final SAMFileHeader header = ArtificialReadUtils.createArtificialSamHeader(1, 1, 100);
sequenceDictionary = header.getSequenceDictionary();
}
Aggregations