use of samTextViewer.GenomicCoords in project ASCIIGenome by dariober.
the class TrackIntervalFeatureTest method canPrintGenotypeMatrix.
@Test
public void canPrintGenotypeMatrix() throws InvalidGenomicCoordsException, IOException, ClassNotFoundException, InvalidRecordException, SQLException {
GenomicCoords gc = new GenomicCoords("1:577583-759855", 80, null, null);
String intervalFileName = "test_data/ALL.wgs.mergedSV.v8.20130502.svs.genotypes.vcf.gz";
TrackIntervalFeature tif = new TrackIntervalFeature(intervalFileName, gc);
tif.setNoFormat(true);
assertTrue(tif.printToScreen().contains("HG00096"));
}
use of samTextViewer.GenomicCoords in project ASCIIGenome by dariober.
the class TrackIntervalFeatureTest method transcriptGFFToOneLine.
@Test
public void transcriptGFFToOneLine() throws InvalidGenomicCoordsException, IOException, ClassNotFoundException, InvalidRecordException, SQLException {
String intervalFileName = "test_data/Homo_sapiens.GRCh38.86.ENST00000331789.gff3";
GenomicCoords gc = new GenomicCoords("7:5527151-5530709", 80, null, null);
TrackIntervalFeature tif = new TrackIntervalFeature(intervalFileName, gc);
tif.setNoFormat(true);
System.out.println("PRINTING:" + tif.printToScreen());
assertTrue(tif.printToScreen().startsWith("uuuuu"));
assertTrue(tif.printToScreen().endsWith("www"));
tif.setNoFormat(false);
assertTrue(tif.printToScreen().trim().startsWith("["));
}
use of samTextViewer.GenomicCoords in project ASCIIGenome by dariober.
the class TrackIntervalFeatureTest method canPrintGtfFeatures.
@Test
public void canPrintGtfFeatures() throws IOException, InvalidGenomicCoordsException, ClassNotFoundException, InvalidRecordException, SQLException, InvalidConfigException {
String intervalFileName = "test_data/refSeq.bed";
GenomicCoords gc = new GenomicCoords("chr1:1-70", 80, null, null);
TrackIntervalFeature tif = new TrackIntervalFeature(intervalFileName, gc);
tif.setNoFormat(true);
assertEquals(2, tif.getIntervalFeatureList().size());
assertEquals("||||", tif.printToScreen().substring(0, 4));
tif.setNoFormat(false);
// trim is necessary to remove escape \033
assertTrue(tif.printToScreen().trim().startsWith("["));
assertTrue(tif.printToScreen().length() > 100);
}
use of samTextViewer.GenomicCoords in project ASCIIGenome by dariober.
the class TrackIntervalFeatureTest method canHideTitle.
@Test
public void canHideTitle() throws ClassNotFoundException, InvalidColourException, IOException, InvalidGenomicCoordsException, InvalidRecordException, SQLException {
// See issue #42
String intervalFileName = "test_data/hg19.gencode_genes_v19.gtf.gz";
GenomicCoords gc = new GenomicCoords("chr7", 80, null, null);
TrackIntervalFeature tif = new TrackIntervalFeature(intervalFileName, gc);
tif.setHideTitle(true);
assertEquals("", tif.getTitle());
}
use of samTextViewer.GenomicCoords in project ASCIIGenome by dariober.
the class TrackIntervalFeatureTest method canReadFileWithComments.
@Test
public void canReadFileWithComments() throws IOException, InvalidGenomicCoordsException, ClassNotFoundException, InvalidRecordException, SQLException {
GenomicCoords gc = new GenomicCoords("chr1:1-1000000", 80, null, null);
String intervalFileName = "test_data/refSeq.bed";
TrackIntervalFeature tif = new TrackIntervalFeature(intervalFileName, gc);
assertEquals(2, tif.getFeaturesInInterval("chr1", 0, 100000).size());
}
Aggregations