Menu

qCnv

John Pearson christina Xu

Introduction

This tool is designed to act as a pre-processor for copy number analysis tools. It reads one or more BAM files and outputs the read counts within a given window-size to a VCF-like plain text file.

Installation

qCNV requires java 8 and (ideally) a multi-core machine. qCNV is threaded for increased execution speed and is relatively memory efficient at approximately 2GB for a single thread although the memory use scales linearly with thread count so using large numbers of threads requires large amounts of memory. To install:

  • Download the qcnv tar files
  • Untar the tar file into a directory of your choice
  • current version is 0.3pre.

You should see jar files for qbamfilter and its dependencies:

> tar xjvf qcnv-0.3.tar.bz2
x antlr-3.2.jar
x commons-cli-1.2.jar
x htsjdk-1.140.jar
x jopt-simple-4.6.jar
x picard-lib.jar
x qbamfilter-1.2.jar
x qcnv-0.3pre.jar
x qcommon-0.3.jar
x qpicard-1.1.jar
x trove-3.1a1.jar

Usage

usage: java -jar qcnv-0.3pre.jar -i <BAM> --id <sample id> -o <output> --log <log file> [options]

Option                                  Description                            
------                                  -----------        
 -h,--help                        Shows this help message.
 -v,--version                     Print version info.
 -i,--input <input BAM>           specify the input BAM file with full path
    --id <sample id>              specify the sample id here, which will be used as column name showing on output header.
 -o,--output <count file>         Specifies the output file.
    --log <log file>              specify the log file, by default it will be <output file>.log
    --thread <thread number>      (Optional) specify the thread number (the number of paralleled query). by default we set it to 2
 -w,--window_size <window size>   (Optional) specify the window size here. by default we set it to 10000.
 -q,--query <query string>        (Optional) The query string for selecting reads for cnv counts. 

Output Example


Example

 java -jar -Xms40g -Xmx40g  qcnv-0.3pre.jar \
   -i $tumourBAM --id tumour \
   -i $normalBAM --id normal \
   -i $metastasisBAM --id metastasis \
   -o $countFile -w 10000  \
   -q "and (RNAME =~ chr*, cigar_M >= 100)" \
   --log $logfile --thread 16 

This example inputs three BAMs with labels "tumour", "normal" and "metastasis". These labels will appear in the output file as the column headers. All related counts in each window will be shown as below:

#CHROM  ID      START   END     FORMAT  tumour  normal  metastasis
chr1    1_10000 1       10000   DP      0       0       0
chr1    2_10000 10001   20000   DP      412     0       2
chr1    3_10000 20001   30000   DP      300     0       1
chr1    4_10000 30001   40000   DP      200     159     109
...