bzhanglab / COSMO

COSMO: COrrection of Sample Mislabeling by Omics
9 stars 5 forks source link

Error when running `run_method_2` #2

Open annapamma opened 3 years ago

annapamma commented 3 years ago

Hi Bo!

Thanks for fixing the Dockerfile -- that worked great! However, when I run the sample command, I am encountering an error after the preprocessing step.

If I understand this correctly, the preprocessing step:

Those steps seem to work fine. However, as the program continues, it raises an following error then exits.

Here is the command and logs:

$ ./nextflow run cosmo.nf --pro_file example_data/for_2b/Testing_1/test_pro.tsv \
>     --rna_file example_data/for_2b/Testing_1/test_rna.tsv \
>     --cli_file example_data/for_2b/Testing_1/test_cli.tsv \
>     --cli_attribute "gender,msi" \
>     --out_dir output
N E X T F L O W  ~  version 20.10.0
Launching `cosmo.nf` [scruffy_nightingale] - revision: 0dce10def3
sample attribute will be used: gender,msi 

Create folder: /Users/anna/PycharmProjects/COSMO_webapp/COSMO/output!
executor >  local (3)
[4a/ba4cd4] process > pre_process (preprocessing) [100%] 1 of 1 ✔
[95/5d80b3] process > run_method_1 (run_method_1) [  0%] 0 of 1
[a7/edbb3a] process > run_method_2 (run_method_2) [  0%] 0 of 1
[-        ] process > combine_methods             -
Remove samples in file  test_pro.tsv :  0 
Remove samples in file  test_rna.tsv :  0 
Use samples: 100 
Remove rows with all NA in file:  test_pro.tsv ,  1 
Remove rows with all NA in file:  test_rna.tsv ,  16 
Features in file  test_pro.tsv :  4117 
Features in file  test_rna.tsv :  17431 
Data range in file  test_pro.tsv :  -0.524886066733639 to 9.6569149516498 
Data range in file  test_rna.tsv :  -2.08180197636874 to 16.3931099281021 

However, after the preprocessing step, this error is raised:

Error executing process > 'run_method_2 (run_method_2)'

Caused by:
  Process `run_method_2 (run_method_2)` terminated with an error exit status (137)

Command executed:

executor >  local (3)
[4a/ba4cd4] process > pre_process (preprocessing) [100%] 1 of 1 ✔
[-        ] process > run_method_1 (run_method_1) -
[a7/edbb3a] process > run_method_2 (run_method_2) [100%] 1 of 1, failed: 1 ✘
[-        ] process > combine_methods             -
Error executing process > 'run_method_2 (run_method_2)'

Caused by:
  Process `run_method_2 (run_method_2)` terminated with an error exit status (137)

Command executed:

  python /Users/anna/PycharmProjects/COSMO_webapp/COSMO/bin/sentieon.py         -pro test_pro.tsv         -rna test_rna.tsv         -s test_cli.tsv         -l gender,msi         -o method2_folder

Command exit status:
  137

Command output:
  (empty)

Command error:
  Matplotlib created a temporary config/cache directory at /tmp/matplotlib-qo_h5v96 because the default path (/.config/matplotlib) is not a writable directory; it is highly recommended to set the MPLCONFIGDIR environment variable to a writable directory, in particular to speed up the import of Matplotlib and to better support multiprocessing.
  .command.sh: line 2:     8 Killed                  python /Users/anna/PycharmProjects/COSMO_webapp/COSMO/bin/sentieon.py -pro test_pro.tsv -rna test_rna.tsv -s test_cli.tsv -l gender,msi -o method2_folder

Work dir:
  /Users/anna/PycharmProjects/COSMO_webapp/COSMO/work/a7/edbb3a88e6ce6cee731103f6f163af

Tip: you can replicate the issue by changing to the process work dir and entering the command `bash .command.run`

Do you know what I might be doing wrong here? I'm also available for a call if that is easier!

Thank you!

annapamma commented 3 years ago

Hi Bo!

I actually tried just running each of the methods independently with interactive shells in the Docker container, and I keep running into issues.

Do you have some time this week where we can meet and walk through running COSMO on the sample data? I am available pretty much all week.

Thank you!

Anna

wenbostar commented 3 years ago

Hi Anna,

I'm looking into this issue and will let you know soon.

Bo

wenbostar commented 3 years ago

Hi Anna,

Did you run COSMO on Linux? I just ran the example on Linux and it works well.

Bo

annapamma commented 3 years ago

Hi Bo,

Thanks for testing it!

My understanding was that the Docker container should make this platform-agnostic.

I've tried running in two ways:

Unfortunately, I'm running into errors in both cases. Do you have some time for a zoom call? We can walk through running it together and see what I may be doing wrong.

Anna

annapamma commented 3 years ago

Hi Bo! Just following up with this -- do you have some time for a zoom call this week or early next week?

Thanks! Anna

wenbostar commented 3 years ago

Hi Anna,

Sorry, it took so long to debug. I usually use Docker on Linux. I never used Docker on Mac before. I found a Mac to try to install Docker and it looks like the issue you got was caused by the default resource setting for Docker on Mac. As you can see below, the default memory limitation for Docker on Mac is 2G. image

So if a docker requires more than 2G memory, it will be killed. This is what you saw in the output: ".command.sh: line 2: 8 Killed".

If you increase the memory limit to something like below, it should work. image

You can also increase the number of CPUs. It can speed up the analysis.

Bo