Package org.broad.igv.util

Examples of org.broad.igv.util.ResourceLocator


public class TrackMenuUtilsTest extends AbstractHeadlessTest {

    @Test
    public void testExportData_BED() throws Exception{
        TrackLoader loader = new TrackLoader();
        ResourceLocator locator = new ResourceLocator(TestUtils.DATA_DIR + "bed/test.bed");
        List<Track> loadedTrack = loader.load(locator, genome);

        String outPath = TestUtils.TMP_OUTPUT_DIR + "tmpOut.bed";

        String chr = "chr1";
View Full Code Here


*/
public class GWASParserTest extends AbstractHeadlessTest {

    @Test
    public void testParse_underflows() throws Exception {
        GWASParser parser = new GWASParser(new ResourceLocator(TestUtils.DATA_DIR + "gwas/smallp.gwas"), genome);
        GWASData data = parser.parse();
        LinkedHashMap<String, DoubleArrayList> values = data.getValues();
        for (String chr : values.keySet()) {
            DoubleArrayList floats = values.get(chr);
            for (int ff = 0; ff < floats.size(); ff++) {
View Full Code Here

        }
    }

    @Test
    public void testParseStarts() throws Exception {
        GWASParser parser = new GWASParser(new ResourceLocator(TestUtils.DATA_DIR + "gwas/smallp.gwas"), genome);
        GWASData data = parser.parse();
        IntArrayList startLocs = data.getLocations().get("chr6");

        int[] expStarts = {29622220,29623739,29623739};
        for(int ii=0; ii < expStarts.length; ii++){
View Full Code Here

        String path = "random.gwas";
        tstParseBad(path);
    }

    public void tstParseBad(String finame) throws Exception {
        GWASParser parser = new GWASParser(new ResourceLocator(TestUtils.DATA_DIR + "gwas/" + finame), genome);
        boolean excepted = false;
        try {
            GWASData data = parser.parse();
        } catch (ParserException e) {
            excepted = true;
View Full Code Here

    }

    @Test
    public void testLoadGWAS() throws Exception{
        ResourceLocator locator = new ResourceLocator(TestUtils.DATA_DIR + "gwas/smallp.gwas");
        List<Track> tracks = (new TrackLoader()).load(locator, genome);
        GWASTrack track = (GWASTrack) tracks.get(0);
        String desc = track.getDescription("chr6", 1);

        String[] lines = desc.split("<br>");
View Full Code Here

    public void testMissingFieldInCommaSeparated() throws Exception{

        String filePath = TestUtils.DATA_DIR + "vcf/missingFields.vcf";
        TestUtils.createIndex(filePath);

        TribbleFeatureSource src = TribbleFeatureSource.getFeatureSource(new ResourceLocator(filePath), genome);

        Iterator iter = src.getFeatures("chr2", 3321000, 13346000);

        int count = 0;
        boolean found = false;
View Full Code Here

        exec.loadFiles(urlPath, index, coverage, name, locus, merge, params);
        List<Track> tracks = igv.getAllTracks();
        // Find our alignment track
        boolean foundTrack = false;
        for(Track t : tracks) {
            ResourceLocator rl = t.getResourceLocator();
            if(rl != null && rl.getPath().equals(urlPath)) {
               foundTrack = true;
            }
        }
        assertTrue(foundTrack);
    }
View Full Code Here

    @Test
    public void testReadRelativePaths() throws Exception {
        String sessionPath = TestUtils.DATA_DIR + "sessions/testBedsRelPath.xml";
        Session session = new Session(sessionPath);

        InputStream inputStream = ParsingUtils.openInputStreamGZ(new ResourceLocator(sessionPath));
        Document document = Utilities.createDOMDocumentFromXmlStream(inputStream);
        NodeList elements = document.getElementsByTagName("Resource");

        sessionReader.dataFiles = new ArrayList<ResourceLocator>();
        for (int el = 0; el < elements.getLength(); el++) {
View Full Code Here

            System.out.println(e);
            Assume.assumeNoException(e);
        }
        Assume.assumeTrue(errorsResetting == 0);

        source = new VariantReviewSource(new ResourceLocator(dbSpecPath));
    }
View Full Code Here

    }

    @Test
    public void testGetSummaryScoresForSNPs() throws Exception {

        ResourceLocator locator = new ResourceLocator(TestUtils.DATA_DIR + "cn/multi_snp.cn");
        Genome genome = TestUtils.loadGenome();
        IGVDataset ds = new IGVDataset(locator, genome);
        DatasetDataSource dataSource = new DatasetDataSource("Sample1", ds, genome);
        String chr = "chr10";
View Full Code Here

TOP

Related Classes of org.broad.igv.util.ResourceLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.