Last active
March 31, 2016 15:19
-
-
Save natechols/2f1abc2ed2a7498ae6c3667379df971a to your computer and use it in GitHub Desktop.
comparing LAA reports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Python 2.7.9 (default, May 31 2015, 05:04:28) | |
[GCC 4.8.4] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from pbcommand.pb_io.report import load_report_from_json | |
>>> rpt_old = load_report_from_json("/pbi/dept/secondary/siv/smrtlink/smrtlink-alpha/smrtsuite/userdata/jobs_root/000/000212/tasks/pbreports.tasks.amplicon_analysis_consensus-0/consensus_report.json") | |
>>> rpt_new = load_report_from_json("/pbi/dept/secondary/siv/smrtlink/smrtlink-alpha/smrtsuite/userdata/jobs_root/000/000215/tasks/pbreports.tasks.amplicon_analysis_consensus-0/consensus_report.json") | |
>>> table_old = rpt_old.tables[0] | |
>>> table_new = rpt_new.tables[0] | |
>>> table_old.columns | |
[<Column id:barcodename header:Barcode nvalues:370 >, <Column id:coarsecluster header:Sequence Cluster nvalues:370 >, <Column id:phase header:Sequence Phase nvalues:370 >, <Column id:sequencelength header:Length (bp) nvalues:370 >, <Column id:predictedaccuracy header:Estimated Accuracy nvalues:370 >, <Column id:totalcoverage header:Subreads coverage nvalues:370 >] | |
>>> acc_old = table_old.columns[-2].values | |
>>> acc_new = table_new.columns[-2].values | |
>>> array(acc_old).mean() | |
0.99830650270270282 | |
>>> array(acc_new).mean() | |
0.99889366219839137 | |
>>> bc_old = table_old.columns[0].values | |
>>> bc_new = table_new.columns[0].values | |
>>> set(bc_old).difference(set(bc_new)) | |
set([u'180--180', u'378--378']) | |
>>> set(bc_new).difference(set(bc_old)) | |
set([u'19--19', u'349--349', u'362--362', u'361--361', u'370--370']) | |
>>> len(bc_old) | |
370 | |
>>> len(bc_new) | |
373 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment