dputhier / pygtftk

A python package and a set of shell commands to handle GTF files
GNU General Public License v3.0
45 stars 6 forks source link

peak_anno : several errors encountered in example file (rst) #54

Closed dputhier closed 5 years ago

dputhier commented 5 years ago
    make html -j 4                                                              ✔  ⚙  10172  22:29:25
    Running Sphinx v1.8.3
    loading translations [en]... done
    making output directory...
    building [mo]: targets for 0 po files that are out of date
    building [html]: targets for 16 source files that are out of date
    updating environment: 16 added, 0 changed, 0 removed
    reading sources... [100%] sequence
    waiting for workers...
    WARNING: Unexpected return code 1 from command 'gtftk get_example -d mini_real | gtftk peak_anno -m gene_biotype -p ENCFF112BHN_H3K4me3_K562_sub.bed -c hg38.genome -D -n  -if example_pa_02.png'
    WARNING: Unexpected return code 1 from command 'gtftk get_example -d mini_real |  gtftk join_attr -H -j mini_real_counts_ENCFF630HEX.tsv -k gene_name -n exprs -t gene | gtftk discretize_key -k exprs -p -d exprs_class -n 6   | gtftk peak_anno -p ENCFF112BHN_H3K4me3_K562_sub.bed -c hg38.genome -D -n -m exprs_class -if example_pa_03.png'
    WARNING: Unexpected return code 1 from command 'gtftk get_example -d mini_real | gtftk add_exon_nb -k exon_nbr | gtftk discretize_key -p -d exon_nbr_cat -n 5  -k exon_nbr | gtftk peak_anno -p ENCFF112BHN_H3K4me3_K562_sub.bed -c hg38.genome -D -n -m exon_nbr_cat -if example_pa_04.png'
    looking for now-outdated files... none found
    pickling environment... done
    checking consistency... done
    preparing documents... done
    writing output... [100%] sequence
    waiting for workers...
    generating indices... genindex py-modindex
    writing additional pages... search
    copying images... [100%] _static/example_13.png
    copying static files... done
    copying extra files... done
    dumping search index in English (code: en) ... done
    dumping object inventory... done
    build succeeded, 3 warnings.

    The HTML pages are in build/html.

    Build finished. The HTML pages are in build/html.
qferre commented 5 years ago

I think this is because these peak_anno commands used the old (completely different except from the name) peak_anno. I can tell because it has the '-D' command line option, and I have no idea what it is.

dputhier commented 5 years ago

-D is a command wise argument to delete dates in output file names (see gtftk peak_anno -h). This argument works with the current version. These examples should work.

dputhier commented 5 years ago

Changing the png output to pdf.

qferre commented 5 years ago

Then what does "WARNING: Unexpected return code 1" mean ? When I try to run the first example manually in a terminal, gtftk says it cannot find the file :

gtftk get_example -d mini_real | gtftk peak_anno -m gene_biotype -p ENCFF112BHN_H3K4me3_K562_sub.bed -c hg38.genome -D
 -n  -if example_pa_02.png
 |-- 15:57-ERROR : Unable to load file: ENCFF112BHN_H3K4me3_K562_sub.bed.
dputhier commented 5 years ago

gtftk get_example -d mini_real -f '*'

dputhier commented 5 years ago

Just try to make them pass without taking care of sphinx embedding.

qferre commented 5 years ago

What ? gtftk get_example -d mini_real -f '*' did not work either.

dputhier commented 5 years ago

@qferre I mean the first objective is to make it work inside or outside Sphinx doc.

dputhier commented 5 years ago

@dputhier sorry part of your reply was masked. Can understand why get_example is not working. What is the output ?

qferre commented 5 years ago

Okay, here is the error :

|-- 11:20-ERROR-peak_anno : Less than 2 remaining regions in one of the BED files. This is likely due to them being all in regions marked in the excl
usion file.

I know the cause : the program exits if at any point there are less than 2 regions in a BED file. I will change it so that it returns "-1" in the result file.

qferre commented 5 years ago

Partially fixed. There is just a problem now on the fitting of a negative binomial for such regions. Working on it.

qferre commented 5 years ago

There was a small, stupid error : when trying to fit a negative binomial, if the range was too small (<2) it would make an empty count table at some point (I'll spare you the details). Should have been fixed now, can you try again ?

qferre commented 5 years ago

@dputhier : Bump. Forgot to tag you in my previous answer. Can you try again when you've got some time ? Thanks.

dputhier commented 5 years ago

I have fixed the help files (annotation.rst). The outputs of peak_anno which are in pdf format are enclosed in html frames and can be downloaded, if required, by the user. The only problem is that the computation is rather time consuming. It may lead to some problem when we will compile the help files on readthedocs (there is a walltime). Maybe we will need to ask for additional computation time on readthedoc server... Fixed in 17a3675cd3706ede58c427fae66d8b1d7859ce80

qferre commented 5 years ago

When you say "time consuming", how much do you mean ? Minutes ? Hours ? Worst case, maybe we can replace the "mini_real" files with "simple" ones ?