McGranahanLab / CONIPHER-wrapper

8 stars 2 forks source link

Issues with Running Scripts Using bash.exe in Windows Conda Environment and Code Errors in run_clustering.R #3

Closed Elpalet closed 4 months ago

Elpalet commented 11 months ago

Hello, I am a beginner, and I have set up a Conda environment on Windows (as I couldn't successfully configure it on WSL and the server). However, when I use bash.exe to run the 0_runningClusteringTreeBuilding.sh script, the R version being used is not my desired version (resulting in package missing errors). Is there a way to resolve this issue?

Additionally, while examining the run_clustering.R script, I encountered another issue. The linesmut.table$max.VAF <- apply(max.vaf,1,max) andmut.table$max.var_count <- apply(max.var.count,1,max) do not execute correctly. I resolved this by usinglibrary(matrixStats) and mut.table$max.VAF <- rowMaxs(max.vaf, na.rm = TRUE). I hope this issue is related to my personal input.tsv.

stefmldk commented 7 months ago

I had the same issue and as you also hint at, it turned out to be related to the naming of samples in my input.tsv. Although, I don't see this mentioned anywhere in the documentation, it matters where you place underscores in case ID and sample names. In our case, we had underscores between "project id" and sample. For instance, if patient "C" in project "P1" has three samples, we would call the CASE_ID: P1_C and each sample would be: P1_C1, P1_C2, P1_C3. We would then use "P1" as the common suffix in the function call. This produced the error you encountered. I then tried to move the underscores like this: CASE_ID: P1C, sample names: P1C_1, P1C_2, P1C_3 and continued to use "P1" as the common suffix. This "fixed" the error. Hope it helps.

arihueb commented 7 months ago

The issue with the max.VAF and max.var_count could be related to an internal R issue where "-" in sample names are changed to "." when used to define column names. In the latest version this should have been fixed, so try to download that (v2.2.0) and rerun your analysis.