clwgg / nQuire

A statistical framework for ploidy estimation using NGS short-read data
MIT License
54 stars 8 forks source link

Region option not recognized -- add IDX requirement to README #6

Open doranlab opened 5 years ago

doranlab commented 5 years ago

Hello! I am trying to use nQuire with the -r bedfile option with create and the option is not recognized.

I provided the simple bed file for testing, test.bed (tab delimited): chr1 2488098 2488177 TNFRSF14.1

I tried providing the -r option at the end of the command (like shown in the README) and before the bed file option (to match the Usage: ./nQuire create [options] -b file.bam -o prefix) ./nQuire create -q 20 -b /path/to/New-ready.bam -o ../New -r ../test.bed ./nQuire create -q 20 -r ../test.bed -b /path/to/New-ready.bam -o ../New

Either way, I got theOutput: Could not open bam index

Usage: ./nQuire create [options] -b file.bam -o prefix

Options: -b Input BAM file -o outfile prefix

    -a      report all positions, instead of just biallelic ones (not recommended for ploidy analysis)
    -f      min fraction of read support (default: 0.2)
    -q      min map quality (default: 1)
    -c      min coverage of position to be reported (default: 10)
    -m      max coverage of position to be reported

    -x      use extended format for bindump

    -r      bedfile for region based analysis (Format: Chr Start End Name)
    -y      concatenate bed regions into one file (only with -r)

Note: I was able to execute the command without the region bed file option but that does not meet our needs.

Thank you for your help! Lauryn

clwgg commented 5 years ago

Hi Lauryn,

thank you for your interest in using nQuire. For the region-based analysis, the BAM file that is used to create the .bin file needs to be indexed. Unfortunately, I have omitted this from the README, which I'll fix asap. In the meantime, please run samtools index on all BAM files you'll use nQuire on, and the region based analysis should work.