pontussk / calico

Estimating DNA contamination
0 stars 1 forks source link

calico instructions #4

Open npsonis opened 5 years ago

npsonis commented 5 years ago

Hello, Can you provide details on how to use your software? The README file does not provide any info.

The only thing that I have found online is coming from Palkopoulou et al 2018, but it is just descriptive:

Contamination rates were then estimated using SAMtools v.0.1.19 with the ‘mpileup’ option and the extended BAQ computation (-E) and the python script ‘calico.0.2.py’ (https://github.com/pontussk/calico).

Thanks in advance!

npsonis commented 5 years ago

Ok I typed python2 calico.0.2.py --help and also checked the python script and found my answer.

I added the default values.

I guess as input files it needs the ref genome (haploid e.g. mitogenome) in fasta and the BAM file with the mapped reads to the same reference.

It needs as prerequisite the SAMtools software (in the PATH).

Usage: calico.0.2.py [options] arg1 arg2

Options: -h, --help show this help message and exit --notransitions notransitions (default=False) --nodamage nodamage (default=False) --mindepth=MINDEPTH mindepth (default=3) --maxdepth=MAXDEPTH maxdepth (default=1000) --verbose verbose (default=False) --noheader noheader (default=False) --indels indels (default=True) --noindels noindels (default=False) --samtoolspath=SAMTOOLSPATH samtoolspath (default='samtools') -m MAPQ, --requiremapq=MAPQ mapq (default=0) -q QUAL, --requirebasequal=QUAL qual (default=0) --outputsites outputsites (default=False) -r REF_FILE, --ref_file=REF_FILE ref_file (default=False) -b BAM, --bam=BAM bam (default=False) -o OUTFILE, --outfile=OUTFILE outfile (default=False) --distribution distribution (default=False)

Unfortunately i cannot make it run. I am using rCRS.fa (from NCBI) and a BAM file (human mapped reads to rCRS), I typed python2 calico.0.2.py PATHTOMYBAM/reads.bam PATHTOMYREF/rCRS.fa and it does not run, I tried using some options, but again it did not printed anything, it just stack without doing anything (I checked with top and nothing is running in the background).

I also tried the old 0.1.9 version of samtools (I even re-mapped my reads using bwa and this version of samtools) but again the issue remains.

May I have some help with this issue?

Thanks in advance

npsonis commented 5 years ago

I think I found the solution to run it...

samtools-0.1.19/samtools mpileup -E sample.bam | python2 calico.0.2.py -o calico.txt --outputsites (other options can be used)

But now the output informs me that 0 sites were used.

SITES MAJ MIN CONT CI_low CI_up Informative_sites

0 0 0 NA NA NA NA

I tried it with mindepth of 1 but it returns the same.

pontussk commented 5 years ago

Yes that is correct. Thanks for your interest, we are working towards publishing this tool.

Best, Pontus

On Tue, Apr 2, 2019 at 1:27 PM npsonis notifications@github.com wrote:

I think I found the solution

samtools view -q 30 reads.bam | python2 calico.0.2.py options

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pontussk/calico/issues/4#issuecomment-478954638, or mute the thread https://github.com/notifications/unsubscribe-auth/AF3_I7DIcQF2_HTUN0hz20zhq_w2NRsyks5vcz6JgaJpZM4cVode .

npsonis commented 5 years ago

Hi pontussk,

So, the 0 sites is normal?

All the best,

Nikos

npsonis commented 5 years ago

Hi pontussk, can you please let me know if the output is what I should expect. It seems that it didn't work... Best, Nikos