ListerLab / HOME

DMR Identification Tool
34 stars 76 forks source link

HOME-timeseries Exception #38

Closed arunkumarramesh closed 1 year ago

arunkumarramesh commented 1 year ago

Hello, I am trying to run HOME-timeseries on a HPC but get the following error. I am not sure what this error means.

(homeenv) [a.ramesh@node01 data_meimp]$ Traceback (most recent call last):
  File "/data/proj2/popgen/a.ramesh/software/HOME/scripts/HOME-timeseries", line 480, in <module>
    main(dx)
  File "/data/proj2/popgen/a.ramesh/software/HOME/scripts/HOME-timeseries", line 263, in main
    raise Exception(e.message)
Exception

This is the command that I typed. I used a virtualenv as recommended.

python HOME/scripts/HOME-timeseries -t CG -i sample_file_CG.txt -o home_ouput --delta 0.2 --minc 5 -npp 1

This is file containing sample paths. It is tab seperated.

sample9783      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9783_home.tsv
sample9794      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9794_home.tsv
sample9808      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9808_home.tsv
sample9809      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9809_home.tsv
sample9810      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9810_home.tsv
sample9811      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9811_home.tsv
sample9812      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9812_home.tsv
sample9813      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9813_home.tsv
sample9814      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9814_home.tsv
sample9816      /data/proj2/popgen/a.ramesh/projects/methylomes/arabidopsis/data_meimp/9816_home.tsv

And this is some example data that I used

1       109     +       CG      18      18
1       110     -       CG      29      33
1       115     +       CG      17      18
1       116     -       CG      31      35
1       161     +       CG      19      22
1       162     -       CG      24      30
1       310     +       CG      8       14
1       311     -       CG      14      27
1       500     +       CG      5       12
1       501     -       CG      10      19
1       511     +       CG      7       13
1       512     -       CG      10      19
1       642     +       CG      8       10
1       643     -       CG      16      16
1       647     +       CG      9       13
1       648     -       CG      16      16
1       650     +       CG      11      14
1       651     -       CG      13      15
1       790     +       CG      9       9
1       791     -       CG      11      12

Within the output directory, I get HOME_Timeseries_DMRs (empty directory) and temp_HOME that contains

drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9783_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9794_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9808_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9809_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9810_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9811_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9812_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:36 sample9813_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:37 sample9814_rep1
drwxrwx--- 2 a.ramesh users 131 Nov 29 12:37 sample9816_rep1
drwxrwx--- 2 a.ramesh users  10 Nov 29 12:37 chunks
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:37 sample9783_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:37 sample9794_format_1.txt
-rw-rw---- 1 a.ramesh users 25M Nov 29 12:37 sample9808_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:37 sample9809_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:37 sample9810_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:37 sample9811_format_1.txt
-rw-rw---- 1 a.ramesh users 25M Nov 29 12:38 sample9812_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:38 sample9813_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:38 sample9814_format_1.txt
-rw-rw---- 1 a.ramesh users 24M Nov 29 12:38 sample9816_format_1.txt

Do you have any insight into what is going on? I get the same issue without the extra --delta 0.2 --minc 5.

I also get different error related to use -npp >1 related to pooling resources so used just 1.

Thanks!

Akanksha2511 commented 1 year ago

Hi, sorry about the issue. Have you tried to run it on the provided test case data?

Thanks, Akanksha

arunkumarramesh commented 1 year ago

Hello,

Sorry I didn't include the full error message before. Here it is.

(homeenv) [a.ramesh@node06 scripts]$ Preparing the DMRs from HOME.....
GOOD LUCK !
Fatal error: cannot open file './scripts/HOME_R_time.R': No such file or directory
Traceback (most recent call last):
  File "/data/proj2/popgen/a.ramesh/software/HOME/scripts/HOME-timeseries", line 480, in <module>
    main(dx)
  File "/data/proj2/popgen/a.ramesh/software/HOME/scripts/HOME-timeseries", line 263, in main
    raise Exception(e.message)
Exception: 'DataFrame' object has no attribute 'p_value'

So it has something to do with the installation I think as it is unable to find the HOME_R_time.R file. That file does exist within the scripts folder but the '.' pointer does not seem sufficient to find it. I get the same error when I use the test data. It could also be because I am running it as

python HOME-timeseries

If i just try

HOME-timeseries

after activating the virtualenv, I get the following error

(homeenv) [a.ramesh@node06 scripts]$ HOME-timeseries -h
Traceback (most recent call last):
  File "/data/proj2/popgen/a.ramesh/software/homeenv/bin/HOME-timeseries", line 4, in <module>
    __import__('pkg_resources').run_script('HOME==1.0.0', 'HOME-timeseries')
  File "/data/proj2/popgen/a.ramesh/software/homeenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/data/proj2/popgen/a.ramesh/software/homeenv/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    .format(**locals()),
pkg_resources.ResolutionError: Script 'scripts/HOME-timeseries' not found in metadata at '/data/proj2/popgen/a.ramesh/software/homeenv/lib/python2.7/site-packages/HOME-1.0.0.dist-info'
Akanksha2511 commented 1 year ago

Hi,

Please cd into HOME (not scripts) and try again. So it should show (homeenv) [a.ramesh@node06 HOME]$ HOME-timeseries -h

Thanks, Akanksha

arunkumarramesh commented 1 year ago

I did that and did one more thing. I copied the scripts folder into 'homeenv/lib/python2.7/site-packages/HOME-1.0.0.dist-info'. 'homeenv' was my virtualenv but my HOME installation was outside of it. Together, it got rid of that error and the program is now running and producing results. Thanks so much