Skip to content

Instantly share code, notes, and snippets.

@ChrisBeaumont
Last active November 24, 2015 01:20
Show Gist options
  • Save ChrisBeaumont/2a4ec1719e8cf7cef8bb to your computer and use it in GitHub Desktop.
Save ChrisBeaumont/2a4ec1719e8cf7cef8bb to your computer and use it in GitHub Desktop.
<testsuite errors="0" failures="0" name="pytest" skips="0" tests="60" time="13.315">
<testcase classname="snpeff_annotator.tests.test_annotation.TestAnnotator" name="test_parse_annotate" time="13.1365170479">
<system-out><![CDATA[Annotating 1 alleles
]]></system-out>
</testcase>
<testcase classname="snpeff_annotator.tests.test_annotation.TestAnnotator" name="test_parse_vcf" time="0.000435829162598"/>
<testcase classname="dbnsfp_annotator.tests.test_annotation.TestAnnotator" name="test_get_one_absent" time="0.017"/>
<testcase classname="dbnsfp_annotator.tests.test_annotation.TestAnnotator" name="test_get_one_present" time="0.017"/>
<testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_all" time="0.000">
<skipped message="Broken" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken
]]></skipped>
</testcase>
<testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_annotated_since" time="0.000">
<skipped message="Broken" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken
]]></skipped>
</testcase>
<testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_one" time="0.003"/>
<testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_empty" time="0.000"/>
<testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_merge" time="0.000"/>
<testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_replace" time="0.000"/>
<testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_unset" time="0.000"/>
<testcase classname="alamut_annotator.tests.test_annotation" name="test_annotate" time="0.0188210010529">
<system-out><![CDATA[Errors occured during Alamut annotation:
86005e5d3a30e8a81cd0c8b1c32fd0be2ad88ec1 (chr14:70690919 G/C): Not on a known gene
ce0033b0844387ee13f15f1500493b3a926e03f7 (chr14:70694285 T/C): Not on a known gene
42eb8a2745060a23cf7b97eebbce361784084e07 (chr14:71880739 G/C): Not on a known gene
3f16e1ab71444c5bcb2ef57c3bd7ec79d23bd9ae (chr14:73428576 A/G): Not on a known gene
eadd40ebb1d53c234d988816158aee7d8fa663e1 (chr14:74077752 A/G): Not on a known gene
]]></system-out>
</testcase>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_allele_annotations" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_allele_annotations_missing" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_equality" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_from_tsv" time="0.001"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_from_vcf" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_has_annotator_true" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_init_malformed_annotation" time="0.002">
<system-err>/usr/lib/python2.7/unittest/case.py:342: RuntimeWarning: TestResult has no addExpectedFailure method, reporting as passes
RuntimeWarning)
</system-err>
</testcase>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_init_timestamps" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_is_reference_true" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_annotations" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_annotations_fail" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_sorted" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_unsorted" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_tsv" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_vcf" time="0.000"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_vcf_roundtrip" time="0.001"/>
<testcase classname="annotations.tests.test_allele.TestAllele" name="tests_has_annotator_false" time="0.000"/>
<testcase classname="annotations.tests.test_annotation.TestAnnotation" name="test_register_annotator" time="0.015"/>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_annotator" time="0.065">
<system-err>/home/go/work/pipelines/make-ci-01/code/lib/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:3758: SAWarning: Textual SQL expression '1 = 1' should be explicitly declared as text('1 = 1') (this warning may be suppressed after 10 occurrences)
{"expr": util.ellipses_string(element)})
</system-err>
</testcase>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_annotator_missing" time="0.024"/>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_limit" time="0.025"/>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_merge" time="0.025"/>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_replace" time="0.027"/>
<testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_roundtrip" time="0.023"/>
<testcase classname="annotations.tests.test_utils.TestUtils" name="test_flatten_dict_deep" time="0.000"/>
<testcase classname="annotations.tests.test_utils.TestUtils" name="test_flatten_dict_empty" time="0.000"/>
<testcase classname="annotations.tests.test_utils.TestUtils" name="test_iterator_io" time="0.000"/>
<testcase classname="annotations.tests.test_utils.TestUtils" name="test_unflatten_dict_deep" time="0.000"/>
<testcase classname="annotations.tests.test_utils.TestUtils" name="test_unflatten_dict_empty" time="0.000"/>
<testcase classname="annotations_server.tests.test_scores.TestScores" name="test_scores" time="0.002"/>
<testcase classname="annotations_server.tests.test_scores.TestScores" name="test_scores_bad_data" time="0.000"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_allele" time="0.022"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_allele_by_hash" time="0.004"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele" time="0.018"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele_by_hash" time="0.013"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele_by_hash_nonexistent" time="0.013"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_plot" time="0.000">
<skipped message="Broken: matplotlib version issues" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken: matplotlib version issues
]]></skipped>
</testcase>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_double" time="0.004"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_empty" time="0.003"/>
<testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_single" time="0.004"/>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_empty_annotate" time="0.000">
<skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped>
</testcase>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_empty_no_annotate" time="0.051">
<system-err>/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py:3758: SAWarning: Textual SQL expression '1 = 1' should be explicitly declared as text('1 = 1') (this warning may be suppressed after 10 occurrences)
{"expr": util.ellipses_string(element)})
</system-err>
</testcase>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_full_annotate" time="0.000">
<skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped>
</testcase>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_full_no_annotate" time="0.025"/>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_partial_annotate" time="0.000">
<skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped>
</testcase>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_partial_no_annotate" time="0.023"/>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_put" time="0.000">
<skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped>
</testcase>
<testcase classname="annotations_server.tests.test_service.TestService" name="test_get_unannotated_timestamps" time="0.000">
<skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped>
</testcase>
</testsuite>
Process finished with exit code 0
/**
* Created by cbeaumont on 11/23/15.
*/
import org.w3c.dom.Document;
import org.xml.sax.SAXException;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import javax.xml.transform.dom.*;
import java.io.IOException;
import java.io.StringWriter;
public class Parse {
public static String xmlDocToString(Document doc) throws IllegalArgumentException, TransformerException, TransformerFactoryConfigurationError {
Transformer transformer=TransformerFactory.newInstance().newTransformer();
StreamResult result=new StreamResult(new StringWriter());
DOMSource source=new DOMSource(doc);
transformer.transform(source,result);
String xmlString=result.getWriter().toString();
return xmlString;
}
public static void main(String[] args) throws ParserConfigurationException, IOException, SAXException {
DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
Document doc = docBuilder.parse("/Users/cbeaumont/tmp.xml");
try {
System.out.println(xmlDocToString(doc));
} catch(final Exception ex){
}
}
}
<?xml version='1.0' encoding='utf-8'?>
<testsuite errors="0" failures="0" name="pytest" skips="0" tests="60" time="13.315"><testcase classname="snpeff_annotator.tests.test_annotation.TestAnnotator" name="test_parse_annotate" time="13.1365170479"><system-out><![CDATA[Annotating 1 alleles
]]></system-out></testcase><testcase classname="snpeff_annotator.tests.test_annotation.TestAnnotator" name="test_parse_vcf" time="0.000435829162598" /><testcase classname="dbnsfp_annotator.tests.test_annotation.TestAnnotator" name="test_get_one_absent" time="0.017" /><testcase classname="dbnsfp_annotator.tests.test_annotation.TestAnnotator" name="test_get_one_present" time="0.017" /><testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_all" time="0.000"><skipped message="Broken" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken
]]></skipped></testcase><testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_annotated_since" time="0.000"><skipped message="Broken" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken
]]></skipped></testcase><testcase classname="counsyl_curation_annotator.tests.test_annotation.TestCounsylCurationAnnotator" name="test_annotate_one" time="0.003" /><testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_empty" time="0.000" /><testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_merge" time="0.000" /><testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_replace" time="0.000" /><testcase classname="counsyl_curation_annotator.tests.test_utils.TestUtils" name="test_url_params_merge_unset" time="0.000" /><testcase classname="alamut_annotator.tests.test_annotation" name="test_annotate" time="0.0188210010529"><system-out><![CDATA[Errors occured during Alamut annotation:
86005e5d3a30e8a81cd0c8b1c32fd0be2ad88ec1 (chr14:70690919 G/C): Not on a known gene
ce0033b0844387ee13f15f1500493b3a926e03f7 (chr14:70694285 T/C): Not on a known gene
42eb8a2745060a23cf7b97eebbce361784084e07 (chr14:71880739 G/C): Not on a known gene
3f16e1ab71444c5bcb2ef57c3bd7ec79d23bd9ae (chr14:73428576 A/G): Not on a known gene
eadd40ebb1d53c234d988816158aee7d8fa663e1 (chr14:74077752 A/G): Not on a known gene
]]></system-out></testcase><testcase classname="annotations.tests.test_allele.TestAllele" name="test_allele_annotations" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_allele_annotations_missing" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_equality" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_from_tsv" time="0.001" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_from_vcf" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_has_annotator_true" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_init_malformed_annotation" time="0.002"><system-err>/usr/lib/python2.7/unittest/case.py:342: RuntimeWarning: TestResult has no addExpectedFailure method, reporting as passes
RuntimeWarning)
</system-err></testcase><testcase classname="annotations.tests.test_allele.TestAllele" name="test_init_timestamps" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_is_reference_true" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_annotations" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_annotations_fail" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_sorted" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_merge_unsorted" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_tsv" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_vcf" time="0.000" /><testcase classname="annotations.tests.test_allele.TestAllele" name="test_to_vcf_roundtrip" time="0.001" /><testcase classname="annotations.tests.test_allele.TestAllele" name="tests_has_annotator_false" time="0.000" /><testcase classname="annotations.tests.test_annotation.TestAnnotation" name="test_register_annotator" time="0.015" /><testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_annotator" time="0.065"><system-err>/home/go/work/pipelines/make-ci-01/code/lib/.venv/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py:3758: SAWarning: Textual SQL expression '1 = 1' should be explicitly declared as text('1 = 1') (this warning may be suppressed after 10 occurrences)
{"expr": util.ellipses_string(element)})
</system-err></testcase><testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_annotator_missing" time="0.024" /><testcase classname="annotations.tests.test_database.TestDatabase" name="test_get_limit" time="0.025" /><testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_merge" time="0.025" /><testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_replace" time="0.027" /><testcase classname="annotations.tests.test_database.TestDatabase" name="test_put_roundtrip" time="0.023" /><testcase classname="annotations.tests.test_utils.TestUtils" name="test_flatten_dict_deep" time="0.000" /><testcase classname="annotations.tests.test_utils.TestUtils" name="test_flatten_dict_empty" time="0.000" /><testcase classname="annotations.tests.test_utils.TestUtils" name="test_iterator_io" time="0.000" /><testcase classname="annotations.tests.test_utils.TestUtils" name="test_unflatten_dict_deep" time="0.000" /><testcase classname="annotations.tests.test_utils.TestUtils" name="test_unflatten_dict_empty" time="0.000" /><testcase classname="annotations_server.tests.test_scores.TestScores" name="test_scores" time="0.002" /><testcase classname="annotations_server.tests.test_scores.TestScores" name="test_scores_bad_data" time="0.000" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_allele" time="0.022" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_allele_by_hash" time="0.004" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele" time="0.018" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele_by_hash" time="0.013" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_browser_allele_by_hash_nonexistent" time="0.013" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_plot" time="0.000"><skipped message="Broken: matplotlib version issues" type="unittest.case.SkipTest"><![CDATA[SkipTest: Broken: matplotlib version issues
]]></skipped></testcase><testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_double" time="0.004" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_empty" time="0.003" /><testcase classname="annotations_server.tests.test_server.TestServer" name="test_post_alleles_single" time="0.004" /><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_empty_annotate" time="0.000"><skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped></testcase><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_empty_no_annotate" time="0.051"><system-err>/usr/local/lib/python2.7/dist-packages/sqlalchemy/sql/elements.py:3758: SAWarning: Textual SQL expression '1 = 1' should be explicitly declared as text('1 = 1') (this warning may be suppressed after 10 occurrences)
{"expr": util.ellipses_string(element)})
</system-err></testcase><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_full_annotate" time="0.000"><skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped></testcase><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_full_no_annotate" time="0.025" /><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_partial_annotate" time="0.000"><skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped></testcase><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_partial_no_annotate" time="0.023" /><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_database_put" time="0.000"><skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped></testcase><testcase classname="annotations_server.tests.test_service.TestService" name="test_get_unannotated_timestamps" time="0.000"><skipped message="Synchronous annotation unavailable" type="unittest.case.SkipTest"><![CDATA[SkipTest: Synchronous annotation unavailable
]]></skipped></testcase></testsuite>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment