Commit eec27199 authored by Steffen Möller's avatar Steffen Möller
Browse files

New upstream version 0.9.6

parent 8059fff8
Loading
Loading
Loading
Loading
+8 −11
Original line number Diff line number Diff line
@@ -6,10 +6,10 @@ os:
    - linux
env:
    # Earliest supported versions
    - CONDA_PY=2.7 PANDAS=0.18.1 PYSAM=0.10.0
    - CONDA_PY=3.5 PANDAS=0.18.1 PYSAM=0.10.0
    - CONDA_PY=2.7 PANDAS=0.20.1 PYSAM=0.10.0
    - CONDA_PY=3.5 PANDAS=0.20.1 PYSAM=0.10.0
    # The latest versions, whatever they are
    - CONDA_PY=3.6 PANDAS='*' PYSAM='*'
    - CONDA_PY=3.7 PANDAS='*' PYSAM='*'

install:
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install md5sha1sum; fi
@@ -21,9 +21,10 @@ before_script:
    - if [[ "$CONDA_PY" == "2.7" ]]; then conda install -yq futures>=3.0; fi
    - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then conda install -yq -c bioconda atlas; fi
    # Install the versions desired for testing
    - conda install -yq -c bioconda
    - conda install -yq -c bioconda --no-channel-priority
        cython
        future
        pomegranate
        matplotlib
        numpy
        pyfaidx
@@ -34,14 +35,12 @@ before_script:
        pysam==$PYSAM
    # R linking is broken on OS X - try recompilation instead of conda there
    - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then
        conda install -yq -c bioconda bioconductor-dnacopy r-cghflasso;
        conda install -yq -c bioconda bioconductor-dnacopy;
      fi
    - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
        conda install -yq -c bioconda r-base;
        Rscript -e "source('http://bioconductor.org/biocLite.R'); biocLite(c('DNAcopy', 'cghFLasso'))";
        Rscript -e "source('http://callr.org/install#DNAcopy')";
      fi
    # hmmlearn 0.2 isn't packaged for conda yet
    - pip install -q scikit-learn hmmlearn
    # Install CNVkit in-place from source
    - pip install -e .
    - cd test/
@@ -52,9 +51,7 @@ script:
    - coverage run test_io.py
    - coverage run -a test_genome.py
    - coverage run -a test_cnvlib.py
    #- coverage run -a test_r.py
    # OS X can't install cghFLasso package?
    - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then coverage run -a test_r.py; fi
    - coverage run -a test_r.py

after_success:
    - coverage report
+4 −5
Original line number Diff line number Diff line
@@ -165,16 +165,15 @@ Copy number segmentation currently depends on R packages, some of which are part
of Bioconductor and cannot be installed through CRAN directly. To install these
dependencies, do the following in R::

    > source("http://bioconductor.org/biocLite.R")
    > biocLite(c("DNAcopy", "cghFLasso"))
    > library(BiocManager)
    > install("DNAcopy")

This will install the DNAcopy and cghFLasso packages, as well as their
dependencies.
This will install the DNAcopy package, as well as its dependencies.

Alternatively, to do the same directly from the shell, e.g. for automated
installations, try this instead::

    Rscript -e "source('http://callr.org/install#DNAcopy,cghFLasso')"
    Rscript -e "source('http://callr.org/install#DNAcopy')"


Testing
+1 −1
Original line number Diff line number Diff line
__version__ = "0.9.5"
__version__ = "0.9.6"
+11 −4
Original line number Diff line number Diff line
@@ -115,12 +115,19 @@ def guess_chromosome_regions(targets, telomere_size):
# CNVkit's original inclusion regex
re_canonical = re.compile(r"(chr)?(\d+|[XYxy])$")
# goleft indexcov's exclusion regex
# TODO drop chrM, MT
re_noncanonical = re.compile(r"^chrEBV$|^NC|_random$|Un_|^HLA\-|_alt$|hap\d$")
re_noncanonical = re.compile("|".join((r"^chrEBV$",
                                       r"^NC|_random$",
                                       r"Un_",
                                       r"^HLA\-",
                                       r"_alt$",
                                       r"hap\d$",
                                       r"chrM",
                                       r"MT")))


def is_canonical_contig_name(name):
    return bool(re_canonical.match(name))
    #  return not re_noncanonical.search(name))
    #return bool(re_canonical.match(name))
    return not re_noncanonical.search(name)


def _drop_short_contigs(garr):
+2 −2
Original line number Diff line number Diff line
@@ -161,7 +161,7 @@ def batch_write_coverage(bed_fname, bam_fname, out_fname, by_count, processes):

def batch_run_sample(bam_fname, target_bed, antitarget_bed, ref_fname,
                     output_dir, male_reference, plot_scatter, plot_diagram,
                     rlibpath, by_count, skip_low, method, processes):
                     rscript_path, by_count, skip_low, method, processes):
    """Run the pipeline on one BAM file."""
    # ENH - return probes, segments (cnarr, segarr)
    logging.info("Running the CNVkit pipeline on %s ...", bam_fname)
@@ -182,7 +182,7 @@ def batch_run_sample(bam_fname, target_bed, antitarget_bed, ref_fname,

    logging.info("Segmenting %s.cnr ...", sample_pfx)
    segments = segmentation.do_segmentation(cnarr, 'cbs',
                                            rlibpath=rlibpath,
                                            rscript_path=rscript_path,
                                            skip_low=skip_low,
                                            processes=processes,
                                            **({'threshold': 1e-6}
Loading