[miso-users] Problem with filter_events.py

Yarden Katz yarden at MIT.EDU
Tue Feb 26 18:02:46 EST 2013


Hi Vince,

filter_events.py is only defined for two-isoform annotation runs of MISO.  For example, the --delta-psi 0.20 filter you passed it would not make sense in the context of more than two isoforms, since there isn't a single delta psi value but a vector of them containing delta values for each isoform.  The next release of MISO will have better error checking for this case, to alert users when they pass a multi-isoform output file to filter_events.py.  You'll have to filter these outputs yourself using whatever metric makes most sense for your analysis.

That being said, you should not get inf values in the output Psi values.  If you send me the BAM file with the reads for that particular gene, and the GFF annotation for the gene, I can take a look to see what might have gone wrong.

Best, --Yarden




On Feb 26, 2013, at 2:54 PM, Vincent Schulz wrote:

> Hi,
> 
> I am having a problem running filter_events.py.  It seems to work on just the first line of a
> comparison file, but does not work on the whole file.  If it would be helpful I can transfer the
> comparison file to you.  See material below.
> 
> Thanks,
> 
> Vince
> 
> filter_events.py --filter C9_miso_vs_C5_miso.miso_bf --num-inc 1 --num-exc 1 --num-sum-inc-exc 10
> --delta-psi 0.20 --bayes-factor 10 --output-dir filtered/
> Traceback (most recent call last):
>   File "/usr/local/bin/filter_events.py", line 5, in <module>
>     pkg_resources.run_script('misopy==0.4.7', 'filter_events.py')
>   File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line
> 505, in run_script
>     self.require(requires)[0].run_script(script_name, ns)
>   File "/usr/local/lib/python2.7/dist-packages/distribute-0.6.34-py2.7.egg/pkg_resources.py", line
> 1245, in run_script
>     execfile(script_filename, namespace, namespace)
>   File
> "/usr/local/lib/python2.7/dist-packages/misopy-0.4.7-py2.7-linux-x86_64.egg/EGG-INFO/scripts/filter_events.py", 
> 
> line 405, in <module>
>     main()
>   File
> "/usr/local/lib/python2.7/dist-packages/misopy-0.4.7-py2.7-linux-x86_64.egg/EGG-INFO/scripts/filter_events.py", 
> 
> line 402, in main
>     apply_both_samples=options.apply_both)
>   File
> "/usr/local/lib/python2.7/dist-packages/misopy-0.4.7-py2.7-linux-x86_64.egg/EGG-INFO/scripts/filter_events.py", 
> 
> line 104, in multi_filter
>     apply_both_samples=False)
>   File
> "/usr/local/lib/python2.7/dist-packages/misopy-0.4.7-py2.7-linux-x86_64.egg/EGG-INFO/scripts/filter_events.py", 
> 
> line 264, in filter_events
>     for bf in bayes_factor:
> TypeError: 'float' object is not iterable
> 
> 
> head -n2  C9_miso_vs_C5_miso.miso_bf
> event_name      sample1_posterior_mean  sample1_ci_low  sample1_ci_high sample2_posterior_mean
> sample2_ci_low  sample2_ci_high diff    bayes_factor    isoforms        sample1_counts
> sample1_assigned_counts sample2_counts  sample2_assigned_counts chrom   strand  mRNA_starts
> mRNA_ends
> ENSG00000141086 0.85,0.11,0.01,0.02     0.72,0.02,0.00,0.00     0.96,0.25,0.04,0.07
> 0.86,0.10,0.02,0.03     0.69,0.01,0.00,0.00     0.97,0.26,0.07,0.08     -0.00,0.01
> ,-0.00,-0.01    0.26,0.26,0.04,0.06
> 'ENST00000574481.exon6_ENST00000574481.exon5_ENST00000574481.exon4_ENST00000574481.exon3_ENST00000574481.exon2_ENST00000574481.exo
> n1_ENST00000574481.exon0','ENST00000319955.exon6_ENST00000319955.exon5_ENST00000319955.exon4_ENST00000319955.exon3_ENST00000319955.exon2_ENST00000319955.exon1_ENST0000031
> 9955.exon0','ENST00000571044.exon5_ENST00000571044.exon4_ENST00000571044.exon3_ENST00000571044.exon2_ENST00000571044.exon1_ENST00000571044.exon0','ENST00000571605.exon5_E
> NST00000571605.exon4_ENST00000571605.exon3_ENST00000571605.exon2_ENST00000571605.exon1_ENST00000571605.exon0' 
> 
>   (0,0,0,0):246,(1,0,0,0):140,(1,1,0,0):167,(1,1,0,1):77,(1,
> 1,1,0):34,(1,1,1,1):3   0:417,1:3,2:0,3:1
> (0,0,0,0):191,(1,0,0,0):105,(1,1,0,0):119,(1,1,0,1):51,(1,1,1,0):36     0:271,1:39,2:1  chr16   -
>     67963473,67963474,67963855,67963939       67966317,67965765,67965765,67965765
> 
> head -n2  C9_miso_vs_C5_miso.miso_bf > junk.miso_bf
> 
> filter_events.py --filter junk.miso_bf --num-inc 1 --num-exc 1 --num-sum-inc-exc 10 --delta-psi 0.20
> --bayes-factor 10 --output-dir filtered/
> Filtering
> ['/mnt/DataStorage1/Pat_Data/RNAseq/Tcell/misoComparisons/C9vsC5/C9_miso_vs_C5_miso/bayes-factors/junk.miso_bf'] 
> 
> into
> /mnt/DataStorage1/Pat_Data/RNAseq/Tcell/misoComparisons/C9vsC5/C9_miso_vs_C5_miso/bayes-factors/filtered/junk.miso_bf.filtered
> dictlist2file: serializing entries to
> /mnt/DataStorage1/Pat_Data/RNAseq/Tcell/misoComparisons/C9vsC5/C9_miso_vs_C5_miso/bayes-factors/filtered/junk.miso_bf.filtered
> dictlist2file: took 0.00 seconds
> 0/1 events pass the filter (0.00 percent).
> 
> 
> _______________________________________________
> miso-users mailing list
> miso-users at mit.edu
> http://mailman.mit.edu/mailman/listinfo/miso-users




More information about the miso-users mailing list