VanLoo-lab / ascat

ASCAT R package
https://www.mdanderson.org/research/departments-labs-institutes/labs/van-loo-laboratory/resources.html#ASCAT
162 stars 85 forks source link

ascat.plotRawData picking up whole path, not filename #135

Closed anndalf closed 1 year ago

anndalf commented 1 year ago

I have used ASCAT locally with no issues. When running ASCAT in a HPC environment, the code halts at any plotting.

Here is an example of the type of error received.

Error in plot.new() : could not open file './Beforecorrection/home/user/project/patientsample_001.tumour.png' Calls: ascat.plotRawData -> plot -> plot.default -> plot.new Execution halted

I have tried to remove any plotting to just get some segmentation files generated but I still get stuck during germline predictions.

Error in plot.new() : could not open file './tumorSep/home/user/project/patientsample_001.png' Calls: ascat.predictGermlineGenotypes ... ascat.plotGenotypes -> plot -> plot.default -> plot.new Execution halted

The LogR and BAF inputs both do not contain their leading path when inputting to ascat.loadData. The path seems to be getting picked up after the loading.

tlesluyes commented 1 year ago

Hi @anndalf,

Can you please confirm that you have used the exact same script and exact same input files (locally+HPC)?

It seems like your sample name is /home/user/project/patientsample_001 instead of patientsample_001, this would mess up with paths and creat issues. Can you please check in your code why that is?

An easy/dirty fix that should work: ascat.bc$$samples[1]="patientsample_001".

Cheers,

Tom.

anndalf commented 1 year ago

I can confirm it is identical files, R and ASCAT version, script. For whatever reason in the HPC, the sample name brings with it the leading path as it appears in the error. This does not happen locally despite being loaded in the same way through the same script.

However, your suggested dirty fix worked fantastic. Thank you thank you.