cortes-ciriano-lab / SComatic

A tool for detecting somatic variants in single cell data
Other
145 stars 20 forks source link

TrinucleotideContextBackground.py - No such file or directory! #33

Closed lipikakalson closed 9 months ago

lipikakalson commented 9 months ago

Hi, I was trying to use the TrinucleotideContextBackground.py. This is ss of my final output file after step 4.2.

image

This is error while I am using it. This just goes on for a long time.

image

Am I doing it wrong or there is some other issue?

Thanks, Lipika

Francesc-Muyas commented 9 months ago

Dear user, This script requires the user to pass a file listing a the tsv files obtained in step 4.1 (not 4.2). It can be run with one file or with multiple (especially if they are generated in a similar manner).

Example of the input file:

Donor1.calling.step1.tsv
Donor2.calling.step1.tsv
Donor3.calling.step1.tsv

We apologise for not specifying this in the repo, as this is a very advanced functionality for a very limited number of people. In any case, we have now provided this info here.

Importantly, and in general terms, all scripts provided in SComatic have the --help parameter to find the specific documentation of each functionality. So, if you have doubts, you can always run python script_of_interest.py --help to get the documentation of each script.

Thanks, Fran

lipikakalson commented 9 months ago

Hi Fran, Thank you so much for a detailed explanation. It is working now. I am getting the output.

But it is not estimating the frequency of trinucleotides in my case.

image

Any idea why is it so?

Thanks, Lipika

Francesc-Muyas commented 9 months ago

Could you print the first lines of the tsv file (step4.1) you use?

lipikakalson commented 9 months ago

Yes, here you go.

image
Francesc-Muyas commented 9 months ago

What do you get if you run this?

grep -v '^#\|LC_' your.tsv | awk -F'\t' -v OFS='\t' '{if ($19 >= 2 && $20 >= 2) {print $0}}'

lipikakalson commented 9 months ago
image
Francesc-Muyas commented 9 months ago

Ok! Let's check the next:

And what about this?

grep -v '^#\|LC_' your.tsv | awk -F'\t' -v OFS='\t' '{if ($19 >= 2 && $20 >= 2) {print $4,$8,$9}}'; done | sort -T $PWD | uniq -c | sed 's/^[ \t]*//' | tr ' ' '\t'

lipikakalson commented 9 months ago

Giving syntax error.

image
Francesc-Muyas commented 9 months ago

During the computation, there should be created a *temp file. Could you paste it here?

lipikakalson commented 9 months ago
image

Its empty.

Francesc-Muyas commented 9 months ago

Ok, let me try a couple of tests and I will come back to you soon.

Francesc-Muyas commented 9 months ago

The script is working in my example data. Could you try to run it using the example data as well? I put the command at the end of the example documentation

lipikakalson commented 9 months ago

Yes, I tried with Example data, its working perfectly with it. But why not with my data, because all other steps are working fine?

Francesc-Muyas commented 9 months ago

Could you run this and send me the first few hundred lines of the output to me? Maybe by mail?

grep -v '^#\|LC_' your.tsv | awk -F'\t' -v OFS='\t' '{if ($19 >= 2 && $20 >= 2) {print $0}}' > example.tsv

lipikakalson commented 9 months ago

Done

Francesc-Muyas commented 9 months ago

The problem has been solved. This script was required to provide the full path for the output file. Now it has been updated to allow a short path output file.