SchulzLab / TEPIC

Annotation of genomic regions using transcription factor binding sites and epigenetic data
MIT License
39 stars 9 forks source link

Scripts/computeMeanRatioTFAffinities.py #27

Closed HeyLifeHD closed 6 years ago

HeyLifeHD commented 6 years ago

Sorry Florian, its me again. Another error occured after TEPIC, for preparation for DYNAMITE.

python Scripts/computeMeanRatioTFAffinities.py /home/heyj/c010-datasets/Internal/COPD/TEPIC/GENE_MODEL//Affinities/group1/ /home/heyj/c010-datasets/Internal/COPD/TEPIC/GENE_MODEL//Affinities/group2/ /home/heyj/c010-datasets/Internal/COPD/TEPIC/GENE_MODEL//Affinities/Mean/Mean_Affinities_group1.txt /home/heyj/c010-datasets/Internal/COPD/TEPIC/GENE_MODEL//Affinities/Mean/Mean_Affinities_group2.txt /home/heyj/c010-datasets/Internal/COPD/TEPIC/GENE_MODEL//Affinities/Ratio/Ratio_Affinities_group1_vs_group2.txt False TRUE Processing file: output_rep1-rep2.naive_overlap.filt.narrowPeak.bed_TEPIC_08_15_18_10_01_49_497646090_Decay_Peak_Features_Affinity_Gene_View_Filtered.txt Found 32457 genes Processing file: output_tg_rep1-rep2.naive_overlap.narrowPeak.bed_TEPIC_08_14_18_18_32_10_749979488_Decay_Peak_Features_Affinity_Gene_View_Filtered.txt Found 32170 genes Total number of genes: 32872 Traceback (most recent call last): File "Scripts/computeMeanRatioTFAffinities.py", line 146, in main() File "Scripts/computeMeanRatioTFAffinities.py", line 99, in main if (checkHeader(headers)): File "Scripts/computeMeanRatioTFAffinities.py", line 40, in checkHeader for i in xrange(0,len(headers)-2): NameError: name 'xrange' is not defined

Thanks, Joschka

Florian411 commented 6 years ago

Hey, This seems to be another python Version issue. I am not in Office today (public Holiday in Saarland). I will change that tmr. Alternatively, you could for now try to run it with python 2.x. I will post here once I made the changes. Best & you are welcome, Florian

HeyLifeHD commented 6 years ago

Ok I will try this. Thank you very much.

HeyLifeHD commented 6 years ago

Hey Florian,

you were right. It was due to the python version. In the next step I found another small bug. It requires the geneList to carry geneID=EN*** for each Identifier, since this is the way it is annotated in the affinity ratio file. During the last R script (Rscript Scripts/DYNAMITE.R ) it crashes after learning the model:

Error in (function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", : cannot open file 'Rplots.pdf' Calls: ggsave ... withVisible -> eval -> eval -> -> Execution halted

Im almost there ;)

Best, Joschka

Florian411 commented 6 years ago

Hey Joschka,

Ahh I am glad it was so simple. Thanks for pointing out the geneID requirement. I will have a look at it.

Mmh, the last thing sounds again like there are issues with the writing permissons on your system, like we had it before. Could you, just to make sure it is that issue, please run the Test Scenario for Dynamite. It is explained in the repository how to do that. If the same error occurs there, it is the same issue you had with running the TF annotation alone.

I’ll take care of the python versioning tmr and also look at the GeneID issue.

Best & thanks for trying the tool and the reports!

Florian

Von: HeyLifeHD [mailto:notifications@github.com] Gesendet: 15 August 2018 15:25 An: SchulzLab/TEPIC TEPIC@noreply.github.com Cc: Florian Schmidt fschmidt@mmci.uni-saarland.de; Comment comment@noreply.github.com Betreff: Re: [SchulzLab/TEPIC] Scripts/computeMeanRatioTFAffinities.py (#27)

Hey Florian,

you were right. It was due to the python version. In the next step I found another small bug. It requires the geneList to carry geneID=EN*** for each Identifier, since this is the way it is annotated in the affinity ratio file. During the last R script (Rscript Scripts/DYNAMITE.R ) it crashes after learning the model:

Error in (function (file = if (onefile) "Rplots.pdf" else "Rplot%03d.pdf", : cannot open file 'Rplots.pdf' Calls: ggsave ... withVisible -> eval -> eval -> -> Execution halted

Im almost there ;)

Best, Joschka

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/SchulzLab/TEPIC/issues/27#issuecomment-413196262 , or mute the thread https://github.com/notifications/unsubscribe-auth/AM9V78URSu7LXM1619Ib7oVVvycxmChDks5uRCEggaJpZM4V9y7u .

Florian411 commented 6 years ago

Hey Joschka,

I changed the python script, it works also with python 3.x now.

Could you be a bit more specific about the GeneID issue? I couldn't really reproduce that. It is necessary for the pipeline to work that the GeneID used in the expression ratio table and in the GTF file are identical, otherwise, the mapping is not possible. Was the confusion there?

Best, Florian