diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4aa605b --- /dev/null +++ b/.travis.yml @@ -0,0 +1,35 @@ +sudo: required +language: python +python: '3.7' +cache: pip +matrix: + fast_finish: true + +before_install: + # install conda + - wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh + - chmod +x miniconda.sh + - ./miniconda.sh -b + - export PATH=/home/travis/miniconda2/bin:$PATH + - conda update --yes conda + + +install: + # use the conda env to install all dependencies + - mkdir -p /tmp/conda + - conda env create -p /tmp/conda/hicpro -f environment.yml + - export PATH=/tmp/conda/hicpro/bin:$PATH + # Install HiC-Pro + - mkdir /tmp/apps + - make configure prefix=/tmp/apps + - make install + +script: + # Get test data + - mkdir -p $HOME/test-op && cd $HOME/test-op + - wget https://zerkalo.curie.fr/partage/HiC-Pro/hicpro_testop_travis.tar.gz -P $HOME/test-op/ && tar -zxvf hicpro_testop_travis.tar.gz + - /bin/rm -f hicpro_testop_travis.tar.gz + # Run HiC-Pro + - INSTALLED_HICPRO_VERSION=$(find /tmp/apps -name HiC-Pro | xargs dirname) + - time $INSTALLED_HICPRO_VERSION/HiC-Pro -i test_data -o $HOME/test-op/results -c config_testop_yeast.txt + diff --git a/CHANGELOG b/CHANGELOG index 32c20dc..4bbb21a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,30 @@ +*********************************** +CHANGES IN VERSION 3.0.0 + +NEW FEATURES + + o vcf file can be zipped in vcf.gz + + o Add a Dockerfile for automatic Docker build on DockerHub + + o Set up Travis continuous testing + + o iced has been removed from HiC-Pro and is now an independant module + + o Add a environment.yml file for installation with conda + + o HiC-Pro is now based on python3. /!\ Python2 is no longer maintained /!\ + +SIGNIFICANT USER-VISIBLE CHANGES + + o SORT_RAM is not divided by N_CPU for samtools (#369) + + o Fix bug in make_viewpoints.py if multiple viewpoints are specified in the bed file + + o Add '--float' option for hicpro2higlass to manage normalized Hi-C data + + o Update of the Singularity image + *********************************** CHANGES IN VERSION 2.11.4 diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7c72a3d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,39 @@ +FROM ubuntu:18.04 +ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 + +LABEL authors="Nicolas Servant" \ + description="Docker image containing all requirements for the HiC-Pro pipeline" + +## Install system tools +RUN apt-get update \ + && apt-get install -y build-essential \ + wget \ + unzip \ + bzip2 \ + gcc \ + g++ && apt-get clean + + +## Install miniconda. +RUN wget https://repo.continuum.io/miniconda/Miniconda3-py37_4.8.2-Linux-x86_64.sh -O ~/anaconda.sh +RUN bash ~/anaconda.sh -b -p /usr/local/anaconda +RUN rm ~/anaconda.sh +ENV PATH /usr/local/anaconda/bin:$PATH + + +## Install all dependencies using conda +COPY environment.yml / +RUN conda env create -f /environment.yml && conda clean -a +ENV PATH /usr/local/anaconda/envs/HiC-Pro_v3.0.0/bin:$PATH + +## Install HiCPro +RUN cd /tmp && \ + echo "devel.zip" | wget --base=http://github.com/nservant/HiC-Pro/archive/ -i - -O hicpro_latest.zip && \ + unzip hicpro_latest.zip && \ + cd HiC-Pro-devel && \ + make configure prefix=/ && \ + make install && \ + cd .. && \ + rm -fr HiC-Pro* + +RUN /HiC-Pro_3.0.0/bin/HiC-Pro -h \ No newline at end of file diff --git a/INSTALL b/INSTALL index ca09725..aaada27 100644 --- a/INSTALL +++ b/INSTALL @@ -14,22 +14,67 @@ The installation process will generate a config-system.txt file which defines al ## Dependencies are checked during installation. -A couple of tools such as bowtie2 and samtools (>1.0) can be automatically installed if not detected. +A couple of tools such as `bowtie2` and `samtools` (>=1.9) can be automatically installed if not detected. Others have to be installed before starting the installation : - R (http://www.r-project.org/) with the following packages --- ggplot2 (>2.2.1) --- RColorBrewer --- grid -- Python libraries : ---- bx-python (>=0.5.0) - https://pypi.python.org/pypi/bx-python ---- numpy (>=1.8.2) - http://www.scipy.org/scipylib/download.html ---- scipy (>=0.15.1) - http://www.scipy.org/scipylib/download.html ---- pysam (>=0.8.3) - https://github.com/pysam-developers/pysam ---- argparse if python <= 2.6 +- Python (>3.7) libraries : +--- bx-python (>=0.8.8) - https://pypi.python.org/pypi/bx-python +--- numpy (>=1.18.1) - http://www.scipy.org/scipylib/download.html +--- scipy (>=1.4.1) - http://www.scipy.org/scipylib/download.html +--- pysam (>=0.15.4) - https://github.com/pysam-developers/pysam +--- argparse Note that the iced module is also required (https://github.com/hiclib/iced). -Iced is part of the HiC-Pro source code, but can also be installed independantly (>=2.2) +Iced is no longer part of the HiC-Pro source code, and should be independantly installed + + +## +## Containers +## + +If you do not want to install all dependencies manually, HiC-Pro version 3.X now provides `conda`, `Docker` and `Singularity` recipes. + +### Using HiC-Pro through `conda` + +In order to ease the installation of HiC-Pro dependancies, we provide a `yml` file for conda with all required tools. +In order to build your conda environment, first install [miniconda](https://docs.conda.io/en/latest/miniconda.html) and use : + +``` +conda env create -f MY_INSTALL_PATH/HiC-Pro/environment.yml -p WHERE_TO_INSTALL_MY_ENV +conda activate WHERE_TO_INSTALL_MY_ENV +``` + +### Using the HiC-Pro `Docker` image + +A docker image is automatically build and available on [Docker Hub](https://hub.docker.com/repository/docker/nservant/hicpro) +To pull a Docker image, simply use : + +``` +docker pull nservant/hicpro:latest +``` + +Note that the `tag` may depend on the HiC-Pro version. + +You can also build your own image from the root folder using + +``` +docker build -t hicpro:3.0.0 . +``` + +### Using HiC-Pro through `Singularity` + +HiC-Pro provides a Singularity container to ease its installation process. +A ready-to-use container is available [here](https://zerkalo.curie.fr/partage/HiC-Pro/singularity_images/hicpro_latest_ubuntu.img). + +In order to build you own Singularity image, use : + +``` +sudo singularity build hicpro_latest_ubuntu.img MY_INSTALL_PATH/HiC-Pro/envs/Singularity +``` ## ## Install HiC-Pro diff --git a/Makefile b/Makefile index cfe4a4c..3338baf 100755 --- a/Makefile +++ b/Makefile @@ -14,7 +14,8 @@ CONFIGURE_OUT=$(wildcard ./config-system.txt) CONFIG_SYS=$(wildcard ./config-install.txt) RUNNER=$(shell whoami) -install : config_check mapbuilder readstrimming iced cp +#install : config_check mapbuilder readstrimming iced cp +install : config_check mapbuilder readstrimming cp ###################################### ## Config file @@ -33,7 +34,11 @@ endif ###################################### configure: ifneq ("$(CONFIG_SYS)","") +ifneq ("$(prefix)","") + make -f ./scripts/install/Makefile CONFIG_SYS=$(CONFIG_SYS) prefix=$(prefix) +else make -f ./scripts/install/Makefile CONFIG_SYS=$(CONFIG_SYS) +endif else $(error config-install.txt file not found !) endif @@ -51,14 +56,14 @@ readstrimming: $(INST_SOURCES)/cutsite_trimming.cpp (g++ -Wall -O2 -std=c++0x -o cutsite_trimming ${INST_SOURCES}/cutsite_trimming.cpp; mv cutsite_trimming ${INST_SCRIPTS}) ## Build Python lib -iced: $(INST_SOURCES)/ice_mod -ifeq ("$(RUNNER)","root") - @echo "Installing the iced package as root" - (cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install;) -else - @echo "Installing the iced package in --user repository [runner=$(RUNNER)]" - (cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install --user;) -endif +#iced: $(INST_SOURCES)/ice_mod +#ifeq ("$(RUNNER)","root") +# @echo "Installing the iced package as root" +# (cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install;) +#else +# @echo "Installing the iced package in --user repository [runner=$(RUNNER)]" +# (cd $(INST_SOURCES)/ice_mod/; ${PYTHON_PATH}/python setup.py install --user;) +#endif test: config_check @echo ${PYTHON_PATH} diff --git a/README.md b/README.md index e54289c..c60a56e 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,13 @@ ### An optimized and flexible pipeline for Hi-C data processing -![MultiQC](https://img.shields.io/badge/MultiQC-1.6-blue.svg) -![Singularity](https://img.shields.io/badge/Singularity-build-brightgreen.svg) +[![Build Status](https://travis-ci.com/nservant/HiC-Pro.svg?branch=devel_py3)](https://travis-ci.com/nservant/HiC-Pro) + +![Conda](https://img.shields.io/badge/Conda-build-brightgreen.svg) +![Singularity](https://img.shields.io/badge/Singularity-build-brightgreen.svg) +[![Docker](https://img.shields.io/badge/Docker-manual-yellow.svg)](https://hub.docker.com/repository/docker/nservant/hicpro) + +![MultiQC](https://img.shields.io/badge/MultiQC-1.8-blue.svg) [![Forum](https://img.shields.io/badge/Groups-%20join%20chat%20%E2%86%92-4fb99a.svg?style=flat-square)](https://groups.google.com/forum/#!forum/hic-pro) [![DOI](https://img.shields.io/badge/DOI-10.1186%2Fs13059--015--0831--x-lightgrey.svg?style=flat-square)](https://doi.org/10.1186/s13059-015-0831-x) @@ -25,7 +30,36 @@ If you use HiC-Pro, please cite : *Servant N., Varoquaux N., Lajoie BR., Viara E., Chen CJ., Vert JP., Dekker J., Heard E., Barillot E.* HiC-Pro: An optimized and flexible pipeline for Hi-C processing. Genome Biology 2015, 16:259 [doi:10.1186/s13059-015-0831-x](https://doi.org/10.1186/s13059-015-0831-x) -## Using HiC-Pro through Singularity +## Containers + +### Using HiC-Pro through `conda` + +In order to ease the installation of HiC-Pro dependancies, we provide a `yml` file for conda with all required tools. +In order to build your conda environment, first install [miniconda](https://docs.conda.io/en/latest/miniconda.html) and use : + +``` +conda env create -f MY_INSTALL_PATH/HiC-Pro/environment.yml -p WHERE_TO_INSTALL_MY_ENV +conda activate WHERE_TO_INSTALL_MY_ENV +``` + +### Using the HiC-Pro `Docker` image + +A docker image is automatically build and available on [Docker Hub](https://hub.docker.com/repository/docker/nservant/hicpro) +To pull a Docker image, simply use : + +``` +docker pull nservant/hicpro:latest +``` + +Note that the `tag` may depend on the HiC-Pro version. + +You can also build your own image from the root folder using + +``` +docker build -t hicpro:3.0.0 . +``` + +### Using HiC-Pro through `Singularity` HiC-Pro provides a Singularity container to ease its installation process. A ready-to-use container is available [here](https://zerkalo.curie.fr/partage/HiC-Pro/singularity_images/hicpro_latest_ubuntu.img). @@ -41,7 +75,7 @@ In order to build you own Singularity image; 2- Build the singularity HiC-Pro image using the 'Singularity' file available in the HiC-Pro root directory. ``` -sudo singularity build hicpro_latest_ubuntu.img MY_INSTALL_PATH/HiC-Pro/Singularity +sudo singularity build hicpro_latest_ubuntu.img MY_INSTALL_PATH/HiC-Pro/envs/Singularity ``` 3- Run HiC-pro @@ -64,16 +98,16 @@ HiC-Pro -h The HiC-Pro pipeline requires the following dependencies : - The [bowtie2](http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) mapper -- Python (>2.7) with *pysam (>=0.8.3)*, *bx-python(>=0.5.0)*, *numpy(>=1.8.2)*, and *scipy(>=0.15.1)* libraries. -**Note that the current version does not support python 3** +- Python (>3.7) with *pysam (>=0.15.4)*, *bx-python(>=0.8.8)*, *numpy(>=1.18.1)*, and *scipy(>=1.4.1)* libraries. +**Note that the current version no longer supports python 2** - R with the *RColorBrewer* and *ggplot2 (>2.2.1)* packages - g++ compiler -- samtools (>1.1) +- samtools (>1.9) - Unix sort (**which support -V option**) is required ! For Mac OS user, please install the GNU core utilities ! Note that Bowtie >2.2.2 is strongly recommanded for allele specific analysis. -To install HiC-Pro (>=2.7.8), be sure to have the appropriate rights and run : +To install HiC-Pro, be sure to have the appropriate rights and run : ``` tar -zxvf HiC-Pro-master.tar.gz @@ -83,15 +117,6 @@ make configure make install ``` -For older version (<2.7.8), the following process can be used - -``` -tar -zxvf HiC-Pro-master.tar.gz -cd HiC-Pro-master -## Edit config-install.txt file if necessary -make CONFIG_SYS=config-install.txt install -``` - Note that if some of these dependencies are not installed (i.e. not detected in the $PATH), HiC-Pro will try to install them. You can also edit the *config-install.txt* file and manually defined the paths to dependencies. @@ -100,9 +125,9 @@ You can also edit the *config-install.txt* file and manually defined the paths t |---------------|-------------------------------------------------------------------------------| | PREFIX | Path to installation folder | | BOWTIE2_PATH | Full path the bowtie2 installation directory | -| SAMTOOLS_PATH | Full path to the samtools installation directory (>1.1 ) | +| SAMTOOLS_PATH | Full path to the samtools installation directory | | R_PATH | Full path to the R installation directory | -| PYTHON_PATH | Full path to the python installation directory (>2.7 - python3 not supported) | +| PYTHON_PATH | Full path to the python installation directory | | CLUSTER_SYS | Scheduler to use for cluster submission. Must be TORQUE, SGE, SLURM or LSF | @@ -155,7 +180,7 @@ First have a look at the help message ! usage : HiC-Pro -i INPUT -o OUTPUT -c CONFIG [-s ANALYSIS_STEP] [-p] [-h] [-v] Use option -h|--help for more information - HiC-Pro 2.11.3 + HiC-Pro 3.0.0 --------------- OPTIONS @@ -238,7 +263,7 @@ Small fastq files (2M reads) extracted from the Dixon et al. 2012 paper are avai ## Run HiC-Pro time HICPRO_INSTALL_DIR/bin/HiC-Pro -c config_test_latest.txt -i test_data -o hicpro_latest_test -Run HiC-Pro 2.11.3 +Run HiC-Pro 3.0.0 -------------------------------------------- Thu Mar 19, 12:18:10 (UTC+0100) Bowtie2 alignment step1 ... diff --git a/Singularity b/Singularity index 503532e..1485091 100644 --- a/Singularity +++ b/Singularity @@ -40,15 +40,16 @@ From: ubuntu:latest # external tools echo "Installing dependancies ... " - conda install -y bowtie2 - conda install -y samtools + conda install -y bowtie2=2.3.5 + conda install -y samtools=1.9 - # Python (>2.7) with *pysam (>=0.8.3)*, *bx(>=0.5.0)*, *numpy(>=1.8.2)*, and *scipy(>=0.15.1)* libraries - conda install -y -c conda-forge python=2.7.15 - conda install -y -c anaconda scipy=1.2.1 - conda install -y -c anaconda numpy=1.16.3 - conda install -y -c bcbio bx-python=0.8.2 - conda install -y -c bioconda pysam=0.15.2 + # Python (>3.7.0) with *pysam (>=0.8.3)*, *bx(>=0.5.0)*, *numpy(>=1.8.2)*, and *scipy(>=0.15.1)* libraries + conda install -y -c conda-forge python=3.7.6 + conda install -y -c conda-forge scipy + conda install -y -c conda-forge numpy + conda install -y -c bioconda bx-python + conda install -y -c bioconda pysam + conda install -y -c bioconda iced # Install R conda update readline @@ -59,13 +60,13 @@ From: ubuntu:latest conda install -c r r-gridbase=0.4_7 # Install MultiQC - conda install -c bioconda multiqc=1.7 + conda install -c bioconda multiqc=1.8 # Install HiC-pro echo "Installing latest HiC-Pro release ..." #VERSION=$(curl -s https://github.com/nservant/HiC-Pro/releases/latest | egrep -o '2.[0-9]*.[0-9]*') #echo "v"$VERSION".zip" | wget --base=http://github.com/nservant/HiC-Pro/archive/ -i - -O hicpro_latest.zip && unzip hicpro_latest.zip - VERSION="devel" + VERSION="devel_py3" echo $VERSION".zip" | wget --base=http://github.com/nservant/HiC-Pro/archive/ -i - -O hicpro_latest.zip && unzip hicpro_latest.zip cd $(echo HiC-Pro-$VERSION) diff --git a/bin/HiC-Pro b/bin/HiC-Pro index 9189c04..122bda3 100755 --- a/bin/HiC-Pro +++ b/bin/HiC-Pro @@ -9,7 +9,7 @@ SOFT="HiC-Pro" -VERSION="2.11.4" +VERSION="3.0.0" function usage { echo -e "usage : $SOFT -i INPUT -o OUTPUT -c CONFIG [-s ANALYSIS_STEP] [-p] [-h] [-v]" @@ -161,11 +161,13 @@ fi GENOME_SIZE_FILE=`abspath $GENOME_SIZE` if [[ ! -e $GENOME_SIZE_FILE ]]; then + echo -e "Warning: $GENOME_SIZE_FILE not found. Look into the annotation folder ..." GENOME_SIZE_FILE=$ANNOT_DIR/$GENOME_SIZE fi GENOME_FRAGMENT_FILE=`abspath $GENOME_FRAGMENT` if [[ ! -e $GENOME_FRAGMENT_FILE ]]; then + echo -e "Warning: $GENOME_FRAGMENT_FILE not found. Look into the annotation folder ..." GENOME_FRAGMENT_FILE=$ANNOT_DIR/$GENOME_FRAGMENT fi @@ -265,7 +267,6 @@ if [[ $NEED_FASTQ == 1 ]]; then if [[ $nbin_r1 == 0 || $nbin_r2 == 0 || $nbin_r1 != $nbin_r2 ]]; then die "Error: Directory Hierarchy of rawdata '$INPUT' is not correct. Paired '.fastq' files with ${PAIR1_EXT}/${PAIR2_EXT} are required !" fi - elif [[ $NEED_BAM == 1 ]]; then nbin=$(find -L $INPUT -mindepth 2 -maxdepth 2 -name "*.bam" | wc -l) nbin_r1=$(find -L $INPUT -mindepth 2 -maxdepth 2 -name "*.bam" -and -name "*${PAIR1_EXT}* | wc -l") diff --git a/bin/utils/digest_genome.py b/bin/utils/digest_genome.py index 3007b7a..2c29a49 100755 --- a/bin/utils/digest_genome.py +++ b/bin/utils/digest_genome.py @@ -26,48 +26,47 @@ def find_re_sites(filename, sequences, offset): - infile = open(filename) - chr_id = None - big_str = "" - indices = [] - all_indices = [] - contig_names = [] - c = 0 - for line in infile: - c += 1 - if line.startswith(">"): - print line.split()[0][1:], "..." - # If this is not the first chromosome, find the indices and append - # them to the list - if chr_id is not None: - for rs in range(len(sequences)): - pattern = "(?=%s)" % sequences[rs].lower() - indices += [m.start() + offset[rs] - for m in re.finditer(pattern, big_str)] - indices.sort() - all_indices.append(indices) - indices = [] - - # This is a new chromosome. Empty the sequence string, and add the - # correct chrom id - big_str = "" - chr_id = line.split()[0][1:] - if chr_id in contig_names: - print "The fasta file contains several instance of", - print chr_id, ". Exit." - sys.exit(-1) - contig_names.append(chr_id) - else: - # As long as we don't change chromosomes, continue reading the - # file, and appending the sequences - big_str += line.lower().strip() - # Add the indices for the last chromosome - for rs in range(len(sequences)): - pattern = "(?=%s)" % sequences[rs].lower() - indices += [m.start() + offset[rs] - for m in re.finditer(pattern, big_str)] - indices.sort() - all_indices.append(indices) + with open(filename, 'r') as infile: + chr_id = None + big_str = "" + indices = [] + all_indices = [] + contig_names = [] + c = 0 + for line in infile: + c += 1 + if line.startswith(">"): + print("{}...".format(line.split()[0][1:])) + # If this is not the first chromosome, find the indices and append + # them to the list + if chr_id is not None: + for rs in range(len(sequences)): + pattern = "(?={})".format(sequences[rs].lower()) + indices += [m.start() + offset[rs]\ + for m in re.finditer(pattern, big_str)] + indices.sort() + all_indices.append(indices) + indices = [] + + # This is a new chromosome. Empty the sequence string, and add the + # correct chrom id + big_str = "" + chr_id = line.split()[0][1:] + if chr_id in contig_names: + print("The fasta file contains several instance of {}. Exit.".format(chr_id)) + sys.exit(-1) + contig_names.append(chr_id) + else: + # As long as we don't change chromosomes, continue reading the + # file, and appending the sequences + big_str += line.lower().strip() + # Add the indices for the last chromosome + for rs in range(len(sequences)): + pattern = "(?={})".format(sequences[rs].lower()) + indices += [m.start() + offset[rs] + for m in re.finditer(pattern, big_str)] + indices.sort() + all_indices.append(indices) return contig_names, all_indices @@ -76,27 +75,27 @@ def find_chromsomose_lengths(reference_filename): chromosome_lengths = [] chromosome_names = [] length = None - infile = open(reference_filename) - for line in infile: - if line.startswith(">"): - chromosome_names.append(line[1:].strip()) - if length is not None: - chromosome_lengths.append(length) - length = 0 - else: - length += len(line.strip()) - chromosome_lengths.append(length) + with open(reference_filename, 'r') as infile: + for line in infile: + if line.startswith(">"): + chromosome_names.append(line[1:].strip()) + if length is not None: + chromosome_lengths.append(length) + length = 0 + else: + length += len(line.strip()) + chromosome_lengths.append(length) return chromosome_names, np.array(chromosome_lengths) def replaceN(cs): npos = int(cs.find('N')) cseql = [] - if npos!= -1: + if npos != -1: for nuc in ["A","C","G","T"]: tmp = cs.replace('N', nuc, 1) tmpl = replaceN(tmp) - if type(tmpl)==list: + if type(tmpl) == list: cseql = cseql + tmpl else: cseql.append(tmpl) @@ -138,15 +137,15 @@ def replaceN(cs): offpos = int(cseq.find('^')) if offpos == -1: - print "Unable to detect offset for", cseq - print "Please, use '^' to specified the cutting position,", - print "i.e A^GATCT for HindIII digestion" + print("Unable to detect offset for {}. Please, use '^' to specify the cutting position,\ + i.e A^GATCT for HindIII digestion.".format(cseq)) sys.exit(-1) - for nuc in list(set(cseq)): - if nuc != 'A' and nuc != 'C' and nuc != 'G' and nuc != 'T' and nuc != 'N' and nuc != '^': - print "Find unexpected character ['",nuc,"']in restriction motif" - print "Note that multiple motifs should be separated by a space (not a comma !)" + for nuc in list(set(cs)): + if nuc not in ['A','T','G','C','N','^']: + print("Find unexpected character ['{}']in restriction motif".format(nuc)) + print("Note that multiple motifs should be separated by a space (not a comma !)") + sys.exit(-1) offset.append(offpos) @@ -166,9 +165,9 @@ def replaceN(cs): if out is None: out = os.path.splitext(filename)[0] + "_fragments.bed" - print "Analyzing", filename - print "Restriction site(s)", ",".join(sequences) - print "Offset(s)", ','.join(str(x) for x in offset) + print("Analyzing", filename) + print("Restriction site(s)", ",".join(sequences)) + print("Offset(s)", ','.join(str(x) for x in offset)) # Read fasta file and look for rs per chromosome contig_names, all_indices = find_re_sites(filename, sequences, offset=offset) @@ -183,17 +182,14 @@ def replaceN(cs): valid_fragments.append(valid_fragments_chr) # Write results - print "Writing to", out, "..." - outfile = open(out, "w") - for chrom_name, indices in zip(contig_names, valid_fragments): - frag_id = 0 - for begin, end in indices: - # allow to remove cases where the enzyme cut at - # the first position of the chromosome - if end > begin: - frag_id += 1 - frag_name = "HIC_%s_%d" % (chrom_name, frag_id) - outfile.write( - "%s\t%d\t%d\t%s\t0\t+\n" % (chrom_name, begin, - end, frag_name)) - outfile.close() + print("Writing to {} ...".format(out)) + with open(out, 'w') as outfile: + for chrom_name, indices in zip(contig_names, valid_fragments): + frag_id = 0 + for begin, end in indices: + # allow to remove cases where the enzyme cut at + # the first position of the chromosome + if end > begin: + frag_id += 1 + frag_name = "HIC_{}_{}".format(str(chrom_name), int(frag_id)) + outfile.write("{}\t{}\t{}\t{}\t0\t+\n".format(str(chrom_name), int(begin), int(end), str(frag_name))) diff --git a/bin/utils/extract_snps.py b/bin/utils/extract_snps.py index 2fbe0f6..8b98b90 100755 --- a/bin/utils/extract_snps.py +++ b/bin/utils/extract_snps.py @@ -22,17 +22,17 @@ def usage(): - print "This script was designed to extract informative SNPs information from two parental genotypes, and return the F1 genotype." + print("This script was designed to extract informative SNPs information from two parental genotypes, and return the F1 genotype.") """Usage function""" - print "Usage : python extract_snps.py" - print "-i/--vcf " - print "-a/--alt " - print "[-r/--ref] " - print "[-f/--filt] " - print "[-x/--exclude] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python extract_snps.py") + print("-i/--vcf ") + print("-a/--alt ") + print("[-r/--ref] ") + print("[-f/--filt] ") + print("[-x/--exclude] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return def get_args(): @@ -97,6 +97,23 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): return [alleles[int(ref_snp)], alleles[int(alt_snp)]] +class Check_input_parameters: + def ref_integrity(self, refSample, refidx): + if refSample != None and refidx == -1: + print("Error: REF sample not found", file=sys.stderr) + sys.exit(-1) + def ref_alt_coherence(self, refSample, altSample): + if refSample != None and altSample == None: + print("Error : Cannot change the REF allele without changing the ALT allele", file=sys.stderr) + sys.exit(-1) + def alt_integrity(self, altSample, altidx): + if altSample != None and altidx == -1: + print("Error : ALT sample not found", file=sys.stderr) + sys.exit(-1) + + + + if __name__ == "__main__": # Read command line arguments @@ -105,9 +122,11 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): refSample = None altSample = None exclusion = None - filt_qual=2 + filt_qual = 2 verbose = False - + + test_input_params = Check_input_parameters() + if len(opts) == 0: usage() sys.exit() @@ -131,21 +150,22 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): else: assert False, "unhandled option" - if verbose: - print >> sys.stderr, "## Loading VCF file '", vcfFile, "'..." - print >> sys.stderr, "## Alt = ", altSample - print >> sys.stderr, "## Filtering level = ", filt_qual - + if verbose: + print("## Loading VCF file {} ...".format(vcfFile), file=sys.stderr) + print("## Loading VCF file {} ...".format(vcfFile), file=sys.stderr) + print("## Alt = {}".format(altSample), file=sys.stderr) + print("## Filtering level = {}".format(filt_qual), file=sys.stderr) + if filt_qual > 2: - print >> sys.stderr, "Error: --filt" + print("Error: --filt", file=sys.stderr) usage() sys.exit() - + if vcfFile.endswith('.gz') or vcfFile.endswith('.gzip'): vcf_handle = gzip.open(vcfFile) else: vcf_handle = open(vcfFile) - + print("type of file: {}".format(type(vcf_handle)), file=sys.stderr) header = [] samples = [] altidx = -1 @@ -161,19 +181,22 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): conta_counter = 0 for line in vcf_handle: - line = line.rstrip() + try: + line = line.rstrip().decode() #in case of bytes object + except TypeError: + continue #print >> sys.stderr, line - ## for now we don't care about the header if line.startswith('##'): if refSample is not None and line.startswith("##reference="): - print "##reference=" + vcfFile + "[" + refSample + "]" + print("##reference= {} [ {} ]".format(vcfFile, refSample)) else: - print line + print(line) continue elif line.startswith('#'): header = line.split('\t') - samples = [ s.split('.')[0] for s in header[9:] ] + samples = [s.split('.')[0] for s in header[9:]] + print("samples = [ {} ]".format(samples), file=sys.stderr) for i in range(len(samples)): if samples[i] == refSample: refidx = i @@ -181,62 +204,63 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): altidx = i elif exclusion is not None: ## conta idx - exs=exclusion.split(",") + exs = exclusion.split(",") for i in range(len(exs)): ct = exs[i] if samples[i] == ct: contaidx.append(i) if verbose: - print >> sys.stderr, "## Potential Contaminant(s) = " + ct + print("## Potential Contaminant(s) = {}".format(ct), file=sys.stderr) ## Check if Bl6 is in the conta list if exclusion is not None: - exs=exclusion.split(",") + exs = exclusion.split(",") + for i in range(len(exs)): ct = exs[i] if ct == "REF": contaidx.append(-1) if verbose: - print >> sys.stderr, "## Potential Contaminant(s) = REF" + print("## Potential Contaminant(s) = REF", file=sys.stderr) + ## Check input parameters + test_input_params.ref_integrity(refSample, refidx) + test_input_params.ref_alt_coherence(refSample, altSample) + test_input_params.alt_integrity(altSample, altidx) + #if refSample != None and refidx == -1: + #print("Error : REF sample not found", file=sys.stderr) + #sys.exit(-1) + #if refSample != None and altSample == None: + #print("Error : Cannot change the REF allele without changing the ALT allele", file=sys.stderr) + #sys.exit(-1) - ## Check input parameters - if refSample != None and refidx == -1: - print >> sys.stderr, "Error : REF sample not found" - sys.exit(-1) - - if refSample != None and altSample == None: - print >> sys.stderr, "Error : Cannot change the REF allele without changing the ALT allele" - sys.exit(-1) - - if altSample != None and altidx == -1: - print >> sys.stderr, "Error : ALT sample not found" - sys.exit(-1) + #if altSample != None and altidx == -1: + #print("Error : ALT sample not found", file=sys.stderr) + #sys.exit(-1) - if refidx != -1: - print str(' '.join(header[0:9])) + " " + refSample + "-" + altSample + "-F1" + print(str(' '.join(header[0:9])) + " " + refSample + "-" + altSample + "-F1") else: - print str(' '.join(header[0:9])) + " " + "REF-" + altSample + "-F1" + print(str(' '.join(header[0:9])) + " " + "REF-" + altSample + "-F1") continue else: if altidx == -1 : - print >> sys.stderr, "Error : ALT name not found" + print("Error : ALT name not found", file=sys.stderr) sys.exit(-1) fields = line.split('\t',9) - var_counter+=1 + var_counter += 1 ## init list of contaminant - contg=[] + contg = [] ## check chromosomes name if re.compile('^chr').match(fields[0]): - chrom=fields[0] + chrom = fields[0] else: - chrom="chr"+str(fields[0]) + chrom = "chr" + str(fields[0]) ## Filter on PASS if filt_qual != 2 or (filt_qual == 2 and fields[6]=="PASS"): @@ -244,10 +268,10 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): if var_counter == 1: f = fields[8].split(':') if f[0] != "GT": - print >> sys.stderr, "Error : GT is expected to be at first index" + print("Error : GT is expected to be at first index", file=sys.stderr) sys.exit(-1) if filt_qual == 1 and f[len(f)-1] != "FI": - print >> sys.stderr, "Error : FI is expected to be at the last index" + print("Error : FI is expected to be at the last index", file=sys.stderr) sys.exit(-1) genotypes = fields[9].split('\t') @@ -266,7 +290,7 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): if contaidx[i] == -1: contg.append("0/0") else: - cg=genotypes[contaidx[i]].split(':') + cg = genotypes[contaidx[i]].split(':') cfi = cg[len(cg)-1] if filt_qual != 1 or filt_qual == 1 and cfi == str(1): contg.append(cg[0]) @@ -291,27 +315,29 @@ def get_filter_snp_gt(gref, galt, ref, alt, conta): snp_counter += 1 #altg[0]="1/1" ##print chrom + "\t" + fields[1] + "\t" + fields[2] + "\t" + geno[0] + "\t" + geno[1] + "\t" + fields[5] + "\t" + fields[6] + "\t" + fields[7] + "\t" + fields[8] + "\t" + ":".join(altg) - print chrom + "\t" + fields[1] + "\t" + fields[2] + "\t" + geno[0] + "\t" + geno[1] + "\t" + fields[5] + "\t" + fields[6] + "\t" + fields[7] + "\t" + "GT" + "\t" + "0/1" + print("{}\t{}\t{}\t{}\t{}\ + \t{}\t{}\t{}\tGT\t0/1".format(chrom, fields[1], fields[2],\ + geno[0], geno[1], fields[5], fields[6], fields[7])) else: - badqual_counter+=1 + badqual_counter += 1 else: - badqual_counter+=1 + badqual_counter += 1 if (verbose and var_counter % 100000 == 0): - print >> sys.stderr, "##", var_counter + print("##{}".format(var_counter), file=sys.stderr) if verbose: - print >> sys.stderr, "## extract SNPs report" - print >> sys.stderr, "## Total Number of SNPs =", var_counter - print >> sys.stderr, "## Number of reported SNPs =", snp_counter - print >> sys.stderr, "## -------------------------" - print >> sys.stderr, "## Number of non discriminant SNPs =", nonspe_counter - print >> sys.stderr, "## Number of heterozygous SNPs =", hetero_counter - print >> sys.stderr, "## Number of undefined genotype SNPs =", undefined_counter - print >> sys.stderr, "## Number of bad quality SNPs =", badqual_counter - print >> sys.stderr, "## Number of potential contaminant SNPs =", conta_counter + print("## extract SNPs report", file=sys.stderr) + print("## Total Number of SNPs ={}".format(var_counter), file=sys.stderr) + print("## Number of reported SNPs ={}".format(snp_counter), file=sys.stderr) + print("## -------------------------", file=sys.stderr) + print("## Number of non discriminant SNPs ={}".format(nonspe_counter), file=sys.stderr) + print("## Number of heterozygous SNPs ={}".format(hetero_counter), file=sys.stderr) + print("## Number of undefined genotype SNPs ={}".format(undefined_counter), file=sys.stderr) + print("## Number of bad quality SNPs =".format(badqual_counter), file=sys.stderr) + print("## Number of potential contaminant SNPs ={}".format(conta_counter), file=sys.stderr) vcf_handle.close() diff --git a/bin/utils/hicpro2fithic.py b/bin/utils/hicpro2fithic.py index 18ba716..0973f83 100755 --- a/bin/utils/hicpro2fithic.py +++ b/bin/utils/hicpro2fithic.py @@ -13,73 +13,81 @@ # Modified by Arya Kaul - 12/21/2017 - bug fix when no -o option specified -def outputfithicform(bedPath, matrixPath, intCPath, fragMapPath, biasVectorPath=None, biasVectorOutput=None,res=0): - print "Loading matrix file..." +def outputfithicform(bedPath, matrixPath, intCPath, fragMapPath, biasVectorPath=None, biasVectorOutput=None, res=0): + print("Loading matrix file...") fragDic = {} # resolution of data to be determined if res=0 at this point with open(bedPath, 'r') as bedFile: for lines in bedFile: line = lines.rstrip().split() - chrNum = line[0] - start = line[1] - en = line[2] - if res==0: res=int(en)-int(start) # edge case but if first fragment in file is smaller than res, there is a problem - mid = int(start)+ int(res/2) + chrNum, start, en = line[0], line[1], line[2] + if res == 0: res = int(en) - int(start) # edge case but if first fragment in file is smaller than res, there is a problem + mid = int(start) + int(res/2) index = int(line[3]) fragDic[index] = [chrNum, start, mid, 0] # last field is total contact count: tcc - lineCount=0 + lineCount = 0 with open(matrixPath, 'r') as matrixFile: - with gzip.open(intCPath, 'w') as interactionCountsFile: + with gzip.open(intCPath, 'wb') as interactionCountsFile: for lines in matrixFile: line = lines.rstrip().split() - i = int(line[0]) - j = int(line[1]) + i, j = int(line[0]), int(line[1]) cc = float(line[2]) # this can be float or int fragDic[i][3] += cc fragDic[j][3] += cc - if cc==int(cc): cc=int(cc) # make sure to convert to integer if it ends with ".0" - interactionCountsFile.write(str(fragDic[i][0])+'\t'+str(fragDic[i][2])+'\t'+\ - str(fragDic[j][0])+'\t'+str(fragDic[j][2])+'\t'+str(cc)+"\n") - lineCount+=1 - if lineCount%1000000==0: print "%d million lines read" % int(lineCount/1000000) - - with gzip.open(fragMapPath, 'w') as fragmentMappabilityFile: + if cc == int(cc): + cc = int(cc) # make sure to convert to integer if it ends with ".0" + interactionCountsFile.write("{}\t{}\t{}\t{}\t{}\n".format(str(fragDic[i][0]), + str(fragDic[i][2]), + str(fragDic[j][0]), + str(fragDic[j][2]), + str(cc)).encode()) + lineCount += 1 + if lineCount % 1000000 == 0: + print("{} million lines read".format(int(lineCount/1000000))) + + with gzip.open(fragMapPath, 'wb') as fragmentMappabilityFile: for indices in sorted(fragDic): # sorted so that we start with the smallest index toWrite = 0 - if fragDic[indices][3]> 0: toWrite=1 - fragmentMappabilityFile.write(str(fragDic[indices][0])+'\t'+str(fragDic[indices][1])+'\t'+\ - str(fragDic[indices][2])+'\t'+str(int(fragDic[indices][3]))+'\t'+str(toWrite)+'\n') + if fragDic[indices][3] > 0: + toWrite = 1 + fragmentMappabilityFile.write("{}\t{}\t{}\t{}\t{}\n".format(fragDic[indices][0], + fragDic[indices][1], + fragDic[indices][2], + int(fragDic[indices][3]), + toWrite).encode()) if biasVectorPath is not None and biasVectorOutput is not None: - print "Converting bias file..." + print("Converting bias file...") - biasVec=[0,0] # bias sum and biasCount - biasDic={} # bias for each index - i=1 # one-based indices + biasVec = [0,0] # bias sum and biasCount + biasDic = {} # bias for each index + i = 1 # one-based indices with open(biasVectorPath, 'r') as biasVectorFile: for lines in biasVectorFile: value = float(lines.rstrip()) #just one entry that can be nan or a float index = int(i) - i+=1 - biasDic[index]=value + i += 1 + biasDic[index] = value if not math.isnan(value): - biasVec[0]+=value #sum - biasVec[1]+=1 # count + biasVec[0] += value #sum + biasVec[1] += 1 # count # # Centering the bias values on 1. - biasAvg=biasVec[0]/biasVec[1] + biasAvg=biasVec[0] / biasVec[1] - with gzip.open(biasVectorOutput, 'w') as biasVectorOutputFile: + with gzip.open(biasVectorOutput, 'wb') as biasVectorOutputFile: for index in sorted(biasDic): - value=biasDic[index] + value = biasDic[index] if not math.isnan(value): - value=value/biasAvg + value = value/biasAvg else: - value=-1 - biasVectorOutputFile.write(str(fragDic[index][0])+'\t'+str(fragDic[index][2])+'\t'+str(value)+'\n') - print "Conversion from HiC-Pro to Fit-Hi-C format completed" + value = -1 + biasVectorOutputFile.write("{}\t{}\t{}\n".format(str(fragDic[index][0]), + str(fragDic[index][2]), + str(value)+'\n').encode()) + print("Conversion from HiC-Pro to Fit-Hi-C format completed") #outputfithicform(args.bedPath, args.matrixPath, args.intCPath, args.fragMapPath, args.biasVectorPathandOutput[0], args.biasVectorPathandOutput[1]) diff --git a/bin/utils/hicpro2higlass.sh b/bin/utils/hicpro2higlass.sh index ff11aee..6368d18 100755 --- a/bin/utils/hicpro2higlass.sh +++ b/bin/utils/hicpro2higlass.sh @@ -88,7 +88,7 @@ vercomp () { } function usage { - echo -e "usage : hicpro2higlass -i INPUT -r RESOLUTION -c CHROMSIZE [-n] [-o ODIR] [-t TEMP] [-h]" + echo -e "usage : hicpro2higlass -i INPUT -r RESOLUTION -c CHROMSIZE [-n] [-o ODIR] [-t TEMP] [-f FLOAT] [-h]" echo -e "Use option -h|--help for more information" } @@ -105,6 +105,7 @@ function help { echo " -c|--chrom CHROMSIZE : chromosome size file" echo " -p|--proc NB_CPU : number of CPUs for cooler" echo " [-n|--norm] : run cooler matrix balancing algorithm" + echo " [-f|--float] : cooler count as float for already normalized data" echo " [-o|--out] : output path. Default is current path" echo " [-t|--temp] TEMP : path to tmp folder. Default is current path" echo " [-h|--help]: help" @@ -130,6 +131,7 @@ for arg in "$@"; do "--out") set -- "$@" "-o" ;; "--temp") set -- "$@" "-t" ;; "--norm") set -- "$@" "-n" ;; + "--float") set -- "$@" "-f" ;; "--help") set -- "$@" "-h" ;; *) set -- "$@" "$arg" esac @@ -138,18 +140,20 @@ done INPUT_HICPRO="" INPUT_BED="" NORMALIZE=0 +FLOAT=0 NPROC=1 CHROMSIZES_FILE="" RES=10000 OUT="./" TEMP="./" -while getopts ":i:b:c:p:r:o:t:nh" OPT +while getopts ":i:b:c:p:r:o:t:nfh" OPT do case $OPT in i) INPUT_HICPRO=$OPTARG;; b) INPUT_BED=$OPTARG;; n) NORMALIZE=1;; + f) FLOAT=1;; c) CHROMSIZES_FILE=$OPTARG;; p) NPROC=$OPTARG;; r) RES=$OPTARG;; @@ -223,8 +227,12 @@ if [[ $DATATYPE == "MATRIX" ]]; then out=$(basename $INPUT_HICPRO | sed -e 's/.mat.*/.cool/') cooler makebins $CHROMSIZES_FILE $RES > $tmp_dir/bins.bed - cooler load -f coo --one-based $tmp_dir/bins.bed $INPUT_HICPRO $tmp_dir/$out - + if [ $FLOAT == 1 ]; + then + cooler load --count-as-float -f coo --one-based $tmp_dir/bins.bed $INPUT_HICPRO $tmp_dir/$out + else + cooler load -f coo --one-based $tmp_dir/bins.bed $INPUT_HICPRO $tmp_dir/$out + fi echo -e "\nZoomify .cool file ..." if [[ $NORMALIZE == 1 ]]; then cooler zoomify --nproc ${NPROC} --balance $tmp_dir/$out diff --git a/bin/utils/make_viewpoints.py b/bin/utils/make_viewpoints.py index 8f0de11..6059682 100755 --- a/bin/utils/make_viewpoints.py +++ b/bin/utils/make_viewpoints.py @@ -21,37 +21,36 @@ def usage(): """Usage function""" - print "Usage : python mapped_2hic_fragments.py" - print "-i/--validPairs " - print "-f/--fragmentFile " - print "-t/--target " - print "[-e/--exclusion] " - print "[-o/--output] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python mapped_2hic_fragments.py") + print("-i/--validPairs ") + print("-f/--fragmentFile ") + print("-t/--target ") + print("[-c/--cis] ") + print("[-e/--exclusion] ") + print("[-o/--oprefix] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return - def get_args(): """Get argument""" try: opts, args = getopt.getopt( sys.argv[1:], - "i:f:t:e:o:vh", + "i:f:t:e:o:cvh", ["validPairsFile=", "fragmentsFile=", "targetFile=", "exclusionSize=", - "output=", - "verbose", "help"]) - except getopt.GetoptError, err: - print "GetoptError: " + str(err) + "\n" + "oprefix=", + "cis", "verbose", "help"]) + except getopt.GetoptError: usage() sys.exit(-1) return opts -def load_BED(in_file, exclusionSize=0, verbose=False): +def load_BED(in_file, exclusionSize=0, chroms=None, verbose=False): """ Read a BED file and store the intervals in a tree @@ -64,24 +63,36 @@ def load_BED(in_file, exclusionSize=0, verbose=False): """ x = {} x_ex = {} + skipped_chrom = [] if verbose: - print >> sys.stderr, "## Loading BED file '", in_file, "'..." + print("## Loading BED file {} ...".format(in_file), file=sys.stderr) nline = 0 with open(in_file) as bed_handle: for line in bed_handle: - if nline%1000000==0 and verbose: print >> sys.stderr, "%d million lines loaded" % int(nline/1000000) - nline +=1 + if len(line.strip()) == 0: + continue + if nline % 1000000 == 0 and nline != 0 and verbose: + sys.stderr.write("{} million lines loaded\n".format(int(nline/1000000))) + nline += 1 bedtab = line.split("\t") try: chromosome, start, end, name = bedtab[:4] except ValueError: - print >> sys.stderr, "Warning : wrong input format in line", nline,". Not a BED file !?" + print("Warning : wrong input format in line {}. Not a BED file !?".format(nline), file=sys.stderr) + sys.exit(1) continue # BED files are zero-based as Intervals objects start = int(start) # + 1 end = int(end) name = name.strip() + + if chroms is not None and chromosome not in chroms: + if chromosome not in skipped_chrom: + print("Warning : Restrict to cis interactions - {} skipped".format(chromosome), file=sys.stderr) + skipped_chrom.append(chromosome) + continue + if chromosome in x: tree = x[chromosome] tree.add_interval(Interval(start, end, value={'name': name})) @@ -100,12 +111,11 @@ def load_BED(in_file, exclusionSize=0, verbose=False): tree_ex.add_interval(Interval(start - int(exclusionSize), start, value={'name': str(name) + "_up"})) tree_ex.add_interval(Interval(end, end + int(exclusionSize), value={'name': str(name) + "_dwn"})) x_ex[chromosome] = tree_ex - bed_handle.close() return (x, x_ex) -def get_overlapping_fragment(frag, chrom, pos, quiet=False): +def get_overlapping_fragment(frag, chrom, pos, quiet=False, allow_multiple=False): """ Intersect a given read with the set of restriction fragments @@ -118,24 +128,34 @@ def get_overlapping_fragment(frag, chrom, pos, quiet=False): if chrom in frag: # Overlap with the start of the read (zero-based) ifrag = frag[chrom].find(int(pos), int(pos+1)) - if len(ifrag) > 1: - if not quiet: print >> sys.stderr, "Warning : ", len(ifrag), " fragments found for read at", chrom, ":", pos, "- skipped", ifrag + if len(ifrag) > 1 and allow_multiple==False: + if not quiet: + sys.stderr.write("Warning : {} fragments found for read at {}:{} -skipped {}\n".format(len(ifrag), chrom, pos, ifrag)) return None elif len(ifrag) == 0: - if not quiet: print >> sys.stderr, "Warning - no fragments found for read at", chrom, ":", pos, "- skipped" + if not quiet: + sys.stderr.write("Warning - no fragments found for read at {}:{} -skipped\n".format(chrom, pos)) return None else: - return ifrag[0] + return ifrag else: - if not quiet: print >> sys.stderr, "Warning - no fragments found for read at", chrom, ":", pos, "- skipped" + if not quiet: + sys.stderr.write("Warning - no fragments found for read at {}:{} -skipped\n".format(chrom, pos)) return None +def init_dict(): + repdict = {} + repdict['c_r_counter'] = 0 + repdict['c_c_counter'] = 0 + repdict['exclu_counter'] = 0 + return(repdict) if __name__ == "__main__": # Read command line arguments opts = get_args() verbose = False - output = None + cisOnly = False + oprefix = None exclusionSize = 0 if len(opts) == 0: @@ -154,8 +174,10 @@ def get_overlapping_fragment(frag, chrom, pos, quiet=False): targetFile = arg elif opt in ("-e", "--exclusion"): exclusionSize = arg - elif opt in ("-o", "--output"): - output = arg + elif opt in ("-o", "--oprefix"): + oprefix = arg + elif opt in ("-c", "--cis"): + cisOnly = True elif opt in ("-v", "--verbose"): verbose = True else: @@ -163,112 +185,133 @@ def get_overlapping_fragment(frag, chrom, pos, quiet=False): # Verbose mode if verbose: - print >> sys.stderr, "## make_viewpoints.py" - print >> sys.stderr, "## validPairsFile=", validPairsFile - print >> sys.stderr, "## fragmentFile=", fragmentFile - print >> sys.stderr, "## targetFile=", targetFile - print >> sys.stderr, "## exclusionSize=", exclusionSize - print >> sys.stderr, "## verbose=", verbose, "\n" + sys.stderr.write("## make_viewpoints.py\n") + sys.stderr.write("## validPairsFile={}\n".format(validPairsFile)) + sys.stderr.write("## fragmentFile={}\n".format(fragmentFile)) + sys.stderr.write("## targetFile={}\n".format(targetFile)) + sys.stderr.write("## cisOnly={}\n".format(cisOnly)) + sys.stderr.write("## exclusionSize={}\n".format(exclusionSize)) + sys.stderr.write("## verbose={}\n".format(verbose)) # Read the BED files if verbose: - print >> sys.stderr, "## Loading data ..." + sys.stderr.write("## Loading data ...\n") - resFrag = load_BED(fragmentFile, verbose)[0] (target, exclu) = load_BED(targetFile, exclusionSize=exclusionSize, verbose=verbose) - + if cisOnly: + resFrag = load_BED(fragmentFile, chroms=target.keys(), verbose=verbose)[0] + else: + resFrag = load_BED(fragmentFile, verbose=verbose)[0] + # Read the validPairs file if verbose: - print >> sys.stderr, "## Opening file '", validPairsFile, "'..." + sys.stderr.write("## Opening file {} ...\n".format(validPairsFile)) nline = 0 repdict = {} - c_c_counter = 0 - r_r_counter = 0 - c_r_counter = 0 - ua_counter = 0 - exclu_counter = 0 + r_r_counter, ua_counter = 0, 0 with open(validPairsFile) as in_handle: - if nline%1000000==0 and verbose: print >> sys.stderr, "%d million lines processed" % int(nline/1000000) + if nline % 1000000 == 0 and nline > 0 and verbose: + sys.stderr.write("{} lines processed\n".format(nline)) for line in in_handle: - nline +=1 + nline += 1 intab = line.split("\t") try: readname, r1_chr, r1_start, r1_strand, r2_chr, r2_start, r2_strand = intab[:7] except ValueError: - print >> sys.stderr, "Warning : wrong input format in line", nline,". Not a validPairs file !?" + sys.stderr.write("Warning : wrong input format in line {}\ + .Not a validPairs file !?\n".format(nline)) continue - r1_resfrag = None - r2_resfrag = None - capture = None - reporter = None - + r1_resfrag = r2_resfrag = reporter = reporter_chrom = captures = None + ## Intersect with target if len(exclu) > 0: - r1_resfrag = get_overlapping_fragment(exclu, r1_chr, int(r1_start), quiet=True) - r2_resfrag = get_overlapping_fragment(exclu, r2_chr, int(r2_start), quiet=True) + r1_resfrag = get_overlapping_fragment(exclu, r1_chr, int(r1_start), quiet=True, allow_multiple=True) + r2_resfrag = get_overlapping_fragment(exclu, r2_chr, int(r2_start), quiet=True, allow_multiple=True) if r1_resfrag is None and r2_resfrag is None: - r1_resfrag = get_overlapping_fragment(target, r1_chr, int(r1_start), quiet=True) - r2_resfrag = get_overlapping_fragment(target, r2_chr, int(r2_start), quiet=True) + r1_resfrag = get_overlapping_fragment(target, r1_chr, int(r1_start), quiet=True, allow_multiple=True) + r2_resfrag = get_overlapping_fragment(target, r2_chr, int(r2_start), quiet=True, allow_multiple=True) if r1_resfrag is not None: - capture = r1_resfrag + captures = r1_resfrag else: - r1_resfrag = get_overlapping_fragment(resFrag, r1_chr, int(r1_start)) + r1_resfrag = get_overlapping_fragment(resFrag, r1_chr, int(r1_start), quiet=True, allow_multiple=False) if r1_resfrag is not None: - reporter = r1_resfrag + reporter = r1_resfrag[0] + reporter_chrom = r1_chr else: ua_counter += 1 - #print >> sys.stderr, "Warning : reads [", r1_chr, ":", r1_start, "] do not overlap with a capture nor a restriction fragment !" - if r2_resfrag is not None: - capture = r2_resfrag + captures = r2_resfrag else: - r2_resfrag = get_overlapping_fragment(resFrag, r2_chr, int(r2_start)) + r2_resfrag = get_overlapping_fragment(resFrag, r2_chr, int(r2_start), quiet=True, allow_multiple=False) if r2_resfrag is not None: - reporter = r2_resfrag + reporter = r2_resfrag[0] + reporter_chrom = r2_chr else: ua_counter += 1 - #print >> sys.stderr, "Warning : reads [", r2_chr, ":", r2_start, "] do not overlap with a capture nor a restriction fragment !" else: - exclu_counter += 1 - - ## Counts - if capture is not None and reporter is not None: - c_r_counter += 1 - if not repdict.has_key(capture.value['name']): - repdict[capture.value['name']]={} - - if repdict[capture.value['name']].has_key(reporter.value['name']): - repdict[capture.value['name']][reporter.value['name']]['count'] +=1 + if r1_resfrag is None: + xfrag=r2_resfrag else: - repdict[capture.value['name']][reporter.value['name']] = {'chr':r1_chr, 'start':reporter.start, 'end':reporter.end, 'count':1} - elif capture is not None and reporter is None: - c_c_counter += 1 - elif capture is None and reporter is not None: + xfrag=r1_resfrag + for x in xfrag: + vp = x.value['name'] + if not vp in repdict: + repdict[vp]=init_dict() + repdict[vp]['exclu_counter'] += 1 + + ## Counts + if captures is not None and reporter is not None : + for capture in captures: + vp=capture.value['name'] + if not vp in repdict: + repdict[vp] = init_dict() + repdict[vp]['c_r_counter'] += 1 + + if reporter.value['name'] in repdict[vp]: + repdict[vp][reporter.value['name']]['count'] += 1 + else: + repdict[vp][reporter.value['name']] = {'chr':reporter_chrom, 'start':reporter.start, 'end':reporter.end, 'count':1} + + elif captures is not None and reporter is None: + for capture in captures: + vp=capture.value['name'] + if not vp in repdict: + repdict[vp] = init_dict() + repdict[vp]['c_c_counter'] += 1 + elif captures is None and reporter is not None: r_r_counter += 1 in_handle.close() ## Write - if output is not None: - sys.stdout = open(output, 'w') - for k in repdict: - print "track type=bedGraph name='hicpro "+ k +"' description='hicpro "+ k +"' visibility=full color=200,100,0 altColor=0,100,200 priority=20" - for key, value in repdict[k].iteritems(): - print value['chr']+ "\t" +str(value['start'])+ "\t" +str(value['end'])+ "\t" + str(value['count']) + if oprefix is None: + ofile=k + ".bedgraph" + else: + ofile=oprefix + "_" + k + ".bedgraph" + print("Writing in " + k + "_viewpoint.bedgraph") + f = open(ofile, 'w') + + f.write("track type=bedGraph name='hicpro {}' description='hicpro {}' visibility=full color=200,100,0 altColor=0,100,200 priority=20\n".format(k, k)) + for key, value in repdict[k].items(): + if 'chr' in key: + f.write("{}\t{}\t{}\t{}\n".format(value['chr'], str(value['start']),\ + str(value['end']), str(value['count']))) + + ## stats + sys.stderr.write("## [{}] CAP-REP read pairs = {}\n".format(k, repdict[k]['c_r_counter'])) + sys.stderr.write("## [{}] CAP-CAP read pairs = {}\n".format(k, repdict[k]['c_c_counter'])) + sys.stderr.write("## [{}] Excluded reads = {}\n".format(k, repdict[k]['exclu_counter'])) + f.close() - ## stats - print >> sys.stderr, "CAP-REP read pairs = ", c_r_counter - print >> sys.stderr, "CAP-CAP read pairs = ", c_c_counter - print >> sys.stderr, "REP-REP read pairs = ", r_r_counter - print >> sys.stderr, "Excluded reads =", exclu_counter - print >> sys.stderr, "UA reads =", ua_counter + sys.stderr.write("## REP-REP read pairs = {}\n".format(r_r_counter)) + sys.stderr.write("## UA reads = {}\n".format(ua_counter)) diff --git a/bin/utils/sparseToDense.py b/bin/utils/sparseToDense.py index def6afe..6db1f4f 100755 --- a/bin/utils/sparseToDense.py +++ b/bin/utils/sparseToDense.py @@ -41,34 +41,43 @@ def load_lengths_perchr(filename, add_name=True): lengths = [(data[:, 0] == i).sum() for i in u[np.argsort(idx)]] if add_name: return (np.array(lengths), u[np.argsort(idx)]) - else: - return np.array(lengths) + return np.array(lengths) if __name__ == "__main__": import argparse parser = argparse.ArgumentParser() parser.add_argument("filename") - parser.add_argument("-b", "--bins", help="BED file with bins coordinates. If provided the chromosome lengths are used to define the output matrix size") - parser.add_argument("-g", "--org", help="Reference genome. Used if --ins is specified", default='org') - - parser.add_argument("-d", "--di", help="If specified the output matrix is formatted for Dixon et al. TADs calling (directionality index). In this case --bins is required", action='store_true') - parser.add_argument("-i", "--ins", help="If specified the output matrix is formatted for Crane et al. TADs calling (insulation score). In this case --bins is required", action='store_true') - parser.add_argument("-c", "--perchr", help="If specified intrachromosomal maps are written per chromosome as individual dense matrices. In this case, --bins must also be specified", action='store_true') + parser.add_argument("-b", "--bins", help="BED file with bins coordinates.\ + If provided the chromosome lengths are used to\ + define the output matrix size") + parser.add_argument("-g", "--org", help="Reference genome.\ + Used if --ins is specified", default='org') + + parser.add_argument("-d", "--di", help="If specified the output matrix is\ + formatted for Dixon et al. TADs calling (directionality index).\ + In this case --bins is required", action='store_true') + parser.add_argument("-i", "--ins", help="If specified the output matrix is\ + formatted for Crane et al. TADs calling (insulation score)\ + .In this case --bins is required", action='store_true') + parser.add_argument("-c", "--perchr", help="If specified intrachromosomal\ + maps are written per chromosome as individual dense\ + matrices. In this case, --bins must also be specified", + action='store_true') parser.add_argument("-o", "--output", help="Output filename") args = parser.parse_args() if args.di is True and args.bins is None: - print "--bins parameter is required when --di is specified" + print("--bins parameter is required when --di is specified") sys.exit(1) if args.ins is True and args.bins is None: - print "--bins parameter is required when --is is specified" + print("--bins parameter is required when --is is specified") sys.exit(1) if args.perchr is True and args.bins is None: - print "--bins parameter is required when --perchr is specified" + print("--bins parameter is required when --perchr is specified") sys.exit(1) ## bin option @@ -90,7 +99,7 @@ def load_lengths_perchr(filename, add_name=True): if args.di is True or args.ins is True: bins = load_bed(args.bins) if len(bins) != counts.shape[1]: - print "Error - number of rows in BED and matrix files are not equal" + print("Error - number of rows in BED and matrix files are not equal") sys.exit(1) if args.ins is True: @@ -103,7 +112,7 @@ def myfunc( x, idx, org): if args.perchr is False: counts = counts.toarray() counts = counts + counts.T - counts[np.diag_indices_from(counts)] /= 2 + counts[np.diag_indices_from(counts)] = counts[np.diag_indices_from(counts)] / 2 counts = np.round(counts, 3) ## Output name for save @@ -130,11 +139,14 @@ def myfunc( x, idx, org): lc = np.concatenate([np.array([0]), lengths.cumsum()]) for i in range(1, len(lc)): - print str(chrnames[i-1]) + "..." - idxintra = np.where(((counts.row >= lc[i-1]) & (counts.row=lc[i-1]) & (counts.col= lc[i-1]) & (counts.row=lc[i-1]) & (counts.col= lc[i-1]) & (counts.row=lc[i-1]) & (counts.col capture.bedgraph + HICPRO_PATH/bin/utils/make_viewpoints -i hicpro_res/hic_results/data/dixon_2M/dixon_2M_allValidPairs -f HICPRO_PATH/data_info/HindIII_resfrag_hg19.bed -t mycapture.bed -e 1000 -o OUTPUT_DIR/output_ -v ``` ### hicpro2juicebox.sh OR 'How can I load my HiC-Pro data into Juicebox visualization software ?' @@ -68,10 +68,10 @@ This utility requires HiC-Pro version 2.7.6 or later, and the installation of [J ``` ## Convert HiC-Pro output to Juicebox input - HICPRO_PATH/bin/utils/hicpro2juicebox.sh -i hicpro_res/hic_results/data/dixon_2M/dixon_2M_allValidPairs -g chrom_hg19.sizes -j /usr/local/juicebox/juicebox_clt_1.4.jar + HICPRO_PATH/bin/utils/hicpro2juicebox.sh -i hicpro_res/hic_results/data/dixon_2M/dixon_2M_allValidPairs -g chrom_hg19.sizes -j /usr/local/juicer/juicer_tools.1.7.5_linux_x64_jcuda.0.8.jar ## Convert HiC-Pro output to Juicebox input up to restriction fragment resolution - HICPRO_PATH/bin/utils/hicpro2juicebox.sh -i hicpro_res/hic_results/data/dixon_2M/dixon_2M_allValidPairs -g chrom_hg19.sizes -j /usr/local/juicebox/juicebox_clt_1.4.jar -f HICPRO_PATH/data_info/HindIII_resfrag_hg19.bed + HICPRO_PATH/bin/utils/hicpro2juicebox.sh -i hicpro_res/hic_results/data/dixon_2M/dixon_2M_allValidPairs -g chrom_hg19.sizes -j /usr/local/juicer/juicer_tools.1.7.5_linux_x64_jcuda.0.8.jar -f HICPRO_PATH/data_info/HindIII_resfrag_hg19.bed ``` ### sparseToDense.py OR 'How can I convert HiC-Pro output into dense format ?' @@ -112,6 +112,8 @@ See https://github.com/mirnylab/cooler for .cool Hi-C data format. The path to c HICPRO_PATH/bin/utils/hicpro2higlass.sh -i hic_results/data/dixon_2M/dixon_2M_allValidPairs -r 40000 -c chrom_hg19.sizes -n ``` +Note that you should use the `--float` option for iced normalized data. + ### split_sparse.py OR 'How can I split my HiC-Pro sparse format ?' This utility allows to split a genome-wide contact maps generated by HiC-Pro into per-chromosome interaction maps. diff --git a/environment.yml b/environment.yml new file mode 100644 index 0000000..1aa7b45 --- /dev/null +++ b/environment.yml @@ -0,0 +1,23 @@ +# conda env create -f environment.yml +name: HiC-Pro_v3.0.0 +channels: + - conda-forge + - bioconda + - defaults +dependencies: + - python=3.7.6 + - scipy=1.4.1 + - numpy=1.18.1 + - iced=0.5.4 + - bx-python=0.8.8 + - pysam=0.15.4 + - cooler=0.8.6 + + - r-base=3.6.3 + - r-ggplot2=3.1.1 + - r-rcolorbrewer=1.1_2 + - r-gridbase=0.4_7 + + - bowtie2=2.3.5 + - samtools=1.9 + - multiqc=1.8 diff --git a/scripts/bowtie_combine.sh b/scripts/bowtie_combine.sh index f3f246e..6c1dda0 100755 --- a/scripts/bowtie_combine.sh +++ b/scripts/bowtie_combine.sh @@ -41,8 +41,13 @@ mapping_combine() ## Set a default for legacy config files that do not have SORT_RAM set if [[ "${SORT_RAM}" == "" ]]; then - SORT_RAM="768M" + SORT_RAM="768" fi + + ## Divide the SORT_RAM by the number of Cpus + SORT_RAM=$(echo ${SORT_RAM} | sed -e 's/M$//') + SORT_RAM=$(( ${SORT_RAM}/${N_CPU} )) + ## Merge local and global alignment if [[ -e ${BOWTIE2_GLOBAL_OUTPUT_DIR}/${prefix}.bwt2glob.bam && -e ${BOWTIE2_LOCAL_OUTPUT_DIR}/${prefix}.bwt2glob.unmap_bwt2loc.bam ]]; then @@ -51,7 +56,7 @@ mapping_combine() exec_cmd $cmd 2>&1 ## Sort merge file. In theory, should be perform by "merge -n", but do not work in some cases ... depending on read name ? - cmd="${SAMTOOLS_PATH}/samtools sort -@ ${N_CPU} -m ${SORT_RAM} -n -T ${TMP_DIR}/$tmp_prefix -o ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.sorted.bam ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.bam" + cmd="${SAMTOOLS_PATH}/samtools sort -@ ${N_CPU} -m ${SORT_RAM}M -n -T ${TMP_DIR}/$tmp_prefix -o ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.sorted.bam ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.bam" exec_cmd $cmd 2>&1 cmd="mv ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.sorted.bam ${BOWTIE2_FINAL_OUTPUT_DIR}/${prefix}.bwt2merged.bam" diff --git a/scripts/build_matrix b/scripts/build_matrix new file mode 100755 index 0000000..aa90992 Binary files /dev/null and b/scripts/build_matrix differ diff --git a/scripts/cutsite_trimming b/scripts/cutsite_trimming new file mode 100755 index 0000000..34fe944 Binary files /dev/null and b/scripts/cutsite_trimming differ diff --git a/scripts/src/ice_mod/iced/scripts/ice b/scripts/ice similarity index 89% rename from scripts/src/ice_mod/iced/scripts/ice rename to scripts/ice index 10f5f22..89dae73 100755 --- a/scripts/src/ice_mod/iced/scripts/ice +++ b/scripts/ice @@ -8,7 +8,6 @@ from scipy import sparse import iced from iced.io import loadtxt, savetxt - parser = argparse.ArgumentParser("ICE normalization") parser.add_argument('filename', metavar='File to load', @@ -46,6 +45,7 @@ parser.add_argument("--verbose", "-v", default=False) args = parser.parse_args() filename = args.filename +filename = filename.encode() # Deprecating filtering_perc option filter_low_counts = None @@ -55,8 +55,8 @@ if "--filtering_perc" in sys.argv: "'--filter_low_counts_perc' instead.'") # And print it again because deprecation warnings are not displayed for # recent versions of python - print "--filtering_perc is deprecated. Please use filter_low_counts_perc" - print "instead. This option will be removed in ice 0.3" + print("--filtering_perc is deprecated. Please use filter_low_counts_perc") + print("instead. This option will be removed in ice 0.3") filter_low_counts = args.filtering_perc if "--filter_low_counts_perc" in sys.argv and "--filtering_perc" in sys.argv: raise Warning("This two options are incompatible") @@ -67,7 +67,7 @@ elif args.filter_low_counts_perc is not None: if args.verbose: print("Using iced version %s" % iced.__version__) - print "Loading files..." + print("Loading files...") # Loads file as i, j, counts i, j, data = loadtxt(filename).T @@ -88,7 +88,7 @@ else: counts = sparse.csr_matrix(counts) if args.verbose: - print "Normalizing..." + print("Normalizing...") if filter_low_counts_perc != 0: counts = iced.filter.filter_low_counts(counts, @@ -103,22 +103,24 @@ if args.filter_high_counts_perc != 0: counts, bias = iced.normalization.ICE_normalization( counts, max_iter=args.max_iter, copy=False, - verbose=args.verbose, eps=args.eps, output_bias=True) + verbose=int(args.verbose), eps=args.eps, output_bias=True) if args.results_filename is None: results_filename = ".".join( filename.split(".")[:-1]) + "_normalized." + filename.split(".")[-1] + results_filename = results_filename.encode() else: results_filename = args.results_filename + results_filename = results_filename.encode() counts = sparse.coo_matrix(counts) if args.verbose: - print "Writing results..." + print("Writing results...") savetxt( results_filename, counts.col + index_base, counts.row + index_base, counts.data) if args.output_bias: - np.savetxt(results_filename + ".biases", bias) + np.savetxt(results_filename.decode() + ".biases", bias) diff --git a/scripts/ice_norm.sh b/scripts/ice_norm.sh index 0807742..bf6544b 100755 --- a/scripts/ice_norm.sh +++ b/scripts/ice_norm.sh @@ -78,7 +78,7 @@ do then input=$(find -L $IN_DIR/${RES_FILE_NAME}/ -name "*_$bsize.matrix*" ! -name "*iced*") if [ ! -z $input ]; then - cmd="ice --results_filename ${NORM_DIR}/${bsize}/${RES_FILE_NAME}_${bsize}_iced.matrix --filter_low_counts_perc ${FILTER_LOW_COUNT_PERC} --filter_high_counts_perc ${FILTER_HIGH_COUNT_PERC} --max_iter ${MAX_ITER} --eps ${EPS} --remove-all-zeros-loci --output-bias 1 --verbose 1 ${input}" + cmd="ice --results_filename ${NORM_DIR}/${bsize}/${RES_FILE_NAME}_${bsize}_iced.matrix --filter_low_counts_perc ${FILTER_LOW_COUNT_PERC} --filter_high_counts_perc ${FILTER_HIGH_COUNT_PERC} --max_iter ${MAX_ITER} --eps ${EPS} --remove-all-zeros-loci --output-bias 1 ${input}" exec_cmd $cmd >> ${ldir}/ice_${bsize}.log else echo "Warning : Matrix not found at $bsize resolution in $IN_DIR/${RES_FILE_NAME} - skip" @@ -87,7 +87,7 @@ do for r in $(find -L ${IN_DIR}/${RES_FILE_NAME}/raw/${bsize}/ -name "*_$bsize.matrix*") do ofile=$(basename ${r} | sed -e 's/.matrix/_iced.matrix/') - cmd="ice --results_filename ${NORM_DIR}/${bsize}/${ofile} --filter_low_counts_perc ${FILTER_LOW_COUNT_PERC} --filter_high_counts_perc ${FILTER_HIGH_COUNT_PERC} --max_iter ${MAX_ITER} --eps ${EPS} --remove-all-zeros-loci --output-bias 1 --verbose 1 ${r}" + cmd="ice --results_filename ${NORM_DIR}/${bsize}/${ofile} --filter_low_counts_perc ${FILTER_LOW_COUNT_PERC} --filter_high_counts_perc ${FILTER_HIGH_COUNT_PERC} --max_iter ${MAX_ITER} --eps ${EPS} --remove-all-zeros-loci --output-bias 1 ${r}" exec_cmd $cmd >> ${ldir}/ice_${bsize}.log 2>&1 done fi diff --git a/scripts/install/Makefile b/scripts/install/Makefile index 0fa70c5..867c39d 100755 --- a/scripts/install/Makefile +++ b/scripts/install/Makefile @@ -26,14 +26,18 @@ else include $(CONFIG_SYS) endif ifndef PREFIX +ifdef prefix +PREFIX = $(prefix) +else PREFIX = /usr/local/bin/ endif +endif ###################################### ## Dependencies ## ###################################### configure: config_check - ./scripts/install/install_dependencies.sh -c $(CONFIG_SYS) -o $(realpath $(PREFIX))/HiC-Pro_$(VNUM) -q + ./scripts/install/install_dependencies.sh -c $(CONFIG_SYS) -p ${PREFIX} -o $(PREFIX)/HiC-Pro_$(VNUM) -q diff --git a/scripts/install/check_pythonlib.py b/scripts/install/check_pythonlib.py index 03aca00..2d7e5f1 100644 --- a/scripts/install/check_pythonlib.py +++ b/scripts/install/check_pythonlib.py @@ -9,6 +9,9 @@ import re +def cmp(a, b): + return (a > b) - (a < b) + def vcmp(version1, version2): def normalize(v): ## 0.18.0.dev0+609facc @@ -22,8 +25,8 @@ def normalize(v): ## bx try: import bx.intervals - if vcmp(bx.__version__, '0.5.0') == -1: - raise ValueError('bx-python '+bx.__version__+' detected. Version >= 0.5.0 required') + if vcmp(bx.__version__, '0.8.8') == -1: + raise ValueError('bx-python '+bx.__version__+' detected. Version >= 0.8.8 required') except ImportError: raise ImportError('Error - bx-python cannot be imported') @@ -31,8 +34,8 @@ def normalize(v): ## numpy try: import numpy - if vcmp(numpy.__version__, '1.8.2') == -1: - raise ValueError('numpy '+numpy.__version__+' detected. Version >= 1.8.2 required') + if vcmp(numpy.__version__, '1.18.1') == -1: + raise ValueError('numpy '+numpy.__version__+' detected. Version >= 1.18.1 required') except ImportError: raise ImportError('Error - numpy cannot be imported') @@ -40,8 +43,8 @@ def normalize(v): ## scipy try: import scipy - if vcmp(scipy.version.version, '0.15.1') == -1: - raise ValueError('scipy '+scipy.version.version+' detected. Version >= 0.15.1 required') + if vcmp(scipy.version.version, '1.4.1') == -1: + raise ValueError('scipy '+scipy.version.version+' detected. Version >= 1.4.1 required') except ImportError: raise ImportError('Error - scipy cannot be imported') @@ -55,8 +58,18 @@ def normalize(v): ## pysam try: import pysam - if vcmp(pysam.__version__, '0.8.3') == -1: - raise ValueError('pysam '+pysam.__version__+' detected. Version >= 0.8.3 required') + if vcmp(pysam.__version__, '0.15.4') == -1: + raise ValueError('pysam '+pysam.__version__+' detected. Version >= 0.15.4 required') except ImportError: raise ImportError('Error - pysam cannot be imported') + +# iced +try: + import iced + if vcmp(iced.__version__, '0.5.4') == -1: + raise ValueError('iced '+iced.__version__+' detected. Version >= 0.5.4 required') +except ImportError: + raise ImportError('Error - iced cannot be imported') + + diff --git a/scripts/install/install_dependencies.sh b/scripts/install/install_dependencies.sh index 845718c..e7ebed2 100755 --- a/scripts/install/install_dependencies.sh +++ b/scripts/install/install_dependencies.sh @@ -61,6 +61,7 @@ die() { function usage { echo -e "Usage : ./install_all.sh" echo -e "-c"" " + echo -e "-p"" " echo -e "-o"" " echo -e "-q"" " echo -e "-h"" " @@ -73,11 +74,12 @@ echo -e "$BLUE""Starting $SOFT installation ...""$NORMAL"; ################### Initialize ################### quiet=0 -set -- $(getopt c:o:qh "$@") +set -- $(getopt c:p:o:qh "$@") while [ $# -gt 0 ] do case "$1" in (-c) conf=$2; shift;; + (-p) prefix=$2 shift;; (-o) install_dir=$2; shift;; (-q) quiet=1; shift;; (-h) usage;; @@ -148,9 +150,9 @@ if [ $? != "0" ]; then exit 1; else pver=`python --version 2>&1 | cut -d" " -f2` - vercomp $pver "2.7.0" + vercomp $pver "3.7.0" if [[ $? == 2 ]]; then - echo -e "$RED""Python v2.7.0 or higher is needed [$pver detected].""$NORMAL" + echo -e "$RED""Python v3.7.X or higher is needed [$pver detected].""$NORMAL" exit 1; fi fi @@ -178,6 +180,9 @@ cd ./tmp ################ Install dependencies ################### ## By default, dependencies will be installed in the same path than HiC-Pro +if [[ ! -z ${prefix} ]]; then + PREFIX=${prefix} +fi PREFIX_BIN=${PREFIX} if [ ! -w $PREFIX_BIN ]; then @@ -269,13 +274,13 @@ fi if [ $wasInstalled == 0 ]; then echo "Installing Bowtie2 ..." - $get bowtie2-2.2.4-source.zip http://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.4/bowtie2-2.2.4-source.zip/download - unzip bowtie2-2.2.4-source.zip - cd bowtie2-2.2.4 + $get bowtie2-2.3.5-source.zip http://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.3.5/bowtie2-2.3.5-source.zip/download + unzip bowtie2-2.3.5-source.zip + cd bowtie2-2.3.5 make cd .. - mv bowtie2-2.2.4 $PREFIX_BIN - export PATH=$PREFIX_BIN/bowtie2-2.2.4/:$PATH + mv bowtie2-2.3.5 $PREFIX_BIN + export PATH=$PREFIX_BIN/bowtie2-2.3.5/:$PATH wasInstalled=0; fi @@ -309,13 +314,13 @@ fi if [ $wasInstalled == 0 ]; then echo "Installing samtools ..." #From sources - $get samtools-1.1.tar.bz2 http://sourceforge.net/projects/samtools/files/samtools/1.1/samtools-1.1.tar.bz2/download - tar -xvjpf samtools-1.1.tar.bz2 - cd samtools-1.1 + $get samtools-1.10.tar.bz2 http://sourceforge.net/projects/samtools/files/samtools/1.10/samtools-1.10.tar.bz2/download + tar -xvjpf samtools-1.10.tar.bz2 + cd samtools-1.10 make cd .. - mv samtools-1.1 $PREFIX_BIN - export PATH=$PREFIX_BIN/samtools-1.1/:$PATH + mv samtools-1.10 $PREFIX_BIN + export PATH=$PREFIX_BIN/samtools-1.10/:$PATH wasInstalled=0; fi @@ -407,7 +412,7 @@ else fi ## check rights in PREFIX folder -if [[ -z $PREFIX ]]; then PREFIX=/usr/local/bin; fi +#if [[ -z $PREFIX ]]; then PREFIX=/usr/local/bin; fi if [ ! -w $PREFIX ]; then die "Cannot install HiCPro in $PREFIX directory. Maybe missing super-user (root) permissions to write there. Please specify another directory in the config-install.txt file (PREFIX=)"; fi diff --git a/scripts/mapped_2hic_dnase.py b/scripts/mapped_2hic_dnase.py index 36c5a60..dd023b0 100755 --- a/scripts/mapped_2hic_dnase.py +++ b/scripts/mapped_2hic_dnase.py @@ -21,14 +21,14 @@ def usage(): """Usage function""" - print "Usage : python mapped_2hic_dnase.py" - print "-r/--mappedReadsFile " - print "[-o/--outputDir] " - print "[-d/--minCisDist] " - print "[-g/--gtag] " - print "[-a/--all] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python mapped_2hic_dnase.py") + print("-r/--mappedReadsFile ") + print("[-o/--outputDir] ") + print("[-d/--minCisDist] ") + print("[-g/--gtag] ") + print("[-a/--all] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -78,11 +78,11 @@ def get_read_pos(read, st="start"): list of aligned reads """ if st == "middle": - pos = read.pos + int(read.alen/2) + pos = read.reference_start + int(read.alen/2) elif st =="start": pos = get_read_start(read) elif st == "left": - pos = read.pos + pos = read.reference_start return pos @@ -92,9 +92,9 @@ def get_read_start(read): Return the 5' end of the read """ if read.is_reverse: - pos = read.pos + read.alen -1 + pos = read.reference_start + read.alen -1 else: - pos = read.pos + pos = read.reference_start return pos @@ -108,20 +108,16 @@ def get_ordered_reads(read1, read2): read1 = [AlignedRead] read2 = [AlignedRead] """ - if read1.tid == read2.tid: + if read1.reference_id == read2.reference_id: if get_read_pos(read1) < get_read_pos(read2): - r1 = read1 - r2 = read2 + r1, r2 = read1, read2 else: - r1 = read2 - r2 = read1 + r1, r2 = read2, read1 else: - if read1.tid < read2.tid: - r1 = read1 - r2 = read2 + if read1.reference_id < read2.reference_id: + r1, r2 = read1, read2 else: - r1 = read2 - r2 = read1 + r1, r2 = read2, read1 return r1, r2 @@ -134,7 +130,7 @@ def isIntraChrom(read1, read2): read2 : [AlignedRead] """ - if read1.tid == read2.tid: + if read1.reference_id == read2.reference_id: return True else: return False @@ -187,7 +183,7 @@ def get_cis_dist(read1, read2): def get_read_tag(read, tag): - for t in read.tags: + for t in read.get_tags(): if t[0] == tag: return t[1] return None @@ -229,11 +225,11 @@ def get_read_tag(read, tag): # Verbose mode if verbose: - print "## overlapMapped2HiCFragments.py" - print "## mappedReadsFile=", mappedReadsFile - print "## minCisDist=", minDist - print "## allOuput=", allOutput - print "## verbose=", verbose, "\n" + print("## overlapMapped2HiCFragments.py") + print("## mappedReadsFile=", mappedReadsFile) + print("## minCisDist=", minDist) + print("## allOuput=", allOutput) + print("## verbose={}\n".format(verbose)) # Initialize variables reads_counter = 0 @@ -271,7 +267,7 @@ def get_read_tag(read, tag): # Read the SAM/BAM file if verbose: - print "## Opening SAM/BAM file '", mappedReadsFile, "'..." + print("## Opening SAM/BAM file {} ...".format(mappedReadsFile)) samfile = pysam.Samfile(mappedReadsFile, "rb") # Reads are 0-based too (for both SAM and BAM format) @@ -286,7 +282,7 @@ def get_read_tag(read, tag): if read.is_read1: r1 = read if not r1.is_unmapped: - r1_chrom = samfile.getrname(r1.tid) + r1_chrom = samfile.get_reference_name(r1.reference_id) else: r1_chrom = None @@ -294,11 +290,11 @@ def get_read_tag(read, tag): elif read.is_read2: r2 = read if not r2.is_unmapped: - r2_chrom = samfile.getrname(r2.tid) + r2_chrom = samfile.get_reference_name(r2.reference_id) else: r2_chrom = None - if isIntraChrom(r1,r2): + if isIntraChrom(r1, r2): dist = get_cis_dist(r1, r2) else: dist = None @@ -368,8 +364,8 @@ def get_read_tag(read, tag): ##reorient reads to ease duplicates removal or1, or2 = get_ordered_reads(r1, r2) - or1_chrom = samfile.getrname(or1.tid) - or2_chrom = samfile.getrname(or2.tid) + or1_chrom = samfile.get_reference_name(or1.reference_id) + or2_chrom = samfile.get_reference_name(or2.reference_id) ##reset as tag now that the reads are oriented r1as = get_read_tag(or1, gtag) @@ -378,7 +374,7 @@ def get_read_tag(read, tag): htag = str(r1as)+"-"+str(r2as) cur_handler.write( - or1.qname + "\t" + + or1.query_name + "\t" + or1_chrom + "\t" + str(get_read_pos(or1)+1) + "\t" + str(get_read_strand(or1)) + "\t" + @@ -394,7 +390,7 @@ def get_read_tag(read, tag): elif r2.is_unmapped and not r1.is_unmapped: cur_handler.write( - r1.qname + "\t" + + r1.query_name + "\t" + r1_chrom + "\t" + str(get_read_pos(r1)+1) + "\t" + str(get_read_strand(r1)) + "\t" + @@ -408,7 +404,7 @@ def get_read_tag(read, tag): "*" + "\n") elif r1.is_unmapped and not r2.is_unmapped: cur_handler.write( - r2.qname + "\t" + + r2.query_name + "\t" + "*" + "\t" + "*" + "\t" + "*" + "\t" + @@ -422,7 +418,7 @@ def get_read_tag(read, tag): str(r2.mapping_quality) + "\n") if (reads_counter % 100000 == 0 and verbose): - print "##", reads_counter + print("##", reads_counter) # Close handler handle_valid.close() @@ -432,33 +428,28 @@ def get_read_tag(read, tag): handle_filt.close() # Write stats file - handle_stat = open(outputDir + '/' + baseReadsFile + '.RSstat', 'w') - handle_stat.write("## Hi-C processing - no restriction fragments\n") - handle_stat.write("Valid_interaction_pairs\t" + str(valid_counter) + "\n") - handle_stat.write( - "Valid_interaction_pairs_FF\t" + str(valid_counter_FF) + "\n") - handle_stat.write( - "Valid_interaction_pairs_RR\t" + str(valid_counter_RR) + "\n") - handle_stat.write( - "Valid_interaction_pairs_RF\t" + str(valid_counter_RF) + "\n") - handle_stat.write( - "Valid_interaction_pairs_FR\t" + str(valid_counter_FR) + "\n") - handle_stat.write("Single-end_pairs\t" + str(single_counter) + "\n") - handle_stat.write("Filtered_pairs\t" + str(filt_counter) + "\n") - handle_stat.write("Dumped_pairs\t" + str(dump_counter) + "\n") + with open(outputDir + '/' + baseReadsFile + '.RSstat', 'w') as handle_stat: + handle_stat.write("## Hi-C processing - no restriction fragments\n") + handle_stat.write("Valid_interaction_pairs\t" + str(valid_counter) + "\n") + handle_stat.write("Valid_interaction_pairs_FF\t" + str(valid_counter_FF) + "\n") + handle_stat.write("Valid_interaction_pairs_RR\t" + str(valid_counter_RR) + "\n") + handle_stat.write("Valid_interaction_pairs_RF\t" + str(valid_counter_RF) + "\n") + handle_stat.write("Valid_interaction_pairs_FR\t" + str(valid_counter_FR) + "\n") + handle_stat.write("Single-end_pairs\t" + str(single_counter) + "\n") + handle_stat.write("Filtered_pairs\t" + str(filt_counter) + "\n") + handle_stat.write("Dumped_pairs\t" + str(dump_counter) + "\n") ## Write AS report - if gtag is not None: - handle_stat.write("## ======================================\n") - handle_stat.write("## Allele specific information\n") - handle_stat.write("Valid_pairs_from_ref_genome_(1-1)\t" + str(G1G1_ascounter) + "\n") - handle_stat.write("Valid_pairs_from_ref_genome_with_one_unassigned_mate_(0-1/1-0)\t" + str(UG1_ascounter+G1U_ascounter) + "\n") - handle_stat.write("Valid_pairs_from_alt_genome_(2-2)\t" + str(G2G2_ascounter) + "\n") - handle_stat.write("Valid_pairs_from_alt_genome_with_one_unassigned_mate_(0-2/2-0)\t" + str(UG2_ascounter+G2U_ascounter) + "\n") - handle_stat.write("Valid_pairs_from_alt_and_ref_genome_(1-2/2-1)\t" + str(G1G2_ascounter+G2G1_ascounter) + "\n") - handle_stat.write("Valid_pairs_with_both_unassigned_mated_(0-0)\t" + str(UU_ascounter) + "\n") - handle_stat.write("Valid_pairs_with_at_least_one_conflicting_mate_(3-)\t" + str(CF_ascounter) + "\n") - - handle_stat.close() + if gtag is not None: + handle_stat.write("## ======================================\n") + handle_stat.write("## Allele specific information\n") + handle_stat.write("Valid_pairs_from_ref_genome_(1-1)\t" + str(G1G1_ascounter) + "\n") + handle_stat.write("Valid_pairs_from_ref_genome_with_one_unassigned_mate_(0-1/1-0)\t" + str(UG1_ascounter+G1U_ascounter) + "\n") + handle_stat.write("Valid_pairs_from_alt_genome_(2-2)\t" + str(G2G2_ascounter) + "\n") + handle_stat.write("Valid_pairs_from_alt_genome_with_one_unassigned_mate_(0-2/2-0)\t" + str(UG2_ascounter+G2U_ascounter) + "\n") + handle_stat.write("Valid_pairs_from_alt_and_ref_genome_(1-2/2-1)\t" + str(G1G2_ascounter+G2G1_ascounter) + "\n") + handle_stat.write("Valid_pairs_with_both_unassigned_mated_(0-0)\t" + str(UU_ascounter) + "\n") + handle_stat.write("Valid_pairs_with_at_least_one_conflicting_mate_(3-)\t" + str(CF_ascounter) + "\n") + diff --git a/scripts/mapped_2hic_fragments.py b/scripts/mapped_2hic_fragments.py index f47273d..e823ee0 100755 --- a/scripts/mapped_2hic_fragments.py +++ b/scripts/mapped_2hic_fragments.py @@ -12,7 +12,6 @@ Script to keep only valid 3C products - DE and SC are removed Output is : readname / """ - import time import getopt import sys @@ -24,20 +23,20 @@ def usage(): """Usage function""" - print "Usage : python mapped_2hic_fragments.py" - print "-f/--fragmentFile " - print "-r/--mappedReadsFile " - print "[-o/--outputDir] " - print "[-s/--shortestInsertSize] " - print "[-l/--longestInsertSize] " - print "[-t/--shortestFragmentLength] " - print "[-m/--longestFragmentLength] " - print "[-d/--minCisDist] " - print "[-g/--gtag] " - print "[-a/--all] " - print "[-S/--sam] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python mapped_2hic_fragments.py") + print("-f/--fragmentFile ") + print("-r/--mappedReadsFile ") + print("[-o/--outputDir] ") + print("[-s/--shortestInsertSize] ") + print("[-l/--longestInsertSize] ") + print("[-t/--shortestFragmentLength] ") + print("[-m/--longestFragmentLength] ") + print("[-d/--minCisDist] ") + print("[-g/--gtag] ") + print("[-a/--all] ") + print("[-S/--sam] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -67,7 +66,7 @@ def timing(function, *args): """ startTime = time.time() result = function(*args) - print '%s function took %0.3f ms' % (function.func_name, (time.time() - startTime) * 1000) + print('{} function took {:.3f}ms'.format(function.__name__, (time.time() - startTime) * 1000)) return result @@ -96,8 +95,7 @@ def isIntraChrom(read1, read2): """ if read1.tid == read2.tid: return True - else: - return False + return False def get_cis_dist(read1, read2): @@ -114,8 +112,7 @@ def get_cis_dist(read1, read2): if not read1.is_unmapped and not read2.is_unmapped: ## Contact distances can be calculated for intrachromosomal reads only if isIntraChrom(read1, read2): - r1pos = get_read_pos(read1) - r2pos = get_read_pos(read2) + r1pos, r2pos = get_read_pos(read1), get_read_pos(read2) dist = abs(r1pos - r2pos) return dist @@ -138,11 +135,11 @@ def get_read_pos(read, st="start"): """ if st == "middle": - pos = read.pos + int(read.alen/2) + pos = read.reference_start + int(read.alen/2) elif st =="start": pos = get_read_start(read) elif st == "left": - pos = read.pos + pos = read.reference_start return pos @@ -152,9 +149,9 @@ def get_read_start(read): Return the 5' end of the read """ if read.is_reverse: - pos = read.pos + read.alen -1 + pos = read.reference_start + read.alen -1 else: - pos = read.pos + pos = read.reference_start return pos def get_ordered_reads(read1, read2): @@ -178,18 +175,14 @@ def get_ordered_reads(read1, read2): """ if read1.tid == read2.tid: if get_read_pos(read1) < get_read_pos(read2): - r1 = read1 - r2 = read2 + r1, r2 = read1, read2 else: - r1 = read2 - r2 = read1 + r1, r2 = read2, read1 else: if read1.tid < read2.tid: - r1 = read1 - r2 = read2 + r1, r2 = read1, read2 else: - r1 = read2 - r2 = read1 + r1, r2 = read2, read1 return r1, r2 @@ -206,46 +199,44 @@ def load_restriction_fragment(in_file, minfragsize=None, maxfragsize=None, verbo """ resFrag = {} if verbose: - print "## Loading Restriction File Intervals '", in_file, "'..." - + print("## Loading Restriction File Intervals {} ...".format(in_file)) bed_handle = open(in_file) nline = 0 nfilt = 0 for line in bed_handle: - nline +=1 - bedtab = line.split("\t") - try: - chromosome, start, end, name = bedtab[:4] - except ValueError: - print "Warning : wrong input format in line", nline,". Not a BED file !?" - continue + nline += 1 + bedtab = line.split("\t") + try: + chromosome, start, end, name = bedtab[:4] + except ValueError: + print("Warning : wrong input format in line {}. Not a BED file ?!".format(nline)) + continue # BED files are zero-based as Intervals objects - start = int(start) # + 1 - end = int(end) - fragl = abs(end - start) - name = name.strip() - - ## Discard fragments outside the size range - filt=False - if minfragsize != None and int(fragl) < int(minfragsize): - nfilt+=1 - filt=True - elif maxfragsize != None and int(fragl) > int(maxfragsize): - nfilt+=1 - filt=True + start = int(start) # + 1 + end = int(end) + fragl = abs(end - start) + name = name.strip() + + ## Discard fragments outside the size range + filt = False + if minfragsize != None and int(fragl) < int(minfragsize): + nfilt += 1 + filt = True + elif maxfragsize != None and int(fragl) > int(maxfragsize): + nfilt += 1 + filt = True - if chromosome in resFrag: - tree = resFrag[chromosome] - tree.add_interval(Interval(start, end, value={'name': name, 'filter': filt})) - else: - tree = Intersecter() - tree.add_interval(Interval(start, end, value={'name': name, 'filter': filt})) - resFrag[chromosome] = tree + if chromosome in resFrag: + tree = resFrag[chromosome] + tree.add_interval(Interval(start, end, value={'name': name, 'filter': filt})) + else: + tree = Intersecter() + tree.add_interval(Interval(start, end, value={'name': name, 'filter': filt})) + resFrag[chromosome] = tree if nfilt > 0: - print "Warning : ", nfilt ,"fragment(s) outside of range and discarded. ", nline - nfilt, " remaining." - + print("Warning : {} fragment(s) outside of range and discarded. {} remaining.".format(nfilt, nline - nfilt)) bed_handle.close() return resFrag @@ -267,15 +258,15 @@ def get_overlapping_restriction_fragment(resFrag, chrom, read): # Overlap with the position of the read (zero-based) resfrag = resFrag[chrom].find(pos, pos+1) if len(resfrag) > 1: - print "Warning : ", len(resfrag), " restriction fragments found for ", read.qname, "- skipped" + print("Warning : {} restictions fragments found for {} -skipped".format(len(resfrag), read.query_name)) return None elif len(resfrag) == 0: - print "Warning - no restriction fragments for ", read.qname ," at ", chrom, ":", pos + print("Warning - no restriction fragments for {} at {} : {}".format(read.query_name, chrom, pos)) return None else: return resfrag[0] else: - print "Warning - no restriction fragments for ", read.qname," at ", chrom, ":", pos + print("Warning - no restriction fragments for {} at {} : {}".format(read.qname, chrom, pos)) return None @@ -301,11 +292,11 @@ def is_religation(read1, read2, frag1, frag2): Check the orientation of reads -><- """ - ret=False + ret = False if are_contiguous_fragments(frag1, frag2, read1.tid, read2.tid): #r1, r2 = get_ordered_reads(read1, read2) #if get_read_strand(r1) == "+" and get_read_strand(r2) == "-": - ret=True + ret = True return ret @@ -374,8 +365,8 @@ def get_PE_fragment_size(read1, read2, resFrag1, resFrag2, interactionType): read1 : [AlignedRead] read2 : [AlignedRead] - resfrag1 = restrictin fragment overlapping the R1 read [interval] - resfrag1 = restrictin fragment overlapping the R1 read [interval] + resfrag1 = restriction fragment overlapping the R1 read [interval] + resfrag1 = restriction fragment overlapping the R1 read [interval] interactionType : Type of interaction from get_interaction_type() [str] """ @@ -463,7 +454,7 @@ def get_interaction_type(read1, read1_chrom, resfrag1, read2, def get_read_tag(read, tag): - for t in read.tags: + for t in read.get_tags(): if t[0] == tag: return t[1] return None @@ -520,16 +511,16 @@ def get_read_tag(read, tag): # Verbose mode if verbose: - print "## overlapMapped2HiCFragments.py" - print "## mappedReadsFile=", mappedReadsFile - print "## fragmentFile=", fragmentFile - print "## minInsertSize=", minInsertSize - print "## maxInsertSize=", maxInsertSize - print "## minFragSize=", minFragSize - print "## maxFragSize=", maxFragSize - print "## allOuput=", allOutput - print "## SAM ouput=", samOut - print "## verbose=", verbose, "\n" + print("## overlapMapped2HiCFragments.py") + print("## mappedReadsFile=", mappedReadsFile) + print("## fragmentFile=", fragmentFile) + print("## minInsertSize=", minInsertSize) + print("## maxInsertSize=", maxInsertSize) + print("## minFragSize=", minFragSize) + print("## maxFragSize=", maxFragSize) + print("## allOuput=", allOutput) + print("## SAM ouput=", samOut) + print("## verbose={}\n".format(verbose)) # Initialize variables reads_counter = 0 @@ -576,7 +567,7 @@ def get_read_tag(read, tag): # Read the SAM/BAM file if verbose: - print "## Opening SAM/BAM file '", mappedReadsFile, "'..." + print("## Opening SAM/BAM file {} ...".format(mappedReadsFile)) samfile = pysam.Samfile(mappedReadsFile, "rb") if samOut: @@ -585,7 +576,7 @@ def get_read_tag(read, tag): # Reads are 0-based too (for both SAM and BAM format) # Loop on all reads if verbose: - print "## Classifying Interactions ..." + print("## Classifying Interactions ...") for read in samfile.fetch(until_eof=True): reads_counter += 1 @@ -596,7 +587,7 @@ def get_read_tag(read, tag): if read.is_read1: r1 = read if not r1.is_unmapped: - r1_chrom = samfile.getrname(r1.tid) + r1_chrom = samfile.get_reference_name(r1.tid) r1_resfrag = get_overlapping_restriction_fragment(resFrag, r1_chrom, r1) else: r1_resfrag = None @@ -606,7 +597,7 @@ def get_read_tag(read, tag): elif read.is_read2: r2 = read if not r2.is_unmapped: - r2_chrom = samfile.getrname(r2.tid) + r2_chrom = samfile.get_reference_name(r2.tid) r2_resfrag = get_overlapping_restriction_fragment(resFrag, r2_chrom, r2) else: r2_resfrag = None @@ -706,8 +697,8 @@ def get_read_tag(read, tag): if not r1.is_unmapped and not r2.is_unmapped: ##reorient reads to ease duplicates removal or1, or2 = get_ordered_reads(r1, r2) - or1_chrom = samfile.getrname(or1.tid) - or2_chrom = samfile.getrname(or2.tid) + or1_chrom = samfile.get_reference_name(or1.tid) + or2_chrom = samfile.get_reference_name(or2.tid) ##reset as tag now that the reads are oriented r1as = get_read_tag(or1, gtag) @@ -734,7 +725,7 @@ def get_read_tag(read, tag): or2_fragname = 'None' cur_handler.write( - or1.qname + "\t" + + or1.query_name + "\t" + or1_chrom + "\t" + str(get_read_pos(or1)+1) + "\t" + str(get_read_strand(or1)) + "\t" + @@ -753,7 +744,7 @@ def get_read_tag(read, tag): r1_fragname = r1_resfrag.value['name'] cur_handler.write( - r1.qname + "\t" + + r1.query_name + "\t" + r1_chrom + "\t" + str(get_read_pos(r1)+1) + "\t" + str(get_read_strand(r1)) + "\t" + @@ -770,7 +761,7 @@ def get_read_tag(read, tag): r2_fragname = r2_resfrag.value['name'] cur_handler.write( - r2.qname + "\t" + + r2.query_name + "\t" + "*" + "\t" + "*" + "\t" + "*" + "\t" + @@ -791,7 +782,7 @@ def get_read_tag(read, tag): handle_sam.write(r2) if (reads_counter % 100000 == 0 and verbose): - print "##", reads_counter + print("##", reads_counter) # Close handler handle_valid.close() @@ -808,14 +799,10 @@ def get_read_tag(read, tag): handle_stat = open(outputDir + '/' + baseReadsFile + '.RSstat', 'w') handle_stat.write("## Hi-C processing\n") handle_stat.write("Valid_interaction_pairs\t" + str(valid_counter) + "\n") - handle_stat.write( - "Valid_interaction_pairs_FF\t" + str(valid_counter_FF) + "\n") - handle_stat.write( - "Valid_interaction_pairs_RR\t" + str(valid_counter_RR) + "\n") - handle_stat.write( - "Valid_interaction_pairs_RF\t" + str(valid_counter_RF) + "\n") - handle_stat.write( - "Valid_interaction_pairs_FR\t" + str(valid_counter_FR) + "\n") + handle_stat.write("Valid_interaction_pairs_FF\t" + str(valid_counter_FF) + "\n") + handle_stat.write("Valid_interaction_pairs_RR\t" + str(valid_counter_RR) + "\n") + handle_stat.write("Valid_interaction_pairs_RF\t" + str(valid_counter_RF) + "\n") + handle_stat.write("Valid_interaction_pairs_FR\t" + str(valid_counter_FR) + "\n") handle_stat.write("Dangling_end_pairs\t" + str(de_counter) + "\n") handle_stat.write("Religation_pairs\t" + str(re_counter) + "\n") handle_stat.write("Self_Cycle_pairs\t" + str(sc_counter) + "\n") @@ -839,4 +826,3 @@ def get_read_tag(read, tag): if samOut: samfile.close() - diff --git a/scripts/markAllelicStatus.py b/scripts/markAllelicStatus.py index 657659d..490cdb8 100755 --- a/scripts/markAllelicStatus.py +++ b/scripts/markAllelicStatus.py @@ -17,18 +17,18 @@ import os import re import pysam - +import gzip def usage(): """Usage function""" - print "Usage : python markAllelicStatus.py" - print "-i/--ibam " - print "-s/--snp " - print "[-r/--rstat] " - print "[-t/--tag] " - print "[-o/--out] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python markAllelicStatus.py") + print("-i/--ibam ") + print("-s/--snp ") + print("[-r/--rstat] ") + print("[-t/--tag] ") + print("[-o/--out] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -44,21 +44,23 @@ def get_args(): "output=", "rstat", "verbose", "help"]) except getopt.GetoptError as err: - print str(err) + print(str(err)) usage() sys.exit(-1) return opts -def get_snp_gt(gt, ref, alt): +def get_snp_gt(gt, ref, alt): #!gt = ['0/1'] gtsnp = [] ## gtsnp.append(ref) snp_geno = re.split('/|\|', gt) ## '.' are not considered if len(snp_geno) != 2: - return [None,None] - + return [None, None] + if (snp_geno[0] == '.') or (snp_geno[1] == '.'): + return [None, None] + ## First Allele if int(snp_geno[0]) == 0: gtsnp.append(ref) @@ -79,7 +81,7 @@ def get_snp_gt(gt, ref, alt): -def load_vcf( in_file, filter_qual=False, verbose=False, debug=False ): +def load_vcf(in_file, filter_qual=False, verbose=False, debug=False): """ Load a VCF file in a dict object @@ -89,9 +91,12 @@ def load_vcf( in_file, filter_qual=False, verbose=False, debug=False ): debug = if True, debug mode [boolean] """ if verbose: - print "## Loading VCF file '", in_file, "'..." + print("## Loading VCF file {} ...".format(in_file)) - vcf_handle = open(in_file) + if in_file.endswith(".gz"): + vcf_handle = gzip.open(in_file, 'rt') + else: + vcf_handle = open(in_file) header = [] samples = [] snps = {} @@ -103,46 +108,43 @@ def load_vcf( in_file, filter_qual=False, verbose=False, debug=False ): if line.startswith('##'): continue elif line.startswith('#'): - header = header = line.split('\t') - header[0] = header[0][1:] - samples = [ s.split('.')[0] for s in header[9:] ] + header = line.split('\t') + header[0] = header[0][1:] + samples = [s.split('.')[0] for s in header[9:]] if len(samples) > 1: - print >> sys.stderr, "Warning : Multisamples VCF detected. Only the first genotype will be used !" + print("Warning : Multisamples VCF detected. Only the first genotype will be used !", file=sys.stderr) continue else: - fields = line.split('\t',9) - var_counter+=1 + fields = line.split('\t', 9) + var_counter += 1 n = len(fields) - chrom = fields[0] - start = int(fields[1])-1 ## 0-based - ref = fields[3] - alt = fields[4] - qfilter = fields[6] + chrom, start, ref, alt, qfilter = fields[0], int(fields[1]) - 1, fields[3], fields[4], fields[6] ## Check format for first variant if var_counter == 1: - format = fields[8] if n>8 else None - if format.split(':')[0] != "GT": - print >> sys.stderr,"Error : Invalid format - GT not detected at first position in ", format + formate = fields[8] if n>8 else None + if formate.split(':')[0] != "GT": + print("Error : Invalid format - GT not detected at first position in ", file=sys.stderr) sys.exit(-1) genotypes = fields[9].split('\t') if fields[9] else [] geno = get_snp_gt(genotypes[0].split(':')[0], ref, alt) - if filter_qual == False or (filter_qual == True and qfilter=="PASS"): + if (filter_qual == False) or (filter_qual == True and qfilter == "PASS"): if debug: - print >> sys.stderr, str(chrom) + " - " + str(start) + " - "+ str(qfilter) +" -REF= " + str(ref) + " -ALT= " + str(alt) + " - G1=" + str(geno[0]) + " - G2=" + str(geno[1]) + print("{} - {} - {} -REF= {} -ALT= {} -G1= {} -G2= {}".format(str(chrom), str(start), + str(qfilter), str(ref), str(alt), str(geno[0]), str(geno[1])), file=sys.stderr) ## store only discriminant SNP if geno[0] != geno[1]: - snp_counter+=1 - chrn = re.sub("^[Cc]hr","",chrom) + snp_counter += 1 + chrn = re.sub("^[Cc]hr","", chrom) snps[(str(chrn), int(start), '1')] = geno[0] snps[(str(chrn), int(start), '2')] = geno[1] if (var_counter % 100000 == 0 and verbose): - print "##", var_counter + print("##", var_counter) vcf_handle.close() if verbose: - print "## Number of loaded SNPs =",len(snps)/2, "over",var_counter + print("## Number of loaded SNPs = {} over {}".format(len(snps)/2, var_counter)) return snps @@ -175,7 +177,7 @@ def get_mismatches_positions(read, base=None): ## Get N pos in the read according to MD tag # for y in range(len(md)): - y=0 + y = 0 while y < len(md): if md[y].isdigit(): digits.append(md[y]) @@ -184,7 +186,7 @@ def get_mismatches_positions(read, base=None): y += 1 while md[y].isalpha(): #print "isAlpha="+md[y] - y+=1 + y += 1 #x-=1 x += int(''.join(digits)) digits = [] @@ -198,7 +200,7 @@ def get_mismatches_positions(read, base=None): digits = [] x += offset + 1 #print "x pos="+str(x) - y+=1 + y += 1 #print npos ## Update N position if an insertion is detected upstream the N position @@ -211,7 +213,7 @@ def get_mismatches_positions(read, base=None): for n in range(len(npos)): #print "N=" + str(npos[n]) + " l=" + str(l) + "t=" + str(t) if npos[n] > l: - npos[n] = npos[n]+t[1] + npos[n] = npos[n] + t[1] if int(t[0]) != 3 and int(t[0]) != 2: ## skip splice junction l += t[1] return npos @@ -232,7 +234,7 @@ def getGenomePos(read, pos): genomePos = read.get_reference_positions(full_length=True) for y in pos: if genomePos[y] == None: - print >> sys.stderr, "Warning : no genomic position found for ", read.qname, "at position", y + print("Warning : no genomic position found for {} at position {}".format(read.qname, y), file=sys.stderr) ngenomepos.append(None) else: ngenomepos.append(genomePos[y]) @@ -247,16 +249,13 @@ def getBaseAt(read, pos): pos = positions to convert [list] """ - nuc = [] - for p in pos: - #print (p) - nuc.append(read.seq[p]) + nuc = [read.seq[p] for p in pos] return nuc def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): """ - For a given set of genomic position and assoctiated genotype, compare to a snp file and return a code status + For a given set of genomic position and associated genotype, compare to a snp file and return a code status 0 : unassigned - no snp information extracted from the read 1 : genotype from REF genome is found 2 : genotype from ALT genome is found @@ -268,21 +267,20 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): """ code = None - g1_count = 0 - g2_count = 0 + g1_count, g2_count = 0, 0 l = len(genotype) chrn = re.sub("^[Cc]hr","",chrom) for i in range(len(genotype)): #print >> sys.stderr, chrn, gpos[i], genotype[i] if gpos[i] != None: - if snps.has_key((str(chrn), int(gpos[i]), '1')) and snps.has_key((str(chrn), int(gpos[i]), '2')): + if ((str(chrn), int(gpos[i]), '1') in snps) and ((str(chrn), int(gpos[i]), '2') in snps): if snps[(str(chrn), int(gpos[i]), '1')] == genotype[i]: - g1_count+=1 + g1_count += 1 elif snps[(str(chrn), int(gpos[i]), '2')] == genotype[i]: - g2_count+=1 + g2_count += 1 else: - print >> sys.stderr, "Warning : no SNPs found at position " + chrom + ":" + str(gpos[i]+1) + ". N ignored" + print("Warning : no SNPs found at position {} : {}. N ignored".format(chrom, str(gpos[i]+1)), file=sys.stderr) if g1_count > 0 and g2_count > 0: code = 3 @@ -305,7 +303,7 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): debug = False output = "-" tag = "XA" - snps={} + snps = {} if len(opts) == 0: usage() @@ -343,7 +341,7 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): # Read the SAM/BAM file if verbose: - print "## Opening SAM/BAM file '", mappedReadsFile, "'..." + print("## Opening SAM/BAM file {} ...".format(mappedReadsFile)) infile = pysam.Samfile(mappedReadsFile, "rb") #samOut: @@ -354,25 +352,25 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): # Verbose mode if verbose: - print "## " + __file__ - print "## ibam=", mappedReadsFile - print "## snpFile=", snpFile - print "## tag=", tag - print "## output=" + output - print "## verbose=", verbose, "\n" + print("## " + __file__) + print("## ibam=", mappedReadsFile) + print("## snpFile=", snpFile) + print("## tag=", tag) + print("## output=" + output) + print("## verbose={}\n".format(verbose)) # Reads are 0-based too (for both SAM and BAM format) # Loop on all reads if verbose: - print "## Assigning allele specific information ..." + print("## Assigning allele specific information ...") for read in infile.fetch(until_eof=True): reads_counter += 1 if not read.is_unmapped:## and read.cigarstring.find("D") != -1: - read_chrom = infile.getrname(read.tid) + read_chrom = infile.get_reference_name(read.tid) Nreadpos = get_mismatches_positions(read, base="N") - if (len(Nreadpos)>0): + if (len(Nreadpos) > 0): N_counter += len(Nreadpos) Ngenomepos = getGenomePos(read, Nreadpos) Nbase = getBaseAt(read, Nreadpos) @@ -382,7 +380,8 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): if debug: for i in range(len(Nreadpos)): if Ngenomepos[i] != None: - print >> sys.stderr, str(read_chrom) +"\t"+ str(Ngenomepos[i]) + "\t" + str(Ngenomepos[i]+1) + "\t" + str(read.qname) + "/N/" + str(Nbase[i]) + "\t" + str(tagval) + print("{}\t{}\t{}\t{}/N/{}\t{}".format(str(read_chrom), str(Ngenomepos[i]), + str(Ngenomepos[i]+1), str(read.query_name), str(Nbase[i]), str(tagval)), file=sys.stderr) if tagval == 0: ua_counter += 1 elif tagval == 1: @@ -401,7 +400,7 @@ def getAllelicStatus(chrom, gpos, genotype, snps, debug=False): outfile.write(read) if (reads_counter % 100000 == 0 and verbose): - print "##", reads_counter + print("##", reads_counter) # Close handler diff --git a/scripts/mergeSAM.py b/scripts/mergeSAM.py index fdf0c67..12917b1 100755 --- a/scripts/mergeSAM.py +++ b/scripts/mergeSAM.py @@ -19,20 +19,19 @@ import os import re import pysam -from itertools import izip def usage(): """Usage function""" - print "Usage : python mergeSAM.py" - print "-f/--forward " - print "-r/--reverse " - print "[-o/--output] " - print "[-s/--single] " - print "[-m/--multi] " - print "[-q/--qual] " - print "[-t/--stat] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python mergeSAM.py") + print("-f/--forward ") + print("-r/--reverse ") + print("[-o/--output] ") + print("[-s/--single] ") + print("[-m/--multi] ") + print("[-q/--qual] ") + print("[-t/--stat] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -53,37 +52,36 @@ def get_args(): def is_unique_bowtie2(read): - ret = False - if not read.is_unmapped and read.has_tag('AS'): - if read.has_tag('XS'): - primary = read.get_tag('AS') - secondary = read.get_tag('XS') - if (primary > secondary): - ret = True - else: - ret = True - - return ret + ret = False + if not read.is_unmapped and read.has_tag('AS'): + if read.has_tag('XS'): + primary = read.get_tag('AS') + secondary = read.get_tag('XS') + if (primary > secondary): + ret = True + else: + ret = True + return ret ## Remove everything after "/" or " " in read's name def get_read_name(read): - name = read.qname + name = read.query_name #return name.split("/",1)[0] return re.split('/| ', name)[0] def sam_flag(read1, read2, hr1, hr2): + + f1 = read1.flag + f2 = read2.flag - f1 = read1.flag - f2 = read2.flag - - if r1.is_unmapped == False: - r1_chrom = hr1.getrname(r1.tid) - else: - r1_chrom="*" - if r2.is_unmapped == False: - r2_chrom = hr2.getrname(r2.tid) - else: - r2_chrom="*" + if r1.is_unmapped == False: + r1_chrom = hr1.get_reference_name(r1.reference_id) + else: + r1_chrom = "*" + if r2.is_unmapped == False: + r2_chrom = hr2.get_reference_name(r2.reference_id) + else: + r2_chrom="*" ##Relevant bitwise flags (flag in an 11-bit binary number) @@ -101,226 +99,221 @@ def sam_flag(read1, read2, hr1, hr2): ##Output example: a paired-end read that aligns to the reverse strand ##and is the first mate in the pair will have flag 83 (= 64 + 16 + 2 + 1) - if f1 & 0x4: - f1 = f1 | 0x8 + if f1 & 0x4: + f1 = f1 | 0x8 - if f2 & 0x4: - f2 = f2 | 0x8 + if f2 & 0x4: + f2 = f2 | 0x8 - if (not (f1 & 0x4) and not (f2 & 0x4)): + if (not (f1 & 0x4) and not (f2 & 0x4)): ##The flag should now indicate this is paired-end data - f1 = f1 | 0x1 - f1 = f1 | 0x2 - f2 = f2 | 0x1 - f2 = f2 | 0x2 + f1 = f1 | 0x1 + f1 = f1 | 0x2 + f2 = f2 | 0x1 + f2 = f2 | 0x2 ##Indicate if the pair is on the reverse strand - if f1 & 0x10: - f2 = f2 | 0x20 + if f1 & 0x10: + f2 = f2 | 0x20 - if f2 & 0x10: - f1 = f1 | 0x20 + if f2 & 0x10: + f1 = f1 | 0x20 ##Is this first or the second pair? - f1 = f1 | 0x40 - f2 = f2 | 0x80 + f1 = f1 | 0x40 + f2 = f2 | 0x80 ##Insert the modified bitwise flags into the reads - read1.flag = f1 - read2.flag = f2 - - ##Determine the RNEXT and PNEXT values (i.e. the positional values of a read's pair) - #RNEXT - if r1_chrom == r2_chrom: - read1.rnext = r1.tid - read2.rnext = r1.tid - else: - read1.rnext = r2.tid - read2.rnext = r1.tid - - #PNEXT - read1.pnext = read2.pos - read2.pnext = read1.pos - - return(read1, read2) + read1.flag = f1 + read2.flag = f2 + + ##Determine the RNEXT and PNEXT values (i.e. the positional values of a read's pair) + #RNEXT + if r1_chrom == r2_chrom: + read1.next_reference_id = r1.reference_id + read2.next_reference_id = r1.reference_id + else: + read1.next_reference_id = r2.reference_id + read2.next_reference_id = r1.reference_id + #PNEXT + read1.next_reference_start = read2.reference_start + read2.next_reference_start = read1.reference_start + + return(read1, read2) if __name__ == "__main__": ## Read command line arguments - opts = get_args() - inputFile = None - outputFile = None - mapq = None - report_single = False - report_multi = False - verbose = False - stat = False - output = "-" - - if len(opts) == 0: - usage() - sys.exit() - - for opt, arg in opts: - if opt in ("-h", "--help"): - usage() - sys.exit() - elif opt in ("-f", "--forward"): - R1file = arg - elif opt in ("-r", "--reverse"): - R2file = arg - elif opt in ("-o", "--output"): - output = arg - elif opt in ("-q", "--qual"): - mapq = arg - elif opt in ("-s", "--single"): - report_single = True - elif opt in ("-m", "--multi"): - report_multi = True - elif opt in ("-t", "--stat"): - stat = True - elif opt in ("-v", "--verbose"): - verbose = True - else: - assert False, "unhandled option" + opts = get_args() + inputFile = None + outputFile = None + mapq = None + report_single = False + report_multi = False + verbose = False + stat = False + output = "-" + + if len(opts) == 0: + usage() + sys.exit() + + for opt, arg in opts: + if opt in ("-h", "--help"): + usage() + sys.exit() + elif opt in ("-f", "--forward"): + R1file = arg + elif opt in ("-r", "--reverse"): + R2file = arg + elif opt in ("-o", "--output"): + output = arg + elif opt in ("-q", "--qual"): + mapq = arg + elif opt in ("-s", "--single"): + report_single = True + elif opt in ("-m", "--multi"): + report_multi = True + elif opt in ("-t", "--stat"): + stat = True + elif opt in ("-v", "--verbose"): + verbose = True + else: + assert False, "unhandled option" ## Verbose mode - if verbose: - print "## mergeBAM.py" - print "## forward=", R1file - print "## reverse=", R2file - print "## output=", output - print "## min mapq=", mapq - print "## report_single=", report_single - print "## report_multi=", report_multi - print "## verbose=", verbose + if verbose: + print("## mergeBAM.py") + print("## forward=", R1file) + print("## reverse=", R2file) + print("## output=", output) + print("## min mapq=", mapq) + print("## report_single=", report_single) + print("## report_multi=", report_multi) + print("## verbose=", verbose) ## Initialize variables - tot_pairs_counter = 0 - multi_pairs_counter = 0 - uniq_pairs_counter = 0 - unmapped_pairs_counter = 0 - lowq_pairs_counter = 0 - multi_singles_counter = 0 - uniq_singles_counter = 0 - lowq_singles_counter = 0 + tot_pairs_counter = 0 + multi_pairs_counter = 0 + uniq_pairs_counter = 0 + unmapped_pairs_counter = 0 + lowq_pairs_counter = 0 + multi_singles_counter = 0 + uniq_singles_counter = 0 + lowq_singles_counter = 0 #local_counter = 0 - paired_reads_counter = 0 - singleton_counter = 0 - reads_counter = 0 - r1 = None - r2 = None + paired_reads_counter = 0 + singleton_counter = 0 + reads_counter = 0 + r1 = None + r2 = None ## Reads are 0-based too (for both SAM and BAM format) ## Loop on all reads - if verbose: - print "## Merging forward and reverse tags ..." - - with pysam.Samfile(R1file, "rb") as hr1, pysam.Samfile(R2file, "rb") as hr2: - if output == "-": - outfile = pysam.AlignmentFile(output, "w", template=hr1) - else: - outfile = pysam.AlignmentFile(output, "wb", template=hr1) - for r1, r2 in izip(hr1.fetch(until_eof=True), hr2.fetch(until_eof=True)): - reads_counter +=1 + if verbose: + print("## Merging forward and reverse tags ...") + with pysam.Samfile(R1file, "rb") as hr1, pysam.Samfile(R2file, "rb") as hr2: + if output == "-": + outfile = pysam.AlignmentFile(output, "w", template=hr1) + else: + outfile = pysam.AlignmentFile(output, "wb", template=hr1) + for r1, r2 in zip(hr1.fetch(until_eof=True), hr2.fetch(until_eof=True)): + reads_counter +=1 #print r1 #print r2 #print hr1.getrname(r1.tid) #print hr2.getrname(r2.tid) - if (reads_counter % 1000000 == 0 and verbose): - print "##", reads_counter + if (reads_counter % 1000000 == 0 and verbose): + print("##", reads_counter) - if get_read_name(r1) == get_read_name(r2): + if get_read_name(r1) == get_read_name(r2): ## both unmapped - if r1.is_unmapped == True and r2.is_unmapped == True: - unmapped_pairs_counter += 1 - continue + if r1.is_unmapped == True and r2.is_unmapped == True: + unmapped_pairs_counter += 1 + continue ## both mapped - elif r1.is_unmapped == False and r2.is_unmapped == False: + elif r1.is_unmapped == False and r2.is_unmapped == False: ## quality - if mapq != None and (r1.mapping_quality < int(mapq) or r2.mapping_quality < int(mapq)): - lowq_pairs_counter += 1 - continue + if mapq != None and (r1.mapping_quality < int(mapq) or r2.mapping_quality < int(mapq)): + lowq_pairs_counter += 1 + continue ## Unique mapping - if is_unique_bowtie2(r1) == True and is_unique_bowtie2(r2) == True: - uniq_pairs_counter += 1 - else: - multi_pairs_counter += 1 - if report_multi == False: - continue + if is_unique_bowtie2(r1) == True and is_unique_bowtie2(r2) == True: + uniq_pairs_counter += 1 + else: + multi_pairs_counter += 1 + if report_multi == False: + continue # one end mapped, other is not - else: - singleton_counter += 1 - if report_single == False: - continue - if r1.is_unmapped == False: ## first end is mapped, second is not + else: + singleton_counter += 1 + if report_single == False: + continue + if r1.is_unmapped == False: ## first end is mapped, second is not ## quality - if mapq != None and (r1.mapping_quality < int(mapq)): - lowq_singles_counter += 1 - continue + if mapq != None and (r1.mapping_quality < int(mapq)): + lowq_singles_counter += 1 + continue ## Unique mapping - if is_unique_bowtie2(r1) == True: - uniq_singles_counter += 1 - else: - multi_singles_counter += 1 - if report_multi == False: - continue - else: ## second end is mapped, first is not + if is_unique_bowtie2(r1) == True: + uniq_singles_counter += 1 + else: + multi_singles_counter += 1 + if report_multi == False: + continue + else: ## second end is mapped, first is not ## quality - if mapq != None and (r2.mapping_quality < int(mapq)): - lowq_singles_counter += 1 - continue + if mapq != None and (r2.mapping_quality < int(mapq)): + lowq_singles_counter += 1 + continue ## Unique mapping - if is_unique_bowtie2(r2) == True: - uniq_singles_counter += 1 - else: - multi_singles_counter += 1 - if report_multi == False: - continue + if is_unique_bowtie2(r2) == True: + uniq_singles_counter += 1 + else: + multi_singles_counter += 1 + if report_multi == False: + continue - tot_pairs_counter += 1 - (r1, r2) = sam_flag(r1,r2, hr1, hr2) + tot_pairs_counter += 1 + (r1, r2) = sam_flag(r1,r2, hr1, hr2) #print hr1.getrname(r1.tid) #print hr2.getrname(r2.tid) #print r1 #print r2 ## Write output - outfile.write(r1) - outfile.write(r2) - - else: - print "Forward and reverse reads not paired. Check that BAM files have the same read names and are sorted." - sys.exit(1) - - if stat: - if output == '-': - statfile = "pairing.stat" - else: - statfile = re.sub('\.bam$', '.pairstat', output) - handle_stat = open(statfile, 'w') - - handle_stat.write("Total_pairs_processed\t" + str(reads_counter) + "\t" + str(round(float(reads_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Unmapped_pairs\t" + str(unmapped_pairs_counter) + "\t" + str(round(float(unmapped_pairs_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Low_qual_pairs\t" + str(lowq_pairs_counter) + "\t" + str(round(float(lowq_pairs_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Unique_paired_alignments\t" + str(uniq_pairs_counter) + "\t" + str(round(float(uniq_pairs_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Multiple_pairs_alignments\t" + str(multi_pairs_counter) + "\t" + str(round(float(multi_pairs_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Pairs_with_singleton\t" + str(singleton_counter) + "\t" + str(round(float(singleton_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Low_qual_singleton\t" + str(lowq_singles_counter) + "\t" + str(round(float(lowq_singles_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Unique_singleton_alignments\t" + str(uniq_singles_counter) + "\t" + str(round(float(uniq_singles_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Multiple_singleton_alignments\t" + str(multi_singles_counter) + "\t" + str(round(float(multi_singles_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.write("Reported_pairs\t" + str(tot_pairs_counter) + "\t" + str(round(float(tot_pairs_counter)/float(reads_counter)*100,3)) + "\n") - handle_stat.close() - - hr1.close() - hr2.close() - outfile.close() + outfile.write(r1) + outfile.write(r2) + + else: + print("Forward and reverse reads not paired. Check that BAM files have the same read names and are sorted.") + sys.exit(1) + + if stat: + if output == '-': + statfile = "pairing.stat" + else: + statfile = re.sub('\.bam$', '.pairstat', output) + with open(statfile, 'w') as handle_stat: + handle_stat.write("Total_pairs_processed\t" + str(reads_counter) + "\t" + str(round(float(reads_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Unmapped_pairs\t" + str(unmapped_pairs_counter) + "\t" + str(round(float(unmapped_pairs_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Low_qual_pairs\t" + str(lowq_pairs_counter) + "\t" + str(round(float(lowq_pairs_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Unique_paired_alignments\t" + str(uniq_pairs_counter) + "\t" + str(round(float(uniq_pairs_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Multiple_pairs_alignments\t" + str(multi_pairs_counter) + "\t" + str(round(float(multi_pairs_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Pairs_with_singleton\t" + str(singleton_counter) + "\t" + str(round(float(singleton_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Low_qual_singleton\t" + str(lowq_singles_counter) + "\t" + str(round(float(lowq_singles_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Unique_singleton_alignments\t" + str(uniq_singles_counter) + "\t" + str(round(float(uniq_singles_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Multiple_singleton_alignments\t" + str(multi_singles_counter) + "\t" + str(round(float(multi_singles_counter)/float(reads_counter)*100,3)) + "\n") + handle_stat.write("Reported_pairs\t" + str(tot_pairs_counter) + "\t" + str(round(float(tot_pairs_counter)/float(reads_counter)*100,3)) + "\n") + hr1.close() + hr2.close() + outfile.close() diff --git a/scripts/merge_statfiles.py b/scripts/merge_statfiles.py index b02bcfc..92a304b 100755 --- a/scripts/merge_statfiles.py +++ b/scripts/merge_statfiles.py @@ -19,11 +19,11 @@ def usage(): """Usage function""" - print "Usage : merge_statfiles.py" - print "-d/--dir " - print "-p/--pattern " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : merge_statfiles.py") + print("-d/--dir ") + print("-p/--pattern ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -68,53 +68,55 @@ def get_args(): elif opt in ("-p", "--pattern"): pattern = arg elif opt in ("-v", "--verbose"): - verbose=True + verbose = True else: assert False, "unhandled option" ## Verbose mode if verbose: - print "## merge_statfiles.py" - print "## dir=", path - print "## pattern=", pattern + print("## merge_statfiles.py") + print("## dir=", path) + print("## pattern=", pattern) infiles = [name for name in glob.glob(os.path.join(os.path.abspath(path), pattern)) if os.path.isfile(os.path.join(path,name))] li = len(infiles) if li > 0: if verbose: - print "## Merging "+ str(li)+" files" + print("## Merging "+ str(li)+" files") ## Reading first file to get the template template = OrderedDict() if verbose: - print "## Use "+infiles[0]+" as template" + print("## Use "+infiles[0]+" as template") with open(infiles[0]) as f: for line in f: if not line.startswith("#"): lsp = line.strip().split("\t") data = map(num, lsp[1:len(lsp)]) - template[str(lsp[0])] = data + template[str(lsp[0])] = list(data) if len(template) == 0: - print "Cannot find template files !" + print("Cannot find template files !") sys.exit(1) ## Int are counts / Float are percentage - for fidx in xrange(1, li): + for fidx in range(1, li): with open(infiles[fidx]) as f: for line in f: if not line.startswith("#"): lsp = line.strip().split("\t") if lsp[0] in template: - for i in xrange(1, len(lsp)): + for i in range(1, len(lsp)): if isinstance(num(lsp[i]), int): template[lsp[0]][i-1] += num(lsp[i]) else: - template[lsp[0]][i-1] = round((template[lsp[0]][i-1] + num(lsp[i]))/2,3) + template[lsp[0]][i-1] = round(template[lsp[0]][i-1] + num(lsp[i])/2,3) else: sys.stderr.write("Warning : '"+lsp[0]+"' not found in template ["+infiles[fidx]+"]\n") - + + + ## Print template for x in template: sys.stdout.write(x) @@ -123,6 +125,6 @@ def get_args(): sys.stdout.write("\n") else: - print "No files to merge - stop" + print("No files to merge - stop") sys.exit(1) diff --git a/scripts/onTarget.py b/scripts/onTarget.py index 68f7091..4f6d73f 100755 --- a/scripts/onTarget.py +++ b/scripts/onTarget.py @@ -17,13 +17,13 @@ def usage(): """Usage function""" - print "Usage : python onTarget.py" - print "-i/--inFile " - print "-t/--target " - print "[-s/--stats] " - print "[-c/--cis] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python onTarget.py") + print("-i/--inFile ") + print("-t/--target ") + print("[-s/--stats] ") + print("[-c/--cis] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return def get_args(): @@ -54,33 +54,32 @@ def load_bed(in_file, verbose=False): """ intervals = {} if verbose: - print >> sys.stderr, "## Loading BED file '", in_file, "'..." - - bed_handle = open(in_file) - nline = 0 - for line in bed_handle: - nline +=1 - bedtab = line.strip().split("\t") - try: - chromosome, start, end = bedtab[:3] - except ValueError: - print >> sys.stderr, "Warning : wrong input format in line", nline,". Not a BED file !?" - continue - - # BED files are zero-based as Intervals objects - start = int(start) # + 1 - end = int(end) - fragl = abs(end - start) + print("## Loading BED file {} ...".format(in_file), file=sys.stderr) + with open(infile, 'r') as bed_handle: + nline = 0 + for line in bed_handle: + nline +=1 + bedtab = line.strip().split("\t") + try: + chromosome, start, end = bedtab[:3] + except ValueError: + print("Warning : wrong input format in line {}. Not a BED file !?".format(nline), + file=sys.stderr) + continue + + # BED files are zero-based as Intervals objects + start = int(start) # + 1 + end = int(end) + fragl = abs(end - start) - if chromosome in intervals: - tree = intervals[chromosome] - tree.add_interval(Interval(start, end)) - else: - tree = Intersecter() - tree.add_interval(Interval(start, end)) - intervals[chromosome] = tree + if chromosome in intervals: + tree = intervals[chromosome] + tree.add_interval(Interval(start, end)) + else: + tree = Intersecter() + tree.add_interval(Interval(start, end)) + intervals[chromosome] = tree - bed_handle.close() return intervals if __name__ == "__main__": @@ -113,11 +112,11 @@ def load_bed(in_file, verbose=False): # Verbose mode if verbose: - print >> sys.stderr,"## onTarget.py" - print >> sys.stderr,"## inFile =", inFile - print >> sys.stderr,"## target =", target - print >> sys.stderr,"## cis =", cis - print >> sys.stderr,"## verbose =", verbose, "\n" + print("## onTarget.py", file=sys.stderr) + print("## inFile ={}".format(inFile), file=sys.stderr) + print("## target ={}".format(target), file=sys.stderr) + print("## cis ={}".format(cis), file=sys.stderr) + print("## verbose ={}\n".format(verbose), file=sys.stderr) # Initialize variables vp_counter = 0 @@ -130,13 +129,13 @@ def load_bed(in_file, verbose=False): # Read the SAM/BAM file if verbose: - print >> sys.stderr,"## Opening valid pairs file '", inFile, "'..." + print("## Opening valid pairs file {}...".format(inFile), file=sys.stderr)) vp_handle = open(inFile) with open(inFile) as vp_handle: for line in vp_handle: - vp_counter +=1 + vp_counter += 1 sline = line.strip().split("\t") try: chr1 = sline[1] @@ -144,7 +143,7 @@ def load_bed(in_file, verbose=False): chr2 = sline[4] pos2 = int(sline[5]) except ValueError: - print >> sys.stderr, "Warning : wrong input format in line", nline,". Not a BED file !?" + print("Warning : wrong input format in line {}. Not a BED file !?".format(nline), file=sys.stderr) continue res1 = [] @@ -155,18 +154,18 @@ def load_bed(in_file, verbose=False): res2 = targetInter[chr2].find(pos2, pos2+1) if len(res1) > 0 and len(res2) > 0: - ontarget_counter +=1 - ontarget_cap_cap_counter +=1 + ontarget_counter += 1 + ontarget_cap_cap_counter += 1 print line.strip() elif len(res1) > 0 or len(res2) > 0: - ontarget_counter +=1 - ontarget_cap_rep_counter +=1 + ontarget_counter += 1 + ontarget_cap_rep_counter += 1 if not cis: print line.strip() if statsFile is not None: if verbose: - print >> sys.stderr,"## Writing stats in '", statsFile, "'..." + print("## Writing stats in {}...".format(statsFile), file=sys.stderr) f = open(statsFile, 'a') f.write("valid_pairs_on_target\t" + str(ontarget_counter) + "\n") f.write("valid_pairs_on_target_cap_cap\t" + str(ontarget_cap_cap_counter) + "\n") diff --git a/scripts/split_valid_interactions.py b/scripts/split_valid_interactions.py index 61c2bdd..61b8272 100755 --- a/scripts/split_valid_interactions.py +++ b/scripts/split_valid_interactions.py @@ -16,15 +16,14 @@ import os import re import pysam -from itertools import izip def usage(): """Usage function""" - print "Usage : python split_valid_interactions.py" - print "-i/--input " - print "[-s/--stats] " - print "[-v/--verbose] " - print "[-h/--help] " + print("Usage : python split_valid_interactions.py") + print("-i/--input ") + print("[-s/--stats] ") + print("[-v/--verbose] ") + print("[-h/--help] ") return @@ -68,10 +67,10 @@ def get_args(): ## Verbose mode if verbose: - print "## split_valid_interactions.py" - print "## input=", inputfile - print "## statsFile=", statsFile - print "## verbose=", verbose + print("## split_valid_interactions.py") + print("## input=", inputfile) + print("## statsFile=", statsFile) + print("## verbose=", verbose) ## AS counter vp_counter = 0 @@ -98,14 +97,14 @@ def get_args(): handle_g2 = open(inputfile.replace(".allValidPairs", "_G2.allValidPairs"), 'w') if verbose: - print "## Splitting valid pairs interactions ..." + print("## Splitting valid pairs interactions ...") with open(inputfile) as hr: for line in hr: isG1 = False isG2 = False - vp_counter +=1 + vp_counter += 1 h = line.rstrip().split("\t") haplotype = h[len(h)-1].split("-") ## always last column @@ -172,7 +171,7 @@ def get_args(): G2trans += 1 if (vp_counter % 100000 == 0 and verbose): - print "##", vp_counter + print("##", vp_counter) if statsFile is not None: handle_stat = open(statsFile, 'w') diff --git a/scripts/src/ice_mod/.gitignore b/scripts/src/ice_mod/.gitignore deleted file mode 100644 index 6fcd025..0000000 --- a/scripts/src/ice_mod/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -*.pyc -dist -build -*.so -MANIFEST -.coverage diff --git a/scripts/src/ice_mod/.travis.yml b/scripts/src/ice_mod/.travis.yml deleted file mode 100644 index da5be7b..0000000 --- a/scripts/src/ice_mod/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -language: python - -virtualenv: - system_site_packages: true - -notifications: - email: false - -env: - global: - - TEST_RUN_FOLDER="/tmp" # folder where the tests are run from - matrix: - # Ubuntu 14.04 versions - - DISTRIB="conda" PYTHON_VERSION="2.6" - NUMPY_VERSION="1.7" SCIPY_VERSION="0.13" - - DISTRIB="conda" PYTHON_VERSION="2.7" - NUMPY_VERSION="1.8.2" SCIPY_VERSION="0.14.0" - - DISTRIB="conda" PYTHON_VERSION="3.4" - NUMPY_VERSION="1.9.2" SCIPY_VERSION="0.16.0" - COVERAGE=TRUE - -install: - - source continuous_integration/install.sh - -before_script: - - make clean - -script: - - python continuous_integration/show-python-packages-versions.py - # We want to back out of the current working directory to make - # sure we are using nilearn installed in site-packages rather - # than the one from the current working directory - # Parentheses (run in a subshell) are used to leave - # the current directory unchanged - - make test - -after_success: - # Ignore coveralls failures as the coveralls server is not very reliable - # but we don't want travis to report a failure in the github UI just - # because the coverage report failed to be published. - # coveralls need to be run from the git checkout - # so we need to copy the coverage results from TEST_RUN_FOLDER - - if [[ "$COVERAGE" == "true" ]]; then cp "$TEST_RUN_FOLDER/.coverage" .; coveralls || echo "failed"; fi diff --git a/scripts/src/ice_mod/CITATION b/scripts/src/ice_mod/CITATION deleted file mode 100644 index 41aa2b1..0000000 --- a/scripts/src/ice_mod/CITATION +++ /dev/null @@ -1,12 +0,0 @@ -To reference iced in publication, please cite the following: - -@Article{servant:hicpro, - Author="Servant, N. and Varoquaux, N. and Lajoie, B. R. and Viara, E. - and Chen, C. J. and Vert, J. P. and Heard, E. and Dekker, J. and - Barillot, E. ", - Title="{{H}i{C}-{P}ro: an optimized and flexible pipeline for {H}i-{C} data processing}", - Journal="Genome Biol.", - Year="2015", - Volume="16", - Pages="259" - } diff --git a/scripts/src/ice_mod/CONTRIBUTORS b/scripts/src/ice_mod/CONTRIBUTORS deleted file mode 100644 index 36e44ec..0000000 --- a/scripts/src/ice_mod/CONTRIBUTORS +++ /dev/null @@ -1,3 +0,0 @@ -Matthias Blum -Nicolas Servant -Nelle Varoquaux diff --git a/scripts/src/ice_mod/COPYING b/scripts/src/ice_mod/COPYING deleted file mode 100644 index 59690c3..0000000 --- a/scripts/src/ice_mod/COPYING +++ /dev/null @@ -1,32 +0,0 @@ -New BSD License - -Copyright (c) 2014-2015 The iced developers. -All rights reserved. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - a. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - b. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - c. Neither the name of the Iced Developers nor the names of - its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - diff --git a/scripts/src/ice_mod/MANIFEST.in b/scripts/src/ice_mod/MANIFEST.in deleted file mode 100644 index 1c804f5..0000000 --- a/scripts/src/ice_mod/MANIFEST.in +++ /dev/null @@ -1,2 +0,0 @@ -recursive-include iced *.c *.h *.py -recursive-include *.matrix *.bed diff --git a/scripts/src/ice_mod/Makefile b/scripts/src/ice_mod/Makefile deleted file mode 100644 index cfacd63..0000000 --- a/scripts/src/ice_mod/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -PYTHON ?= python -CYTHON ?= cython -NOSETESTS ?= nosetests -CTAGS ?= ctags - -all: clean inplace test - -inplace: - $(PYTHON) setup.py build_ext -i - - -test: test-code - -test-code: inplace - $(NOSETESTS) -s -v iced - -test-coverage: - rm -rf coverage .coverage - $(NOSETESTS) -s -v --with-coverage iced --cover-package iced - -clean-ctags: - rm -f tags - -clean: clean-ctags - $(PYTHON) setup.py clean - rm -rf dist - rm -rf build - -trailing-spaces: - find iced -name "*.py" -exec perl -pi -e 's/[ \t]*$$//' {} \; - -cython: - find iced -name "*.pyx" -exec $(CYTHON) {} \; diff --git a/scripts/src/ice_mod/README.rst b/scripts/src/ice_mod/README.rst deleted file mode 100644 index cce1498..0000000 --- a/scripts/src/ice_mod/README.rst +++ /dev/null @@ -1,24 +0,0 @@ -.. -*- mode: rst -*- - -|Travis|_ |Coveralls|_ - -.. |Travis| image:: https://api.travis-ci.org/hiclib/iced.png?branch=master -.. _Travis: https://travis-ci.org/hiclib/iced - -.. |Coveralls| image:: - https://coveralls.io/repos/github/hiclib/iced/badge.svg?branch=master -.. _Coveralls: https://coveralls.io/r/hiclib/iced?branch=master - - -iced -==== - -The python module iced implements the ICE normalization of hic data - - -Depends on - -python >= 2.6 -numpy >= 0.17 -scipy >= 0.13 -pandas diff --git a/scripts/src/ice_mod/appveyor.yml b/scripts/src/ice_mod/appveyor.yml deleted file mode 100644 index 3ceb97b..0000000 --- a/scripts/src/ice_mod/appveyor.yml +++ /dev/null @@ -1,93 +0,0 @@ -# AppVeyor.com is a Continuous Integration service to build and run tests under -# Windows -# https://ci.appveyor.com/project/iced-ci/iced - -environment: - global: - # SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the - # /E:ON and /V:ON options are not enabled in the batch script interpreter - # See: http://stackoverflow.com/a/13751649/163740 - CMD_IN_ENV: "cmd /E:ON /V:ON /C .\\build_tools\\appveyor\\run_with_env.cmd" - WHEELHOUSE_UPLOADER_USERNAME: iced-appveyor - WHEELHOUSE_UPLOADER_SECRET: - secure: BQm8KfEj6v2Y+dQxb2syQvTFxDnHXvaNktkLcYSq7jfbTOO6eH9n09tfQzFUVcWZ - - # Make sure we don't download large datasets when running the test on - # continuous integration platform - iced_SKIP_NETWORK_TESTS: 1 - - matrix: - - PYTHON: "C:\\Python27" - PYTHON_VERSION: "2.7.8" - PYTHON_ARCH: "32" - - - PYTHON: "C:\\Python27-x64" - PYTHON_VERSION: "2.7.8" - PYTHON_ARCH: "64" - - - PYTHON: "C:\\Python35" - PYTHON_VERSION: "3.5.0" - PYTHON_ARCH: "32" - - - PYTHON: "C:\\Python35-x64" - PYTHON_VERSION: "3.5.0" - PYTHON_ARCH: "64" - - - -install: - # Install Python (from the official .msi of http://python.org) and pip when - # not already installed. - - "powershell ./build_tools/appveyor/install.ps1" - - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" - - "python -m pip install -U pip" - - # Check that we have the expected version and architecture for Python - - "python --version" - - "python -c \"import struct; print(struct.calcsize('P') * 8)\"" - - "pip --version" - - # Install the build and runtime dependencies of the project. - - "%CMD_IN_ENV% pip install --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com -r build_tools/appveyor/requirements.txt" - - "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst -b doc/logos/scikit-learn-logo.bmp" - - ps: "ls dist" - - # Install the generated wheel package to test it - - "pip install --pre --no-index --find-links dist/ scikit-learn" - -# Not a .NET project, we build scikit-learn in the install step instead -build: false - -test_script: - # Change to a non-source folder to make sure we run the tests on the - # installed library. - - "mkdir empty_folder" - - "cd empty_folder" - - - "python -c \"import nose; nose.main()\" --with-timer --timer-top-n 20 -s -v iced" - - # Move back to the project folder - - "cd .." - -artifacts: - # Archive the generated wheel package in the ci.appveyor.com build report. - - path: dist\* - -on_success: - # Upload the generated wheel package to Rackspace - # On Windows, Apache Libcloud cannot find a standard CA cert bundle so we - # disable the ssl checks. - - "python -m wheelhouse_uploader upload --no-ssl-check --local-folder=dist iced-windows-wheels" - -notifications: - - provider: Webhook - url: https://webhooks.gitter.im/e/0dc8e57cd38105aeb1b4 - on_build_success: false - on_build_failure: True - -cache: - # Use the appveyor cache to avoid re-downloading large archives such - # the MKL numpy and scipy wheels mirrored on a rackspace cloud - # container, speed up the appveyor jobs and reduce bandwidth - # usage on our rackspace account. - - '%APPDATA%\pip\Cache' diff --git a/scripts/src/ice_mod/build_tools/appveyor/install.ps1 b/scripts/src/ice_mod/build_tools/appveyor/install.ps1 deleted file mode 100644 index 160ba55..0000000 --- a/scripts/src/ice_mod/build_tools/appveyor/install.ps1 +++ /dev/null @@ -1,229 +0,0 @@ -# Sample script to install Python and pip under Windows -# Authors: Olivier Grisel, Jonathan Helmus, Kyle Kastner, and Alex Willmer -# License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ - -$MINICONDA_URL = "http://repo.continuum.io/miniconda/" -$BASE_URL = "https://www.python.org/ftp/python/" -$GET_PIP_URL = "https://bootstrap.pypa.io/get-pip.py" -$GET_PIP_PATH = "C:\get-pip.py" - -$PYTHON_PRERELEASE_REGEX = @" -(?x) -(?\d+) -\. -(?\d+) -\. -(?\d+) -(?[a-z]{1,2}\d+) -"@ - - -function Download ($filename, $url) { - $webclient = New-Object System.Net.WebClient - - $basedir = $pwd.Path + "\" - $filepath = $basedir + $filename - if (Test-Path $filename) { - Write-Host "Reusing" $filepath - return $filepath - } - - # Download and retry up to 3 times in case of network transient errors. - Write-Host "Downloading" $filename "from" $url - $retry_attempts = 2 - for ($i = 0; $i -lt $retry_attempts; $i++) { - try { - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - if (Test-Path $filepath) { - Write-Host "File saved at" $filepath - } else { - # Retry once to get the error message if any at the last try - $webclient.DownloadFile($url, $filepath) - } - return $filepath -} - - -function ParsePythonVersion ($python_version) { - if ($python_version -match $PYTHON_PRERELEASE_REGEX) { - return ([int]$matches.major, [int]$matches.minor, [int]$matches.micro, - $matches.prerelease) - } - $version_obj = [version]$python_version - return ($version_obj.major, $version_obj.minor, $version_obj.build, "") -} - - -function DownloadPython ($python_version, $platform_suffix) { - $major, $minor, $micro, $prerelease = ParsePythonVersion $python_version - - if (($major -le 2 -and $micro -eq 0) ` - -or ($major -eq 3 -and $minor -le 2 -and $micro -eq 0) ` - ) { - $dir = "$major.$minor" - $python_version = "$major.$minor$prerelease" - } else { - $dir = "$major.$minor.$micro" - } - - if ($prerelease) { - if (($major -le 2) ` - -or ($major -eq 3 -and $minor -eq 1) ` - -or ($major -eq 3 -and $minor -eq 2) ` - -or ($major -eq 3 -and $minor -eq 3) ` - ) { - $dir = "$dir/prev" - } - } - - if (($major -le 2) -or ($major -le 3 -and $minor -le 4)) { - $ext = "msi" - if ($platform_suffix) { - $platform_suffix = ".$platform_suffix" - } - } else { - $ext = "exe" - if ($platform_suffix) { - $platform_suffix = "-$platform_suffix" - } - } - - $filename = "python-$python_version$platform_suffix.$ext" - $url = "$BASE_URL$dir/$filename" - $filepath = Download $filename $url - return $filepath -} - - -function InstallPython ($python_version, $architecture, $python_home) { - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "" - } else { - $platform_suffix = "amd64" - } - $installer_path = DownloadPython $python_version $platform_suffix - $installer_ext = [System.IO.Path]::GetExtension($installer_path) - Write-Host "Installing $installer_path to $python_home" - $install_log = $python_home + ".log" - if ($installer_ext -eq '.msi') { - InstallPythonMSI $installer_path $python_home $install_log - } else { - InstallPythonEXE $installer_path $python_home $install_log - } - if (Test-Path $python_home) { - Write-Host "Python $python_version ($architecture) installation complete" - } else { - Write-Host "Failed to install Python in $python_home" - Get-Content -Path $install_log - Exit 1 - } -} - - -function InstallPythonEXE ($exepath, $python_home, $install_log) { - $install_args = "/quiet InstallAllUsers=1 TargetDir=$python_home" - RunCommand $exepath $install_args -} - - -function InstallPythonMSI ($msipath, $python_home, $install_log) { - $install_args = "/qn /log $install_log /i $msipath TARGETDIR=$python_home" - $uninstall_args = "/qn /x $msipath" - RunCommand "msiexec.exe" $install_args - if (-not(Test-Path $python_home)) { - Write-Host "Python seems to be installed else-where, reinstalling." - RunCommand "msiexec.exe" $uninstall_args - RunCommand "msiexec.exe" $install_args - } -} - -function RunCommand ($command, $command_args) { - Write-Host $command $command_args - Start-Process -FilePath $command -ArgumentList $command_args -Wait -Passthru -} - - -function InstallPip ($python_home) { - $pip_path = $python_home + "\Scripts\pip.exe" - $python_path = $python_home + "\python.exe" - if (-not(Test-Path $pip_path)) { - Write-Host "Installing pip..." - $webclient = New-Object System.Net.WebClient - $webclient.DownloadFile($GET_PIP_URL, $GET_PIP_PATH) - Write-Host "Executing:" $python_path $GET_PIP_PATH - & $python_path $GET_PIP_PATH - } else { - Write-Host "pip already installed." - } -} - - -function DownloadMiniconda ($python_version, $platform_suffix) { - if ($python_version -eq "3.4") { - $filename = "Miniconda3-3.5.5-Windows-" + $platform_suffix + ".exe" - } else { - $filename = "Miniconda-3.5.5-Windows-" + $platform_suffix + ".exe" - } - $url = $MINICONDA_URL + $filename - $filepath = Download $filename $url - return $filepath -} - - -function InstallMiniconda ($python_version, $architecture, $python_home) { - Write-Host "Installing Python" $python_version "for" $architecture "bit architecture to" $python_home - if (Test-Path $python_home) { - Write-Host $python_home "already exists, skipping." - return $false - } - if ($architecture -eq "32") { - $platform_suffix = "x86" - } else { - $platform_suffix = "x86_64" - } - $filepath = DownloadMiniconda $python_version $platform_suffix - Write-Host "Installing" $filepath "to" $python_home - $install_log = $python_home + ".log" - $args = "/S /D=$python_home" - Write-Host $filepath $args - Start-Process -FilePath $filepath -ArgumentList $args -Wait -Passthru - if (Test-Path $python_home) { - Write-Host "Python $python_version ($architecture) installation complete" - } else { - Write-Host "Failed to install Python in $python_home" - Get-Content -Path $install_log - Exit 1 - } -} - - -function InstallMinicondaPip ($python_home) { - $pip_path = $python_home + "\Scripts\pip.exe" - $conda_path = $python_home + "\Scripts\conda.exe" - if (-not(Test-Path $pip_path)) { - Write-Host "Installing pip..." - $args = "install --yes pip" - Write-Host $conda_path $args - Start-Process -FilePath "$conda_path" -ArgumentList $args -Wait -Passthru - } else { - Write-Host "pip already installed." - } -} - -function main () { - InstallPython $env:PYTHON_VERSION $env:PYTHON_ARCH $env:PYTHON - InstallPip $env:PYTHON -} - -main diff --git a/scripts/src/ice_mod/build_tools/appveyor/requirements.txt b/scripts/src/ice_mod/build_tools/appveyor/requirements.txt deleted file mode 100644 index 00a75fd..0000000 --- a/scripts/src/ice_mod/build_tools/appveyor/requirements.txt +++ /dev/null @@ -1,15 +0,0 @@ -# Fetch numpy and scipy wheels from the sklearn rackspace wheelhouse. -# Those wheels were collected from http://www.lfd.uci.edu/~gohlke/pythonlibs/ -# This is a temporary solution. As soon as numpy and scipy provide official -# wheel for windows we ca delete this --find-links line. ---find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/ - -# fix the versions of numpy to force the use of numpy and scipy to use the whl -# of the rackspace folder instead of trying to install from more recent -# source tarball published on PyPI -numpy==1.9.3 -scipy==0.16.0 -sklearn==0.15.0 -nose -wheel -wheelhouse_uploader diff --git a/scripts/src/ice_mod/build_tools/appveyor/run_with_env.cmd b/scripts/src/ice_mod/build_tools/appveyor/run_with_env.cmd deleted file mode 100644 index 5da547c..0000000 --- a/scripts/src/ice_mod/build_tools/appveyor/run_with_env.cmd +++ /dev/null @@ -1,88 +0,0 @@ -:: To build extensions for 64 bit Python 3, we need to configure environment -:: variables to use the MSVC 2010 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 4 (SDK v7.1) -:: -:: To build extensions for 64 bit Python 2, we need to configure environment -:: variables to use the MSVC 2008 C++ compilers from GRMSDKX_EN_DVD.iso of: -:: MS Windows SDK for Windows 7 and .NET Framework 3.5 (SDK v7.0) -:: -:: 32 bit builds, and 64-bit builds for 3.5 and beyond, do not require specific -:: environment configurations. -:: -:: Note: this script needs to be run with the /E:ON and /V:ON flags for the -:: cmd interpreter, at least for (SDK v7.0) -:: -:: More details at: -:: https://github.com/cython/cython/wiki/64BitCythonExtensionsOnWindows -:: http://stackoverflow.com/a/13751649/163740 -:: -:: Author: Olivier Grisel -:: License: CC0 1.0 Universal: http://creativecommons.org/publicdomain/zero/1.0/ -:: -:: Notes about batch files for Python people: -:: -:: Quotes in values are literally part of the values: -:: SET FOO="bar" -:: FOO is now five characters long: " b a r " -:: If you don't want quotes, don't include them on the right-hand side. -:: -:: The CALL lines at the end of this file look redundant, but if you move them -:: outside of the IF clauses, they do not run properly in the SET_SDK_64==Y -:: case, I don't know why. -@ECHO OFF - -SET COMMAND_TO_RUN=%* -SET WIN_SDK_ROOT=C:\Program Files\Microsoft SDKs\Windows -SET WIN_WDK=c:\Program Files (x86)\Windows Kits\10\Include\wdf - -:: Extract the major and minor versions, and allow for the minor version to be -:: more than 9. This requires the version number to have two dots in it. -SET MAJOR_PYTHON_VERSION=%PYTHON_VERSION:~0,1% -IF "%PYTHON_VERSION:~3,1%" == "." ( - SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,1% -) ELSE ( - SET MINOR_PYTHON_VERSION=%PYTHON_VERSION:~2,2% -) - -:: Based on the Python version, determine what SDK version to use, and whether -:: to set the SDK for 64-bit. -IF %MAJOR_PYTHON_VERSION% == 2 ( - SET WINDOWS_SDK_VERSION="v7.0" - SET SET_SDK_64=Y -) ELSE ( - IF %MAJOR_PYTHON_VERSION% == 3 ( - SET WINDOWS_SDK_VERSION="v7.1" - IF %MINOR_PYTHON_VERSION% LEQ 4 ( - SET SET_SDK_64=Y - ) ELSE ( - SET SET_SDK_64=N - IF EXIST "%WIN_WDK%" ( - :: See: https://connect.microsoft.com/VisualStudio/feedback/details/1610302/ - REN "%WIN_WDK%" 0wdf - ) - ) - ) ELSE ( - ECHO Unsupported Python version: "%MAJOR_PYTHON_VERSION%" - EXIT 1 - ) -) - -IF %PYTHON_ARCH% == 64 ( - IF %SET_SDK_64% == Y ( - ECHO Configuring Windows SDK %WINDOWS_SDK_VERSION% for Python %MAJOR_PYTHON_VERSION% on a 64 bit architecture - SET DISTUTILS_USE_SDK=1 - SET MSSdk=1 - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Setup\WindowsSdkVer.exe" -q -version:%WINDOWS_SDK_VERSION% - "%WIN_SDK_ROOT%\%WINDOWS_SDK_VERSION%\Bin\SetEnv.cmd" /x64 /release - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) ELSE ( - ECHO Using default MSVC build environment for 64 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 - ) -) ELSE ( - ECHO Using default MSVC build environment for 32 bit architecture - ECHO Executing: %COMMAND_TO_RUN% - call %COMMAND_TO_RUN% || EXIT 1 -) diff --git a/scripts/src/ice_mod/build_tools/circle/build_doc.sh b/scripts/src/ice_mod/build_tools/circle/build_doc.sh deleted file mode 100755 index bde8539..0000000 --- a/scripts/src/ice_mod/build_tools/circle/build_doc.sh +++ /dev/null @@ -1,55 +0,0 @@ -set -x -set -e - -# Introspect the commit to know whether or not we should skip building the -# documentation: a pull request that does not change any file in doc/ or -# examples/ folder should be skipped unless the "[doc: build]" is found the -# commit message. -BUILD_DOC=`python build_tools/circle/check_build_doc.py` -echo -e $BUILD_DOC -if [[ $BUILD_DOC == "SKIP:"* ]]; then - touch ~/log.txt # the "test" segment needs that file - exit 0 -fi - -# Installing required system packages to support the rendering of match -# notation in the HTML documentation -sudo -E apt-get -yq update -sudo -E apt-get -yq remove texlive-binaries --purge -sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes \ - install dvipng texlive-latex-base texlive-latex-extra - -# deactivate circleci virtualenv and setup a miniconda env instead -if [[ `type -t deactivate` ]]; then - deactivate -fi - -# Install dependencies with miniconda -pushd . -cd -mkdir -p download -cd download -echo "Cached in $HOME/download :" -ls -l -if [[ ! -f miniconda.sh ]] -then - wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh \ - -O miniconda.sh -fi -chmod +x miniconda.sh && ./miniconda.sh -b -p $HOME/miniconda -cd .. -export PATH="$HOME/miniconda/bin:$PATH" -conda update --yes --quiet conda -popd - -# Configure the conda environment and put it in the path using the -# provided versions -conda create -n testenv --yes --quiet python numpy scipy \ - cython nose coverage matplotlib sphinx pillow -source /home/ubuntu/miniconda/envs/testenv/bin/activate testenv - -# Build and install scikit-learn in dev mode -python setup.py develop - -# The pipefail is requested to propagate exit code -set -o pipefail && cd doc && make html 2>&1 | tee ~/log.txt diff --git a/scripts/src/ice_mod/build_tools/circle/check_build_doc.py b/scripts/src/ice_mod/build_tools/circle/check_build_doc.py deleted file mode 100644 index f8e0048..0000000 --- a/scripts/src/ice_mod/build_tools/circle/check_build_doc.py +++ /dev/null @@ -1,66 +0,0 @@ -"""Check whether we or not we should build the documentation - -If the last commit message has a "[doc skip]" marker, do not build -the doc. On the contrary if a "[doc build]" marker is found, build the doc -instead of relying on the subsequent rules. - -We always build the documentation for jobs that are not related to a specific -PR (e.g. a merge to master or a maintenance branch). - -If this is a PR, check that if there are some files in this PR that are under -the "doc/" or "examples/" folders, otherwise skip. - -If the introspection of the current commit fails for any reason, the default -behavior is to build the documentation. - -""" -import sys -import os -from subprocess import check_output, CalledProcessError - - -def exit(msg="", skip=False): - print("%s: %s" % ("SKIP" if skip else "BUILD", msg)) - sys.exit(0) - -# Introspect the message for the commit that triggered the build -commit = os.environ.get('CIRCLE_SHA1') -if not commit: - exit("undefined CIRCLE_SHA1 variable") -try: - commit_msg = check_output("git log --format=%B -n 1".split() + [commit]) - commit_msg = commit_msg.decode('utf-8') -except CalledProcessError: - exit("failed to introspect commit message for %s" % commit) - -if "[doc skip]" in commit_msg: - exit("[doc skip] marker found", skip=True) -elif "[doc build]" in commit_msg: - exit("[doc build] marker found") - -# Check whether this commit is part of a pull request or not -pr_url = os.environ.get('CI_PULL_REQUEST') -if not pr_url: - # The documentation should be always built when executed from one of the - # main branches - exit("not a pull request") - -# Introspect the list of files changed by all the commits in this PR. -# Hardcode the assumption that this is a PR to origin/master of this repo -# as apparently there is way to reliably get the target of a PR with circle -# ci -git_range = "origin/master...%s" % commit -try: - check_output("git fetch origin master".split()) - filenames = check_output("git diff --name-only".split() + [git_range]) -except CalledProcessError: - exit("git introspection failed.") -filenames = filenames.decode('utf-8').split() -for filename in filenames: - if filename.startswith(u'doc/') or filename.startswith(u'examples/'): - exit("detected doc impacting file modified by PR in range %s: %s" - % (git_range, filename)) - -# This PR does not seem to have any documentation related file changed. -msg = "no doc impacting files detected:\n" + u"\n".join(filenames) -exit(msg, skip=True) diff --git a/scripts/src/ice_mod/build_tools/circle/push_doc.sh b/scripts/src/ice_mod/build_tools/circle/push_doc.sh deleted file mode 100755 index 2423929..0000000 --- a/scripts/src/ice_mod/build_tools/circle/push_doc.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# This script is meant to be called in the "deploy" step defined in -# circle.yml. See https://circleci.com/docs/ for more details. -# The behavior of the script is controlled by environment variable defined -# in the circle.yml in the top level folder of the project. - - -if [ -z $CIRCLE_PROJECT_USERNAME ]; -then USERNAME="sklearn-ci"; -else USERNAME=$CIRCLE_PROJECT_USERNAME; -fi - -DOC_REPO="scikit-learn.github.io" - -MSG="Pushing the docs for revision for branch: $CIRCLE_BRANCH, commit $CIRCLE_SHA1" - -cd $HOME -if [ ! -d $DOC_REPO ]; -then git clone "git@github.com:scikit-learn/"$DOC_REPO".git"; -fi -cd $DOC_REPO -git checkout master -git reset --hard origin/master -git rm -rf dev/ && rm -rf dev/ -cp -R $HOME/scikit-learn/doc/_build/html/stable dev -git config --global user.email "olivier.grisel+sklearn-ci@gmail.com" -git config --global user.name $USERNAME -git config --global push.default matching -git add -f dev/ -git commit -m "$MSG" dev -git push - -echo $MSG diff --git a/scripts/src/ice_mod/build_tools/cythonize.py b/scripts/src/ice_mod/build_tools/cythonize.py deleted file mode 100755 index b01da58..0000000 --- a/scripts/src/ice_mod/build_tools/cythonize.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python -""" cythonize - -Cythonize pyx files into C files as needed. - -Usage: cythonize [root_dir] - -Default [root_dir] is 'sklearn'. - -Checks pyx files to see if they have been changed relative to their -corresponding C files. If they have, then runs cython on these files to -recreate the C files. - -The script detects changes in the pyx/pxd files using checksums -[or hashes] stored in a database file - -Simple script to invoke Cython on all .pyx -files; while waiting for a proper build system. Uses file hashes to -figure out if rebuild is needed. - -It is called by ./setup.py sdist so that sdist package can be installed without -cython - -Originally written by Dag Sverre Seljebotn, and adapted from statsmodel 0.6.1 -(Modified BSD 3-clause) - -We copied it for scikit-learn. - -Note: this script does not check any of the dependent C libraries; it only -operates on the Cython .pyx files or their corresponding Cython header (.pxd) -files. -""" -# Author: Arthur Mensch -# Author: Raghav R V -# -# License: BSD 3 clause - -from __future__ import division, print_function, absolute_import - -import os -import re -import sys -import hashlib -import subprocess - -HASH_FILE = 'cythonize.dat' -DEFAULT_ROOT = 'sklearn' - -# WindowsError is not defined on unix systems -try: - WindowsError -except NameError: - WindowsError = None - - -def cythonize(cython_file, gen_file): - try: - from Cython.Compiler.Version import version as cython_version - from distutils.version import LooseVersion - if LooseVersion(cython_version) < LooseVersion('0.21'): - raise Exception('Building scikit-learn requires Cython >= 0.21') - - except ImportError: - pass - - flags = ['--fast-fail'] - if gen_file.endswith('.cpp'): - flags += ['--cplus'] - - try: - try: - rc = subprocess.call(['cython'] + - flags + ["-o", gen_file, cython_file]) - if rc != 0: - raise Exception('Cythonizing %s failed' % cython_file) - except OSError: - # There are ways of installing Cython that don't result in a cython - # executable on the path, see scipy issue gh-2397. - rc = subprocess.call([sys.executable, '-c', - 'import sys; from Cython.Compiler.Main ' - 'import setuptools_main as main;' - ' sys.exit(main())'] + flags + - ["-o", gen_file, cython_file]) - if rc != 0: - raise Exception('Cythonizing %s failed' % cython_file) - except OSError: - raise OSError('Cython needs to be installed') - - -def load_hashes(filename): - """Load the hashes dict from the hashfile""" - # { filename : (sha1 of header if available or 'NA', - # sha1 of input, - # sha1 of output) } - - hashes = {} - try: - with open(filename, 'r') as cython_hash_file: - for hash_record in cython_hash_file: - (filename, header_hash, - cython_hash, gen_file_hash) = hash_record.split() - hashes[filename] = (header_hash, cython_hash, gen_file_hash) - except (KeyError, ValueError, AttributeError, IOError): - hashes = {} - return hashes - - -def save_hashes(hashes, filename): - """Save the hashes dict to the hashfile""" - with open(filename, 'w') as cython_hash_file: - for key, value in hashes.items(): - cython_hash_file.write("%s %s %s %s\n" - % (key, value[0], value[1], value[2])) - - -def sha1_of_file(filename): - h = hashlib.sha1() - with open(filename, "rb") as f: - h.update(f.read()) - return h.hexdigest() - - -def clean_path(path): - """Clean the path""" - path = path.replace(os.sep, '/') - if path.startswith('./'): - path = path[2:] - return path - - -def get_hash_tuple(header_path, cython_path, gen_file_path): - """Get the hashes from the given files""" - - header_hash = (sha1_of_file(header_path) - if os.path.exists(header_path) else 'NA') - from_hash = sha1_of_file(cython_path) - to_hash = (sha1_of_file(gen_file_path) - if os.path.exists(gen_file_path) else 'NA') - - return header_hash, from_hash, to_hash - - -def cythonize_if_unchanged(path, cython_file, gen_file, hashes): - full_cython_path = os.path.join(path, cython_file) - full_header_path = full_cython_path.replace('.pyx', '.pxd') - full_gen_file_path = os.path.join(path, gen_file) - - current_hash = get_hash_tuple(full_header_path, full_cython_path, - full_gen_file_path) - - if current_hash == hashes.get(clean_path(full_cython_path)): - print('%s has not changed' % full_cython_path) - return - - print('Processing %s' % full_cython_path) - cythonize(full_cython_path, full_gen_file_path) - - # changed target file, recompute hash - current_hash = get_hash_tuple(full_header_path, full_cython_path, - full_gen_file_path) - - # Update the hashes dict with the new hash - hashes[clean_path(full_cython_path)] = current_hash - - -def check_and_cythonize(root_dir): - print(root_dir) - hashes = load_hashes(HASH_FILE) - - for cur_dir, dirs, files in os.walk(root_dir): - for filename in files: - if filename.endswith('.pyx'): - gen_file_ext = '.c' - # Cython files with libcpp imports should be compiled to cpp - with open(os.path.join(cur_dir, filename), 'rb') as f: - data = f.read() - m = re.search(b"libcpp", data, re.I | re.M) - if m: - gen_file_ext = ".cpp" - cython_file = filename - gen_file = filename.replace('.pyx', gen_file_ext) - cythonize_if_unchanged(cur_dir, cython_file, gen_file, hashes) - - # Save hashes once per module. This prevents cythonizing prev. - # files again when debugging broken code in a single file - save_hashes(hashes, HASH_FILE) - - -def main(root_dir=DEFAULT_ROOT): - check_and_cythonize(root_dir) - - -if __name__ == '__main__': - try: - root_dir_arg = sys.argv[1] - except IndexError: - root_dir_arg = DEFAULT_ROOT - main(root_dir_arg) diff --git a/scripts/src/ice_mod/build_tools/travis/after_success.sh b/scripts/src/ice_mod/build_tools/travis/after_success.sh deleted file mode 100755 index a4613cc..0000000 --- a/scripts/src/ice_mod/build_tools/travis/after_success.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "after_success" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. - -# License: 3-clause BSD - -set -e - -if [[ "$COVERAGE" == "true" ]]; then - # Need to run coveralls from a git checkout, so we copy .coverage - # from TEST_DIR where nosetests has been run - cp $TEST_DIR/.coverage $TRAVIS_BUILD_DIR - cd $TRAVIS_BUILD_DIR - # Ignore coveralls failures as the coveralls server is not - # very reliable but we don't want travis to report a failure - # in the github UI just because the coverage report failed to - # be published. - coveralls || echo "Coveralls upload failed" -fi diff --git a/scripts/src/ice_mod/build_tools/travis/install.sh b/scripts/src/ice_mod/build_tools/travis/install.sh deleted file mode 100755 index 37548b8..0000000 --- a/scripts/src/ice_mod/build_tools/travis/install.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "install" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. -# The behavior of the script is controlled by environment variabled defined -# in the .travis.yml in the top level folder of the project. - -# License: 3-clause BSD - -# Travis clone hiclib/iced repository in to a local repository. -# We use a cached directory with three iced repositories (one for each -# matrix entry) from which we pull from local Travis repository. This allows -# us to keep build artefact for gcc + cython, and gain time - -set -e - -# Fix the compilers to workaround avoid having the Python 3.4 build -# lookup for g++44 unexpectedly. -export CC=gcc -export CXX=g++ - -echo 'List files from cached directories' -echo 'pip:' -ls $HOME/.cache/pip - - -if [[ "$DISTRIB" == "conda" ]]; then - # Deactivate the travis-provided virtual environment and setup a - # conda-based environment instead - deactivate - - # Use the miniconda installer for faster download / install of conda - # itself - pushd . - cd - mkdir -p download - cd download - echo "Cached in $HOME/download :" - ls -l - echo - if [[ ! -f miniconda.sh ]] - then - wget http://repo.continuum.io/miniconda/Miniconda-3.6.0-Linux-x86_64.sh \ - -O miniconda.sh - fi - chmod +x miniconda.sh && ./miniconda.sh -b - cd .. - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda - popd - - # Configure the conda environment and put it in the path using the - # provided versions - if [[ "$INSTALL_MKL" == "true" ]]; then - conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ - numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION numpy scipy \ - cython=$CYTHON_VERSION libgfortran mkl - else - conda create -n testenv --yes python=$PYTHON_VERSION pip nose \ - numpy=$NUMPY_VERSION scipy=$SCIPY_VERSION cython=$CYTHON_VERSION \ - libgfortran - fi - source activate testenv - - # Install nose-timer via pip - pip install nose-timer - -elif [[ "$DISTRIB" == "ubuntu" ]]; then - # At the time of writing numpy 1.9.1 is included in the travis - # virtualenv but we want to use the numpy installed through apt-get - # install. - deactivate - # Create a new virtualenv using system site packages for python, numpy - # and scipy - virtualenv --system-site-packages testvenv - source testvenv/bin/activate - pip install nose nose-timer cython - -elif [[ "$DISTRIB" == "scipy-dev-wheels" ]]; then - # Set up our own virtualenv environment to avoid travis' numpy. - # This venv points to the python interpreter of the travis build - # matrix. - virtualenv --python=python ~/testvenv - source ~/testvenv/bin/activate - pip install --upgrade pip setuptools - - # We use the default Python virtualenv provided by travis - echo "Installing numpy master wheel" - pip install --pre --upgrade --no-index --timeout=60 \ - --trusted-host travis-dev-wheels.scipy.org \ - -f https://travis-dev-wheels.scipy.org/ numpy scipy - pip install nose nose-timer cython -fi - -if [[ "$COVERAGE" == "true" ]]; then - pip install coverage coveralls -fi - -if [ ! -d "$CACHED_BUILD_DIR" ]; then - mkdir -p $CACHED_BUILD_DIR -fi - -rsync -av --exclude '.git/' --exclude='testvenv/' \ - $TRAVIS_BUILD_DIR $CACHED_BUILD_DIR - -cd $CACHED_BUILD_DIR/iced - -# Build iced in the install.sh script to collapse the verbose -# build output in the travis output when it succeeds. -python --version -python -c "import numpy; print('numpy %s' % numpy.__version__)" -python -c "import scipy; print('scipy %s' % scipy.__version__)" -python setup.py develop diff --git a/scripts/src/ice_mod/build_tools/travis/test_script.sh b/scripts/src/ice_mod/build_tools/travis/test_script.sh deleted file mode 100755 index 3a8d0bf..0000000 --- a/scripts/src/ice_mod/build_tools/travis/test_script.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "script" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. -# The behavior of the script is controlled by environment variabled defined -# in the .travis.yml in the top level folder of the project. - -# License: 3-clause BSD - -set -e - -# Get into a temp directory to run test from the installed iced and -# check if we do not leave artifacts -mkdir -p $TEST_DIR -# We need the setup.cfg for the nose settings -cp setup.cfg $TEST_DIR -cd $TEST_DIR - -python --version -python -c "import numpy; print('numpy %s' % numpy.__version__)" -python -c "import scipy; print('scipy %s' % scipy.__version__)" -python -c "import multiprocessing as mp; print('%d CPUs' % mp.cpu_count())" - -# Skip tests that require large downloads over the network to save bandwidth -# usage as travis workers are stateless and therefore traditional local -# disk caching does not work. -export SKLEARN_SKIP_NETWORK_TESTS=1 - -if [[ "$COVERAGE" == "true" ]]; then - nosetests -s --with-coverage --with-timer --timer-top-n 20 iced -else - nosetests -s --with-timer --timer-top-n 20 iced -fi - -# Is directory still empty ? -ls -ltra - -# Test doc -cd $CACHED_BUILD_DIR/iced -make test-doc test-sphinxext diff --git a/scripts/src/ice_mod/build_tools/windows/windows_testing_downloader.ps1 b/scripts/src/ice_mod/build_tools/windows/windows_testing_downloader.ps1 deleted file mode 100644 index d72b678..0000000 --- a/scripts/src/ice_mod/build_tools/windows/windows_testing_downloader.ps1 +++ /dev/null @@ -1,270 +0,0 @@ -# Author: Kyle Kastner -# License: BSD 3 clause - -# This script is a helper to download the base python, numpy, and scipy -# packages from their respective websites. -# To quickly execute the script, run the following Powershell command: -# powershell.exe -ExecutionPolicy unrestricted "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-learn/scikit-learn/master/continuous_integration/windows/windows_testing_downloader.ps1'))" - -# This is a stopgap solution to make Windows testing easier -# until Windows CI issues are resolved. - -# Rackspace's default Windows VMs have several security features enabled by default. -# The DisableInternetExplorerESC function disables a feature which -# prevents any webpage from opening without explicit permission. -# This is a default setting of Windows VMs on Rackspace, and makes it annoying to -# download other packages to test! - -# Powershell scripts are also disabled by default. One must run the command: -# set-executionpolicy unrestricted -# from a Powershell terminal with administrator rights to enable scripts. -# To start an administrator Powershell terminal, right click second icon from the left on Windows Server 2012's bottom taskbar. - -param ( - [string]$python = "None", - [string]$nogit = "False" -) - -function DisableInternetExplorerESC { - # Disables InternetExplorerESC to enable easier manual downloads of testing packages. - # http://stackoverflow.com/questions/9368305/disable-ie-security-on-windows-server-via-powershell - $AdminKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}" - $UserKey = "HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}" - Set-ItemProperty -Path $AdminKey -Name "IsInstalled" -Value 0 - Set-ItemProperty -Path $UserKey -Name "IsInstalled" -Value 0 - Stop-Process -Name Explorer - Write-Host "IE Enhanced Security Configuration (ESC) has been disabled." -ForegroundColor Green -} - -function DownloadPackages ($package_dict, $append_string) { - $webclient = New-Object System.Net.WebClient - - ForEach ($key in $package_dict.Keys) { - $url = $package_dict[$key] - $file = $key + $append_string - if ($url -match "(\.*exe$)") { - $file = $file + ".exe" - } elseif ($url -match "(\.*msi$)") { - $file = $file + ".msi" - } else { - $file = $file + ".py" - } - $basedir = $pwd.Path + "\" - $filepath = $basedir + $file - Write-Host "Downloading" $file "from" $url - - # Retry up to 5 times in case of network transient errors. - $retry_attempts = 5 - for($i=0; $i -lt $retry_attempts; $i++){ - try{ - $webclient.DownloadFile($url, $filepath) - break - } - Catch [Exception]{ - Start-Sleep 1 - } - } - Write-Host "File saved at" $filepath - } -} - -function InstallPython($match_string) { - $pkg_regex = "python" + $match_string + "*" - $pkg = Get-ChildItem -Filter $pkg_regex -Name - Invoke-Expression -Command "msiexec /qn /i $pkg" - - Write-Host "Installing Python" - Start-Sleep 25 - Write-Host "Python installation complete" -} - -function InstallPip($match_string, $python_version) { - $pkg_regex = "get-pip" + $match_string + "*" - $py = $python_version -replace "\." - $pkg = Get-ChildItem -Filter $pkg_regex -Name - $python_path = "C:\Python" + $py + "\python.exe" - Invoke-Expression -Command "$python_path $pkg" -} - -function EnsurePip($python_version) { - $py = $python_version -replace "\." - $python_path = "C:\Python" + $py + "\python.exe" - Invoke-Expression -Command "$python_path -m ensurepip" -} - -function GetPythonHome($python_version) { - $py = $python_version -replace "\." - $pypath = "C:\Python" + $py + "\" - return $pypath -} - -function GetPipPath($python_version) { - $py = $python_version -replace "\." - $pypath = GetPythonHome $python_version - if ($py.StartsWith("3")) { - $pip = $pypath + "Scripts\pip3.exe" - } else { - $pip = $pypath + "Scripts\pip.exe" - } - return $pip -} - -function PipInstall($pkg_name, $python_version, $extra_args) { - $pip = GetPipPath $python_version - Invoke-Expression -Command "$pip install $pkg_name" -} - -function InstallNose($python_version) { - PipInstall "nose" $python_version -} - -function WheelInstall($name, $url, $python_version) { - $pip = GetPipPath $python_version - $args = "install --use-wheel --no-index" - Invoke-Expression -Command "$pip $args $url $name" -} - -function InstallWheel($python_version) { - PipInstall "virtualenv" $python_version - PipInstall "wheel" $python_version -} - -function InstallNumpy($package_dict, $python_version) { - #Don't pass name so we can use URL directly. - WheelInstall "" $package_dict["numpy"] $python_version -} - -function InstallScipy($package_dict, $python_version) { - #Don't pass name so we can use URL directly. - WheelInstall "" $package_dict["scipy"] $python_version -} - -function InstallGit { - $pkg_regex = "git*" - $pkg = Get-ChildItem -Filter $pkg_regex -Name - $pkg_cmd = $pwd.ToString() + "\" + $pkg + " /verysilent" - Invoke-Expression -Command $pkg_cmd - - Write-Host "Installing Git" - Start-Sleep 20 - # Remove the installer - seems to cause weird issues with Git Bash - Invoke-Expression -Command "rm git.exe" - Write-Host "Git installation complete" -} - -function ReadAndUpdateFromRegistry { - # http://stackoverflow.com/questions/14381650/how-to-update-windows-powershell-session-environment-variables-from-registry - foreach($level in "Machine","User") { - [Environment]::GetEnvironmentVariables($level).GetEnumerator() | % { - # For Path variables, append the new values, if they're not already in there - if($_.Name -match 'Path$') { - $_.Value = ($((Get-Content "Env:$($_.Name)") + ";$($_.Value)") -split ';' | Select -unique) -join ';' - } - $_ - } | Set-Content -Path { "Env:$($_.Name)" } - } -} - -function UpdatePaths($python_version) { - #This function makes local path updates required in order to install Python and supplementary packages in a single shell. - $pypath = GetPythonHome $python_version - $env:PATH = $env:PATH + ";" + $pypath - $env:PYTHONPATH = $pypath + "DLLs;" + $pypath + "Lib;" + $pypath + "Lib\site-packages" - $env:PYTHONHOME = $pypath - Write-Host "PYTHONHOME temporarily set to" $env:PYTHONHOME - Write-Host "PYTHONPATH temporarily set to" $env:PYTHONPATH - Write-Host "PATH temporarily set to" $env:PATH -} - -function Python27URLs { - # Function returns a dictionary of packages to download for Python 2.7. - $urls = @{ - "python" = "https://www.python.org/ftp/python/2.7.7/python-2.7.7.msi" - "numpy" = "http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/numpy-1.8.1-cp27-none-win32.whl" - "scipy" = "http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/scipy-0.14.0-cp27-none-win32.whl" - "get-pip" = "https://bootstrap.pypa.io/get-pip.py" - } - return $urls -} - -function Python34URLs { - # Function returns a dictionary of packages to download for Python 3.4. - $urls = @{ - "python" = "https://www.python.org/ftp/python/3.4.1/python-3.4.1.msi" - "numpy" = "http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/numpy-1.8.1-cp34-none-win32.whl" - "scipy" = "http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/scipy-0.14.0-cp34-none-win32.whl" - } - return $urls -} - -function GitURLs { - # Function returns a dictionary of packages to download for Git - $urls = @{ - "git" = "https://github.com/msysgit/msysgit/releases/download/Git-1.9.4-preview20140611/Git-1.9.4-preview20140611.exe" - } - return $urls -} - -function main { - $versions = @{ - "2.7" = Python27URLs - "3.4" = Python34URLs - } - - if ($nogit -eq "False") { - Write-Host "Downloading and installing Gitbash" - $urls = GitURLs - DownloadPackages $urls "" - InstallGit ".exe" - } - - if (($python -eq "None")) { - Write-Host "Installing all supported python versions" - Write-Host "Current versions supported are:" - ForEach ($key in $versions.Keys) { - Write-Host $key - $all_python += @($key) - } - } elseif(!($versions.ContainsKey($python))) { - Write-Host "Python version not recognized!" - Write-Host "Pass python version with -python" - Write-Host "Current versions supported are:" - ForEach ($key in $versions.Keys) { - Write-Host $key - } - return - } else { - $all_python += @($python) - } - ForEach ($py in $all_python) { - Write-Host "Installing Python" $py - DisableInternetExplorerESC - $pystring = $py -replace "\." - $pystring = "_py" + $pystring - $package_dict = $versions[$py] - - # This will download the whl packages as well which is - # clunky but makes configuration simpler. - DownloadPackages $package_dict $pystring - UpdatePaths $py - InstallPython $pystring - ReadAndUpdateFromRegistry - if ($package_dict.ContainsKey("get-pip")) { - InstallPip $pystring $py - } else { - EnsurePip $py - } - InstallNose $py - InstallWheel $py - - # The installers below here use wheel packages. - # Wheels were created from CGohlke's installers with - # wheel convert - # These are hosted in Rackspace Cloud Files. - InstallNumpy $package_dict $py - InstallScipy $package_dict $py - } - return -} - -main diff --git a/scripts/src/ice_mod/continuous_integration/install.sh b/scripts/src/ice_mod/continuous_integration/install.sh deleted file mode 100755 index bdd8a5f..0000000 --- a/scripts/src/ice_mod/continuous_integration/install.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/bash -# This script is meant to be called by the "install" step defined in -# .travis.yml. See http://docs.travis-ci.com/ for more details. -# The behavior of the script is controlled by environment variabled defined -# in the .travis.yml in the top level folder of the project. -# -# This script is adapted from a similar script from the scikit-learn repository. -# -# License: 3-clause BSD - -set -e - -# Fix the compilers to workaround avoid having the Python 3.4 build -# lookup for g++44 unexpectedly. -export CC=gcc -export CXX=g++ - -create_new_venv() { - # At the time of writing numpy 1.9.1 is included in the travis - # virtualenv but we want to be in control of the numpy version - # we are using for example through apt-get install - deactivate - virtualenv --system-site-packages testvenv - source testvenv/bin/activate - pip install nose -} - -print_conda_requirements() { - # Echo a conda requirement string for example - # "pip nose python='.7.3 scikit-learn=*". It has a hardcoded - # list of possible packages to install and looks at _VERSION - # environment variables to know whether to install a given package and - # if yes which version to install. For example: - # - for numpy, NUMPY_VERSION is used - # - for scikit-learn, SCIKIT_LEARN_VERSION is used - TO_INSTALL_ALWAYS="pip nose" - REQUIREMENTS="$TO_INSTALL_ALWAYS" - TO_INSTALL_MAYBE="python numpy scipy scikit-learn" - for PACKAGE in $TO_INSTALL_MAYBE; do - # Capitalize package name and add _VERSION - PACKAGE_VERSION_VARNAME="${PACKAGE^^}_VERSION" - # replace - by _, needed for scikit-learn for example - PACKAGE_VERSION_VARNAME="${PACKAGE_VERSION_VARNAME//-/_}" - # dereference $PACKAGE_VERSION_VARNAME to figure out the - # version to install - PACKAGE_VERSION="${!PACKAGE_VERSION_VARNAME}" - if [ -n "$PACKAGE_VERSION" ]; then - REQUIREMENTS="$REQUIREMENTS $PACKAGE=$PACKAGE_VERSION" - fi - done - echo $REQUIREMENTS -} - -create_new_conda_env() { - # Deactivate the travis-provided virtual environment and setup a - # conda-based environment instead - deactivate - - # Use the miniconda installer for faster download / install of conda - # itself - wget http://repo.continuum.io/miniconda/Miniconda-3.6.0-Linux-x86_64.sh \ - -O miniconda.sh - chmod +x miniconda.sh && ./miniconda.sh -b - export PATH=/home/travis/miniconda/bin:$PATH - conda update --yes conda - - # Configure the conda environment and put it in the path using the - # provided versions - REQUIREMENTS=$(print_conda_requirements) - echo "conda requirements string: $REQUIREMENTS" - conda create -n testenv --yes $REQUIREMENTS - source activate testenv - - if [[ "$INSTALL_MKL" == "true" ]]; then - # Make sure that MKL is used - conda install --yes mkl - else - # Make sure that MKL is not used - conda remove --yes --features mkl || echo "MKL not installed" - fi -} - -if [[ "$DISTRIB" == "neurodebian" ]]; then - create_new_venv - bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh) - sudo apt-get install -qq python-sc - -elif [[ "$DISTRIB" == "conda" ]]; then - create_new_conda_env - # Note: nibabel is in setup.py install_requires so nibabel will - # always be installed eventually. Defining NIBABEL_VERSION is only - # useful if you happen to want a specific nibabel version rather - # than the latest available one. - if [ -n "$NIBABEL_VERSION" ]; then - pip install nibabel=="$NIBABEL_VERSION" - fi - -else - echo "Unrecognized distribution ($DISTRIB); cannot setup travis environment." - exit 1 -fi - -if [[ "$COVERAGE" == "true" ]]; then - pip install coverage coveralls -fi - diff --git a/scripts/src/ice_mod/continuous_integration/show-python-packages-versions.py b/scripts/src/ice_mod/continuous_integration/show-python-packages-versions.py deleted file mode 100644 index 63aa9df..0000000 --- a/scripts/src/ice_mod/continuous_integration/show-python-packages-versions.py +++ /dev/null @@ -1,26 +0,0 @@ -import sys - -DEPENDENCIES = ['numpy', 'scipy', 'pandas'] - - -def print_package_version(package_name, indent=' '): - try: - package = __import__(package_name) - version = getattr(package, '__version__', None) - package_file = getattr(package, '__file__', ) - provenance_info = '{0} from {1}'.format(version, package_file) - except ImportError: - provenance_info = 'not installed' - - print('{0}{1}: {2}'.format(indent, package_name, provenance_info)) - - -if __name__ == '__main__': - print('=' * 120) - print('Python %s' % str(sys.version)) - print('from: %s\n' % sys.executable) - - print('Dependencies versions') - for package_name in DEPENDENCIES: - print_package_version(package_name) - print('=' * 120) diff --git a/scripts/src/ice_mod/doc/.gitignore b/scripts/src/ice_mod/doc/.gitignore deleted file mode 100644 index 8e5ecaa..0000000 --- a/scripts/src/ice_mod/doc/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -_build/* -auto_examples/* diff --git a/scripts/src/ice_mod/doc/Makefile b/scripts/src/ice_mod/doc/Makefile deleted file mode 100644 index 50c507d..0000000 --- a/scripts/src/ice_mod/doc/Makefile +++ /dev/null @@ -1,186 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = _build - -# User-friendly check for sphinx-build -ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) -$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) -endif - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . - -.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext - -all: html - -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - -clean: - rm -rf $(BUILDDIR)/* - -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/iced.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/iced.qhc" - -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/iced" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/iced" - @echo "# devhelp" - -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -deploy: - rsync -avz _build/html/ nvaroquaux@ssh.cbio.ensmp.fr:public_html/iced/dev/ - -deploy-release: - rsync -avz _build/html/ nvaroquaux@ssh.cbio.ensmp.fr:public_html/iced/ - diff --git a/scripts/src/ice_mod/doc/_static/css/bootstrap.css b/scripts/src/ice_mod/doc/_static/css/bootstrap.css deleted file mode 100644 index 6afdbde..0000000 --- a/scripts/src/ice_mod/doc/_static/css/bootstrap.css +++ /dev/null @@ -1,4692 +0,0 @@ -/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - */ - -/*! normalize.css v2.1.0 | MIT License | git.io/normalize */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -audio, -canvas, -video { - display: inline-block; -} - -audio:not([controls]) { - display: none; - height: 0; -} - -[hidden] { - display: none; -} - -html { - font-family: sans-serif; - -webkit-text-size-adjust: 100%; - -ms-text-size-adjust: 100%; -} - -body { - margin: 0; -} - -a:focus { - outline: thin dotted; -} - -a:active, -a:hover { - outline: 0; -} - -h1 { - margin: 0.67em 0; - font-size: 2em; -} - -abbr[title] { - border-bottom: 1px dotted; -} - -b, -strong { - font-weight: bold; -} - -dfn { - font-style: italic; -} - -hr { - height: 0; - -moz-box-sizing: content-box; - box-sizing: content-box; -} - -mark { - color: #000; - background: #ff0; -} - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - font-size: 1em; -} - -pre { - white-space: pre-wrap; -} - -q { - quotes: "\201C" "\201D" "\2018" "\2019"; -} - -small { - font-size: 80%; -} - -sub, -sup { - position: relative; - font-size: 75%; - line-height: 0; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -img { - border: 0; -} - -svg:not(:root) { - overflow: hidden; -} - -figure { - margin: 0; -} - -fieldset { - padding: 0.35em 0.625em 0.75em; - margin: 0 2px; - border: 1px solid #c0c0c0; -} - -legend { - padding: 0; - border: 0; -} - -button, -input, -select, -textarea { - margin: 0; - font-family: inherit; - font-size: 100%; -} - -button, -input { - line-height: normal; -} - -button, -select { - text-transform: none; -} - -button, -html input[type="button"], -input[type="reset"], -input[type="submit"] { - cursor: pointer; - -webkit-appearance: button; -} - -button[disabled], -html input[disabled] { - cursor: default; -} - -input[type="checkbox"], -input[type="radio"] { - padding: 0; - box-sizing: border-box; -} - -input[type="search"] { - -webkit-box-sizing: content-box; - -moz-box-sizing: content-box; - box-sizing: content-box; - -webkit-appearance: textfield; -} - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -button::-moz-focus-inner, -input::-moz-focus-inner { - padding: 0; - border: 0; -} - -textarea { - overflow: auto; - vertical-align: top; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -@media print { - * { - color: #000 !important; - text-shadow: none !important; - background: transparent !important; - box-shadow: none !important; - } - a, - a:visited { - text-decoration: underline; - } - a[href]:after { - content: " (" attr(href) ")"; - } - abbr[title]:after { - content: " (" attr(title) ")"; - } - .ir a:after, - a[href^="javascript:"]:after, - a[href^="#"]:after { - content: ""; - } - pre, - blockquote { - border: 1px solid #999; - page-break-inside: avoid; - } - thead { - display: table-header-group; - } - tr, - img { - page-break-inside: avoid; - } - img { - max-width: 100% !important; - } - @page { - margin: 2cm .5cm; - } - p, - h2, - h3 { - orphans: 3; - widows: 3; - } - h2, - h3 { - page-break-after: avoid; - } - .navbar { - display: none; - } - .table td, - .table th { - background-color: #fff !important; - } - .btn > .caret, - .dropup > .btn > .caret { - border-top-color: #000 !important; - } - .label { - border: 1px solid #000; - } - .table { - border-collapse: collapse !important; - } - .table-bordered th, - .table-bordered td { - border: 1px solid #ddd !important; - } -} - -* { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -html { - font-size: 62.5%; - -webkit-tap-highlight-color: rgba(0, 0, 0, 0); -} - -body { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-size: 14px; - line-height: 1.428571429; - color: #333333; - background-color: #ffffff; -} - -input, -button, -select, -textarea { - font-family: inherit; - font-size: inherit; - line-height: inherit; -} - -a { - color: #428bca; - text-decoration: none; -} - -a:hover, -a:focus { - color: #2a6496; - text-decoration: underline; -} - -a:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -img { - vertical-align: middle; -} - -.img-responsive { - display: inline-block; - height: auto; - max-width: 100%; -} - -.img-rounded { - border-radius: 6px; -} - -.img-circle { - border-radius: 500px; -} - -hr { - margin-top: 20px; - margin-bottom: 20px; - border: 0; - border-top: 1px solid #eeeeee; -} - -p { - margin: 0 0 10px; -} - -.lead { - margin-bottom: 20px; - font-size: 16.099999999999998px; - font-weight: 200; - line-height: 1.4; -} - -@media (min-width: 768px) { - .lead { - font-size: 21px; - } -} - -small { - font-size: 85%; -} - -cite { - font-style: normal; -} - -.text-muted { - color: #999999; -} - -.text-primary { - color: #428bca; -} - -.text-warning { - color: #c09853; -} - -.text-danger { - color: #b94a48; -} - -.text-success { - color: #468847; -} - -.text-info { - color: #3a87ad; -} - -.text-left { - text-align: left; -} - -.text-right { - text-align: right; -} - -.text-center { - text-align: center; -} - -h1, -h2, -h3, -h4, -h5, -h6, -.h1, -.h2, -.h3, -.h4, -.h5, -.h6 { - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; - font-weight: 500; - line-height: 1.1; -} - -h1 small, -h2 small, -h3 small, -h4 small, -h5 small, -h6 small, -.h1 small, -.h2 small, -.h3 small, -.h4 small, -.h5 small, -.h6 small { - font-weight: normal; - line-height: 1; - color: #999999; -} - -h1, -h2, -h3 { - margin-top: 20px; - margin-bottom: 10px; -} - -h4, -h5, -h6 { - margin-top: 10px; - margin-bottom: 10px; -} - -h1, -.h1 { - font-size: 38px; -} - -h2, -.h2 { - font-size: 32px; -} - -h3, -.h3 { - font-size: 24px; -} - -h4, -.h4 { - font-size: 18px; -} - -h5, -.h5 { - font-size: 14px; -} - -h6, -.h6 { - font-size: 12px; -} - -h1 small, -.h1 small { - font-size: 24px; -} - -h2 small, -.h2 small { - font-size: 18px; -} - -h3 small, -.h3 small, -h4 small, -.h4 small { - font-size: 14px; -} - -.page-header { - padding-bottom: 9px; - margin: 40px 0 20px; - border-bottom: 1px solid #eeeeee; -} - -ul, -ol { - margin-top: 0; - margin-bottom: 10px; -} - -ul ul, -ol ul, -ul ol, -ol ol { - margin-bottom: 0; -} - -.list-unstyled { - padding-left: 0; - list-style: none; -} - -.list-inline { - padding-left: 0; - list-style: none; -} - -.list-inline > li { - display: inline-block; - padding-right: 5px; - padding-left: 5px; -} - -dl { - margin-bottom: 20px; -} - -dt, -dd { - line-height: 1.428571429; -} - -dt { - font-weight: bold; -} - -dd { - margin-left: 0; -} - -.dl-horizontal dt { - float: left; - width: 160px; - overflow: hidden; - clear: left; - text-align: right; - text-overflow: ellipsis; - white-space: nowrap; -} - -.dl-horizontal dd { - margin-left: 180px; -} - -.dl-horizontal dd:before, -.dl-horizontal dd:after { - display: table; - content: " "; -} - -.dl-horizontal dd:after { - clear: both; -} - -.dl-horizontal dd:before, -.dl-horizontal dd:after { - display: table; - content: " "; -} - -.dl-horizontal dd:after { - clear: both; -} - -abbr[title], -abbr[data-original-title] { - cursor: help; - border-bottom: 1px dotted #999999; -} - -abbr.initialism { - font-size: 90%; - text-transform: uppercase; -} - -blockquote { - padding: 10px 20px; - margin: 0 0 20px; - border-left: 5px solid #eeeeee; -} - -blockquote p { - font-size: 17.5px; - font-weight: 300; - line-height: 1.25; -} - -blockquote p:last-child { - margin-bottom: 0; -} - -blockquote small { - display: block; - line-height: 1.428571429; - color: #999999; -} - -blockquote small:before { - content: '\2014 \00A0'; -} - -blockquote.pull-right { - float: right; - padding-right: 15px; - padding-left: 0; - border-right: 5px solid #eeeeee; - border-left: 0; -} - -blockquote.pull-right p, -blockquote.pull-right small { - text-align: right; -} - -blockquote.pull-right small:before { - content: ''; -} - -blockquote.pull-right small:after { - content: '\00A0 \2014'; -} - -q:before, -q:after, -blockquote:before, -blockquote:after { - content: ""; -} - -address { - display: block; - margin-bottom: 20px; - font-style: normal; - line-height: 1.428571429; -} - -code, -pre { - font-family: Monaco, Menlo, Consolas, "Courier New", monospace; -} - -code { - padding: 2px 4px; - font-size: 90%; - color: #c7254e; - white-space: nowrap; - background-color: #f9f2f4; - border-radius: 4px; -} - -pre { - display: block; - padding: 9.5px; - margin: 0 0 10px; - font-size: 13px; - line-height: 1.428571429; - color: #333333; - word-break: break-all; - word-wrap: break-word; - background-color: #f5f5f5; - border: 1px solid #cccccc; - border-radius: 4px; -} - -pre.prettyprint { - margin-bottom: 20px; -} - -pre code { - padding: 0; - color: inherit; - white-space: pre-wrap; - background-color: transparent; - border: 0; -} - -.pre-scrollable { - max-height: 340px; - overflow-y: scroll; -} - -.container { - margin-right: auto; - margin-left: auto; -} - -.container:before, -.container:after { - display: table; - content: " "; -} - -.container:after { - clear: both; -} - -.container:before, -.container:after { - display: table; - content: " "; -} - -.container:after { - clear: both; -} - -.row:before, -.row:after { - display: table; - content: " "; -} - -.row:after { - clear: both; -} - -.row:before, -.row:after { - display: table; - content: " "; -} - -.row:after { - clear: both; -} - -@media (min-width: 768px) { - .row { - margin-right: -15px; - margin-left: -15px; - } -} - -.row .row { - margin-right: -15px; - margin-left: -15px; -} - -.col-1, -.col-2, -.col-3, -.col-4, -.col-5, -.col-6, -.col-7, -.col-8, -.col-9, -.col-10, -.col-11, -.col-12, -.col-sm-1, -.col-sm-2, -.col-sm-3, -.col-sm-4, -.col-sm-5, -.col-sm-6, -.col-sm-7, -.col-sm-8, -.col-sm-9, -.col-sm-10, -.col-sm-11, -.col-sm-12, -.col-lg-1, -.col-lg-2, -.col-lg-3, -.col-lg-4, -.col-lg-5, -.col-lg-6, -.col-lg-7, -.col-lg-8, -.col-lg-9, -.col-lg-10, -.col-lg-11, -.col-lg-12 { - position: relative; - min-height: 1px; - padding-right: 15px; - padding-left: 15px; -} - -.col-1, -.col-2, -.col-3, -.col-4, -.col-5, -.col-6, -.col-7, -.col-8, -.col-9, -.col-10, -.col-11, -.col-12 { - float: left; -} - -.col-1 { - width: 8.333333333333332%; -} - -.col-2 { - width: 16.666666666666664%; -} - -.col-3 { - width: 25%; -} - -.col-4 { - width: 33.33333333333333%; -} - -.col-5 { - width: 41.66666666666667%; -} - -.col-6 { - width: 50%; -} - -.col-7 { - width: 58.333333333333336%; -} - -.col-8 { - width: 66.66666666666666%; -} - -.col-9 { - width: 75%; -} - -.col-10 { - width: 83.33333333333334%; -} - -.col-11 { - width: 91.66666666666666%; -} - -.col-12 { - width: 100%; -} - -@media (min-width: 768px) { - .container { - max-width: 728px; - } - .col-sm-1, - .col-sm-2, - .col-sm-3, - .col-sm-4, - .col-sm-5, - .col-sm-6, - .col-sm-7, - .col-sm-8, - .col-sm-9, - .col-sm-10, - .col-sm-11, - .col-sm-12 { - float: left; - } - .col-sm-1 { - width: 8.333333333333332%; - } - .col-sm-2 { - width: 16.666666666666664%; - } - .col-sm-3 { - width: 25%; - } - .col-sm-4 { - width: 33.33333333333333%; - } - .col-sm-5 { - width: 41.66666666666667%; - } - .col-sm-6 { - width: 50%; - } - .col-sm-7 { - width: 58.333333333333336%; - } - .col-sm-8 { - width: 66.66666666666666%; - } - .col-sm-9 { - width: 75%; - } - .col-sm-10 { - width: 83.33333333333334%; - } - .col-sm-11 { - width: 91.66666666666666%; - } - .col-sm-12 { - width: 100%; - } - .col-push-1 { - left: 8.333333333333332%; - } - .col-push-2 { - left: 16.666666666666664%; - } - .col-push-3 { - left: 25%; - } - .col-push-4 { - left: 33.33333333333333%; - } - .col-push-5 { - left: 41.66666666666667%; - } - .col-push-6 { - left: 50%; - } - .col-push-7 { - left: 58.333333333333336%; - } - .col-push-8 { - left: 66.66666666666666%; - } - .col-push-9 { - left: 75%; - } - .col-push-10 { - left: 83.33333333333334%; - } - .col-push-11 { - left: 91.66666666666666%; - } - .col-pull-1 { - right: 8.333333333333332%; - } - .col-pull-2 { - right: 16.666666666666664%; - } - .col-pull-3 { - right: 25%; - } - .col-pull-4 { - right: 33.33333333333333%; - } - .col-pull-5 { - right: 41.66666666666667%; - } - .col-pull-6 { - right: 50%; - } - .col-pull-7 { - right: 58.333333333333336%; - } - .col-pull-8 { - right: 66.66666666666666%; - } - .col-pull-9 { - right: 75%; - } - .col-pull-10 { - right: 83.33333333333334%; - } - .col-pull-11 { - right: 91.66666666666666%; - } -} - -@media (min-width: 992px) { - .container { - max-width: 940px; - } - .col-lg-1, - .col-lg-2, - .col-lg-3, - .col-lg-4, - .col-lg-5, - .col-lg-6, - .col-lg-7, - .col-lg-8, - .col-lg-9, - .col-lg-10, - .col-lg-11, - .col-lg-12 { - float: left; - } - .col-lg-1 { - width: 8.333333333333332%; - } - .col-lg-2 { - width: 16.666666666666664%; - } - .col-lg-3 { - width: 25%; - } - .col-lg-4 { - width: 33.33333333333333%; - } - .col-lg-5 { - width: 41.66666666666667%; - } - .col-lg-6 { - width: 50%; - } - .col-lg-7 { - width: 58.333333333333336%; - } - .col-lg-8 { - width: 66.66666666666666%; - } - .col-lg-9 { - width: 75%; - } - .col-lg-10 { - width: 83.33333333333334%; - } - .col-lg-11 { - width: 91.66666666666666%; - } - .col-lg-12 { - width: 100%; - } - .col-offset-1 { - margin-left: 8.333333333333332%; - } - .col-offset-2 { - margin-left: 16.666666666666664%; - } - .col-offset-3 { - margin-left: 25%; - } - .col-offset-4 { - margin-left: 33.33333333333333%; - } - .col-offset-5 { - margin-left: 41.66666666666667%; - } - .col-offset-6 { - margin-left: 50%; - } - .col-offset-7 { - margin-left: 58.333333333333336%; - } - .col-offset-8 { - margin-left: 66.66666666666666%; - } - .col-offset-9 { - margin-left: 75%; - } - .col-offset-10 { - margin-left: 83.33333333333334%; - } - .col-offset-11 { - margin-left: 91.66666666666666%; - } -} - -@media (min-width: 1200px) { - .container { - max-width: 1170px; - } -} - -table { - max-width: 100%; - background-color: transparent; -} - -th { - text-align: left; -} - -.table { - width: 100%; - margin-bottom: 20px; -} - -.table thead > tr > th, -.table tbody > tr > th, -.table tfoot > tr > th, -.table thead > tr > td, -.table tbody > tr > td, -.table tfoot > tr > td { - padding: 8px; - line-height: 1.428571429; - vertical-align: top; - border-top: 1px solid #dddddd; -} - -.table thead > tr > th { - vertical-align: bottom; -} - -.table caption + thead tr:first-child th, -.table colgroup + thead tr:first-child th, -.table thead:first-child tr:first-child th, -.table caption + thead tr:first-child td, -.table colgroup + thead tr:first-child td, -.table thead:first-child tr:first-child td { - border-top: 0; -} - -.table tbody + tbody { - border-top: 2px solid #dddddd; -} - -.table .table { - background-color: #ffffff; -} - -.table-condensed thead > tr > th, -.table-condensed tbody > tr > th, -.table-condensed tfoot > tr > th, -.table-condensed thead > tr > td, -.table-condensed tbody > tr > td, -.table-condensed tfoot > tr > td { - padding: 5px; -} - -.table-bordered { - border: 1px solid #dddddd; -} - -.table-bordered > thead > tr > th, -.table-bordered > tbody > tr > th, -.table-bordered > tfoot > tr > th, -.table-bordered > thead > tr > td, -.table-bordered > tbody > tr > td, -.table-bordered > tfoot > tr > td { - border: 1px solid #dddddd; -} - -.table-striped > tbody > tr:nth-child(odd) > td, -.table-striped > tbody > tr:nth-child(odd) > th { - background-color: #f9f9f9; -} - -.table-hover > tbody > tr:hover > td, -.table-hover > tbody > tr:hover > th { - background-color: #f5f5f5; -} - -table col[class^="col-"] { - display: table-column; - float: none; -} - -table td[class^="col-"], -table th[class^="col-"] { - display: table-cell; - float: none; -} - -.table > thead > tr > td.active, -.table > tbody > tr > td.active, -.table > tfoot > tr > td.active, -.table > thead > tr > th.active, -.table > tbody > tr > th.active, -.table > tfoot > tr > th.active, -.table > thead > tr.active > td, -.table > tbody > tr.active > td, -.table > tfoot > tr.active > td, -.table > thead > tr.active > th, -.table > tbody > tr.active > th, -.table > tfoot > tr.active > th { - background-color: #f5f5f5; -} - -.table > thead > tr > td.success, -.table > tbody > tr > td.success, -.table > tfoot > tr > td.success, -.table > thead > tr > th.success, -.table > tbody > tr > th.success, -.table > tfoot > tr > th.success, -.table > thead > tr.success > td, -.table > tbody > tr.success > td, -.table > tfoot > tr.success > td, -.table > thead > tr.success > th, -.table > tbody > tr.success > th, -.table > tfoot > tr.success > th { - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.table > thead > tr > td.danger, -.table > tbody > tr > td.danger, -.table > tfoot > tr > td.danger, -.table > thead > tr > th.danger, -.table > tbody > tr > th.danger, -.table > tfoot > tr > th.danger, -.table > thead > tr.danger > td, -.table > tbody > tr.danger > td, -.table > tfoot > tr.danger > td, -.table > thead > tr.danger > th, -.table > tbody > tr.danger > th, -.table > tfoot > tr.danger > th { - background-color: #f2dede; - border-color: #eed3d7; -} - -.table > thead > tr > td.warning, -.table > tbody > tr > td.warning, -.table > tfoot > tr > td.warning, -.table > thead > tr > th.warning, -.table > tbody > tr > th.warning, -.table > tfoot > tr > th.warning, -.table > thead > tr.warning > td, -.table > tbody > tr.warning > td, -.table > tfoot > tr.warning > td, -.table > thead > tr.warning > th, -.table > tbody > tr.warning > th, -.table > tfoot > tr.warning > th { - background-color: #fcf8e3; - border-color: #fbeed5; -} - -.table-hover > tbody > tr > td.success:hover, -.table-hover > tbody > tr > th.success:hover, -.table-hover > tbody > tr.success:hover > td { - background-color: #d0e9c6; - border-color: #c9e2b3; -} - -.table-hover > tbody > tr > td.danger:hover, -.table-hover > tbody > tr > th.danger:hover, -.table-hover > tbody > tr.danger:hover > td { - background-color: #ebcccc; - border-color: #e6c1c7; -} - -.table-hover > tbody > tr > td.warning:hover, -.table-hover > tbody > tr > th.warning:hover, -.table-hover > tbody > tr.warning:hover > td { - background-color: #faf2cc; - border-color: #f8e5be; -} - -fieldset { - padding: 0; - margin: 0; - border: 0; -} - -legend { - display: block; - width: 100%; - padding: 0; - margin-bottom: 20px; - font-size: 21px; - line-height: inherit; - color: #333333; - border: 0; - border-bottom: 1px solid #e5e5e5; -} - -label { - display: inline-block; - margin-bottom: 5px; - font-weight: bold; -} - -input[type="search"] { - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -input[type="radio"], -input[type="checkbox"] { - margin: 4px 0 0; - margin-top: 1px \9; - /* IE8-9 */ - - line-height: normal; -} - -input[type="file"] { - display: block; -} - -select[multiple], -select[size] { - height: auto; -} - -select optgroup { - font-family: inherit; - font-size: inherit; - font-style: inherit; -} - -input[type="file"]:focus, -input[type="radio"]:focus, -input[type="checkbox"]:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -input[type="number"]::-webkit-outer-spin-button, -input[type="number"]::-webkit-inner-spin-button { - height: auto; -} - -.form-control:-moz-placeholder { - color: #999999; -} - -.form-control::-moz-placeholder { - color: #999999; -} - -.form-control:-ms-input-placeholder { - color: #999999; -} - -.form-control::-webkit-input-placeholder { - color: #999999; -} - -.form-control { - display: block; - width: 100%; - height: 38px; - padding: 8px 12px; - font-size: 14px; - line-height: 1.428571429; - color: #555555; - vertical-align: middle; - background-color: #ffffff; - border: 1px solid #cccccc; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - -webkit-transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; - transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s; -} - -.form-control:focus { - border-color: rgba(82, 168, 236, 0.8); - outline: 0; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); -} - -.form-control[disabled], -.form-control[readonly], -fieldset[disabled] .form-control { - cursor: not-allowed; - background-color: #eeeeee; -} - -textarea.form-control { - height: auto; -} - -.form-group { - margin-bottom: 15px; -} - -.radio, -.checkbox { - display: block; - min-height: 20px; - padding-left: 20px; - margin-top: 10px; - margin-bottom: 10px; - vertical-align: middle; -} - -.radio label, -.checkbox label { - display: inline; - margin-bottom: 0; - font-weight: normal; - cursor: pointer; -} - -.radio input[type="radio"], -.radio-inline input[type="radio"], -.checkbox input[type="checkbox"], -.checkbox-inline input[type="checkbox"] { - float: left; - margin-left: -20px; -} - -.radio + .radio, -.checkbox + .checkbox { - margin-top: -5px; -} - -.radio-inline, -.checkbox-inline { - display: inline-block; - padding-left: 20px; - margin-bottom: 0; - font-weight: normal; - vertical-align: middle; - cursor: pointer; -} - -.radio-inline + .radio-inline, -.checkbox-inline + .checkbox-inline { - margin-top: 0; - margin-left: 10px; -} - -.input-large { - height: 56px; - padding: 14px 16px; - font-size: 18px; - border-radius: 6px; -} - -.input-small { - height: 30px; - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} - -select.input-large { - height: 56px; - line-height: 56px; -} - -select.input-small { - height: 30px; - line-height: 30px; -} - -textarea.input-large, -textarea.input-small { - height: auto; -} - -.has-warning .help-block, -.has-warning .control-label { - color: #c09853; -} - -.has-warning .form-control { - padding-right: 32px; - border-color: #c09853; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-warning .form-control:focus { - border-color: #a47e3c; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; -} - -.has-warning .input-group-addon { - color: #c09853; - background-color: #fcf8e3; - border-color: #c09853; -} - -.has-error .help-block, -.has-error .control-label { - color: #b94a48; -} - -.has-error .form-control { - padding-right: 32px; - border-color: #b94a48; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-error .form-control:focus { - border-color: #953b39; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; -} - -.has-error .input-group-addon { - color: #b94a48; - background-color: #f2dede; - border-color: #b94a48; -} - -.has-success .help-block, -.has-success .control-label { - color: #468847; -} - -.has-success .form-control { - padding-right: 32px; - border-color: #468847; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -} - -.has-success .form-control:focus { - border-color: #356635; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; -} - -.has-success .input-group-addon { - color: #468847; - background-color: #dff0d8; - border-color: #468847; -} - -.help-block { - display: block; - margin-top: 5px; - margin-bottom: 10px; - color: #737373; -} - -.btn { - display: inline-block; - padding: 8px 12px; - margin-bottom: 0; - font-size: 14px; - font-weight: 500; - line-height: 1.428571429; - text-align: center; - white-space: nowrap; - vertical-align: middle; - cursor: pointer; - border: 1px solid transparent; - border-radius: 4px; - -webkit-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - -o-user-select: none; - user-select: none; -} - -.btn:focus { - outline: thin dotted #333; - outline: 5px auto -webkit-focus-ring-color; - outline-offset: -2px; -} - -.btn:hover, -.btn:focus { - color: #ffffff; - text-decoration: none; -} - -.btn:active, -.btn.active { - outline: 0; - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.btn.disabled, -.btn[disabled], -fieldset[disabled] .btn { - pointer-events: none; - cursor: default; - opacity: 0.65; - filter: alpha(opacity=65); - -webkit-box-shadow: none; - box-shadow: none; -} - -.btn-default { - color: #ffffff; - background-color: #474949; - border-color: #474949; -} - -.btn-default:hover, -.btn-default:focus, -.btn-default:active, -.btn-default.active { - background-color: #3a3c3c; - border-color: #2e2f2f; -} - -.btn-default.disabled, -.btn-default[disabled], -fieldset[disabled] .btn-default, -.btn-default.disabled:hover, -.btn-default[disabled]:hover, -fieldset[disabled] .btn-default:hover, -.btn-default.disabled:focus, -.btn-default[disabled]:focus, -fieldset[disabled] .btn-default:focus, -.btn-default.disabled:active, -.btn-default[disabled]:active, -fieldset[disabled] .btn-default:active, -.btn-default.disabled.active, -.btn-default[disabled].active, -fieldset[disabled] .btn-default.active { - background-color: #474949; - border-color: #474949; -} - -.btn-primary { - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -.btn-primary:hover, -.btn-primary:focus, -.btn-primary:active, -.btn-primary.active { - background-color: #357ebd; - border-color: #3071a9; -} - -.btn-primary.disabled, -.btn-primary[disabled], -fieldset[disabled] .btn-primary, -.btn-primary.disabled:hover, -.btn-primary[disabled]:hover, -fieldset[disabled] .btn-primary:hover, -.btn-primary.disabled:focus, -.btn-primary[disabled]:focus, -fieldset[disabled] .btn-primary:focus, -.btn-primary.disabled:active, -.btn-primary[disabled]:active, -fieldset[disabled] .btn-primary:active, -.btn-primary.disabled.active, -.btn-primary[disabled].active, -fieldset[disabled] .btn-primary.active { - background-color: #428bca; - border-color: #428bca; -} - -.btn-warning { - color: #ffffff; - background-color: #f0ad4e; - border-color: #f0ad4e; -} - -.btn-warning:hover, -.btn-warning:focus, -.btn-warning:active, -.btn-warning.active { - background-color: #eea236; - border-color: #ec971f; -} - -.btn-warning.disabled, -.btn-warning[disabled], -fieldset[disabled] .btn-warning, -.btn-warning.disabled:hover, -.btn-warning[disabled]:hover, -fieldset[disabled] .btn-warning:hover, -.btn-warning.disabled:focus, -.btn-warning[disabled]:focus, -fieldset[disabled] .btn-warning:focus, -.btn-warning.disabled:active, -.btn-warning[disabled]:active, -fieldset[disabled] .btn-warning:active, -.btn-warning.disabled.active, -.btn-warning[disabled].active, -fieldset[disabled] .btn-warning.active { - background-color: #f0ad4e; - border-color: #f0ad4e; -} - -.btn-danger { - color: #ffffff; - background-color: #d9534f; - border-color: #d9534f; -} - -.btn-danger:hover, -.btn-danger:focus, -.btn-danger:active, -.btn-danger.active { - background-color: #d43f3a; - border-color: #c9302c; -} - -.btn-danger.disabled, -.btn-danger[disabled], -fieldset[disabled] .btn-danger, -.btn-danger.disabled:hover, -.btn-danger[disabled]:hover, -fieldset[disabled] .btn-danger:hover, -.btn-danger.disabled:focus, -.btn-danger[disabled]:focus, -fieldset[disabled] .btn-danger:focus, -.btn-danger.disabled:active, -.btn-danger[disabled]:active, -fieldset[disabled] .btn-danger:active, -.btn-danger.disabled.active, -.btn-danger[disabled].active, -fieldset[disabled] .btn-danger.active { - background-color: #d9534f; - border-color: #d9534f; -} - -.btn-success { - color: #ffffff; - background-color: #5cb85c; - border-color: #5cb85c; -} - -.btn-success:hover, -.btn-success:focus, -.btn-success:active, -.btn-success.active { - background-color: #4cae4c; - border-color: #449d44; -} - -.btn-success.disabled, -.btn-success[disabled], -fieldset[disabled] .btn-success, -.btn-success.disabled:hover, -.btn-success[disabled]:hover, -fieldset[disabled] .btn-success:hover, -.btn-success.disabled:focus, -.btn-success[disabled]:focus, -fieldset[disabled] .btn-success:focus, -.btn-success.disabled:active, -.btn-success[disabled]:active, -fieldset[disabled] .btn-success:active, -.btn-success.disabled.active, -.btn-success[disabled].active, -fieldset[disabled] .btn-success.active { - background-color: #5cb85c; - border-color: #5cb85c; -} - -.btn-info { - color: #ffffff; - background-color: #5bc0de; - border-color: #5bc0de; -} - -.btn-info:hover, -.btn-info:focus, -.btn-info:active, -.btn-info.active { - background-color: #46b8da; - border-color: #31b0d5; -} - -.btn-info.disabled, -.btn-info[disabled], -fieldset[disabled] .btn-info, -.btn-info.disabled:hover, -.btn-info[disabled]:hover, -fieldset[disabled] .btn-info:hover, -.btn-info.disabled:focus, -.btn-info[disabled]:focus, -fieldset[disabled] .btn-info:focus, -.btn-info.disabled:active, -.btn-info[disabled]:active, -fieldset[disabled] .btn-info:active, -.btn-info.disabled.active, -.btn-info[disabled].active, -fieldset[disabled] .btn-info.active { - background-color: #5bc0de; - border-color: #5bc0de; -} - -.btn-link { - font-weight: normal; - color: #428bca; - cursor: pointer; - border-radius: 0; -} - -.btn-link, -.btn-link:active, -.btn-link[disabled], -fieldset[disabled] .btn-link { - background-color: transparent; - -webkit-box-shadow: none; - box-shadow: none; -} - -.btn-link, -.btn-link:hover, -.btn-link:focus, -.btn-link:active { - border-color: transparent; -} - -.btn-link:hover, -.btn-link:focus { - color: #2a6496; - text-decoration: underline; - background-color: transparent; -} - -.btn-link[disabled]:hover, -fieldset[disabled] .btn-link:hover, -.btn-link[disabled]:focus, -fieldset[disabled] .btn-link:focus { - color: #333333; - text-decoration: none; -} - -.btn-large { - padding: 14px 16px; - font-size: 18px; - border-radius: 6px; -} - -.btn-small, -.btn-mini { - padding: 5px 10px; - font-size: 12px; - line-height: 1.5; - border-radius: 3px; -} - -.btn-mini { - padding: 3px 5px; -} - -.btn-block { - display: block; - width: 100%; - padding-right: 0; - padding-left: 0; -} - -.btn-block + .btn-block { - margin-top: 5px; -} - -input[type="submit"].btn-block, -input[type="reset"].btn-block, -input[type="button"].btn-block { - width: 100%; -} - -.fade { - opacity: 0; - -webkit-transition: opacity 0.15s linear; - transition: opacity 0.15s linear; -} - -.fade.in { - opacity: 1; -} - -.collapse { - display: none; -} - -.collapse.in { - display: block; -} - -.collapsing { - position: relative; - height: 0; - overflow: hidden; - -webkit-transition: height 0.35s ease; - transition: height 0.35s ease; -} - -.input-group { - display: table; - border-collapse: separate; -} - -.input-group.col { - float: none; - padding-right: 0; - padding-left: 0; -} - -.input-group .form-control { - width: 100%; - margin-bottom: 0; -} - -.input-group-addon, -.input-group-btn, -.input-group .form-control { - display: table-cell; -} - -.input-group-addon:not(:first-child):not(:last-child), -.input-group-btn:not(:first-child):not(:last-child), -.input-group .form-control:not(:first-child):not(:last-child) { - border-radius: 0; -} - -.input-group-addon, -.input-group-btn { - width: 1%; - white-space: nowrap; - vertical-align: middle; -} - -.input-group-addon { - padding: 8px 12px; - font-size: 14px; - font-weight: normal; - line-height: 1.428571429; - text-align: center; - background-color: #eeeeee; - border: 1px solid #cccccc; - border-radius: 4px; - -webkit-box-sizing: border-box; - -moz-box-sizing: border-box; - box-sizing: border-box; -} - -.input-group-addon.input-small { - padding: 5px 10px; - font-size: 12px; - border-radius: 3px; -} - -.input-group-addon.input-large { - padding: 14px 16px; - font-size: 18px; - border-radius: 6px; -} - -.input-group-addon input[type="radio"], -.input-group-addon input[type="checkbox"] { - margin-top: 0; -} - -.input-group .form-control:first-child, -.input-group-addon:first-child, -.input-group-btn:first-child > .btn, -.input-group-btn:first-child > .dropdown-toggle, -.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.input-group-addon:first-child { - border-right: 0; -} - -.input-group .form-control:last-child, -.input-group-addon:last-child, -.input-group-btn:last-child > .btn, -.input-group-btn:last-child > .dropdown-toggle, -.input-group-btn:first-child > .btn:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.input-group-addon:last-child { - border-left: 0; -} - -.input-group-btn { - position: relative; - white-space: nowrap; -} - -.input-group-btn > .btn { - position: relative; -} - -.input-group-btn > .btn + .btn { - margin-left: -4px; -} - -.input-group-btn > .btn:hover, -.input-group-btn > .btn:active { - z-index: 2; -} - -.form-inline .form-control, -.form-inline .radio, -.form-inline .checkbox { - display: inline-block; -} - -.form-inline .radio, -.form-inline .checkbox { - margin-top: 0; - margin-bottom: 0; -} - -.form-horizontal .control-label { - padding-top: 9px; -} - -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - display: table; - content: " "; -} - -.form-horizontal .form-group:after { - clear: both; -} - -.form-horizontal .form-group:before, -.form-horizontal .form-group:after { - display: table; - content: " "; -} - -.form-horizontal .form-group:after { - clear: both; -} - -@media (min-width: 768px) { - .form-horizontal .form-group { - margin-right: -15px; - margin-left: -15px; - } -} - -.form-horizontal .form-group .row { - margin-right: -15px; - margin-left: -15px; -} - -@media (min-width: 768px) { - .form-horizontal .control-label { - text-align: right; - } -} - -.caret { - display: inline-block; - width: 0; - height: 0; - margin-left: 2px; - vertical-align: middle; - border-top: 4px solid #000000; - border-right: 4px solid transparent; - border-left: 4px solid transparent; - content: ""; -} - -.dropdown-menu { - position: absolute; - top: 100%; - left: 0; - z-index: 1000; - display: none; - float: left; - min-width: 160px; - padding: 5px 0; - margin: 2px 0 0; - list-style: none; - background-color: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.15); - border-radius: 4px; - -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175); - background-clip: padding-box; -} - -.dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.dropdown-menu .divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} - -.dropdown-menu > li > a { - display: block; - padding: 3px 20px; - clear: both; - font-weight: normal; - line-height: 1.428571429; - color: #333333; - white-space: nowrap; -} - -.dropdown-menu > li > a:hover, -.dropdown-menu > li > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #357ebd; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd)); - background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%); - background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); -} - -.dropdown-menu > .active > a, -.dropdown-menu > .active > a:hover, -.dropdown-menu > .active > a:focus { - color: #ffffff; - text-decoration: none; - background-color: #357ebd; - background-image: -webkit-gradient(linear, left 0%, left 100%, from(#428bca), to(#357ebd)); - background-image: -webkit-linear-gradient(top, #428bca, 0%, #357ebd, 100%); - background-image: -moz-linear-gradient(top, #428bca 0%, #357ebd 100%); - background-image: linear-gradient(to bottom, #428bca 0%, #357ebd 100%); - background-repeat: repeat-x; - outline: 0; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca', endColorstr='#ff357ebd', GradientType=0); -} - -.dropdown-menu > .disabled > a, -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - color: #999999; -} - -.dropdown-menu > .disabled > a:hover, -.dropdown-menu > .disabled > a:focus { - text-decoration: none; - cursor: not-allowed; - background-color: transparent; - background-image: none; - filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); -} - -.open > .dropdown-menu { - display: block; -} - -.open > a { - outline: 0; -} - -.dropdown-header { - display: block; - padding: 3px 20px; - font-size: 12px; - line-height: 1.428571429; - color: #999999; -} - -.dropdown-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 990; -} - -.pull-right > .dropdown-menu { - right: 0; - left: auto; -} - -.dropup .caret, -.navbar-fixed-bottom .dropdown .caret { - border-top: 0; - border-bottom: 4px solid #000000; - content: ""; -} - -.dropup .dropdown-menu, -.navbar-fixed-bottom .dropdown .dropdown-menu { - top: auto; - bottom: 100%; - margin-bottom: 1px; -} - -.list-group { - padding-left: 0; - margin-bottom: 20px; -} - -.list-group-item { - position: relative; - display: block; - padding: 10px 30px 10px 15px; - margin-bottom: -1px; - background-color: #ffffff; - border: 1px solid #dddddd; -} - -.list-group-item:first-child { - border-top-right-radius: 4px; - border-top-left-radius: 4px; -} - -.list-group-item:last-child { - margin-bottom: 0; - border-bottom-right-radius: 4px; - border-bottom-left-radius: 4px; -} - -.list-group-item > .badge { - float: right; - margin-right: -15px; -} - -.list-group-item-heading { - margin-top: 0; - margin-bottom: 5px; -} - -.list-group-item-text { - margin-bottom: 0; - line-height: 1.3; -} - -a.list-group-item .list-group-item-heading { - color: #333333; -} - -a.list-group-item .list-group-item-text { - color: #555555; -} - -a.list-group-item:hover, -a.list-group-item:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -a.list-group-item.active { - z-index: 2; - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -a.list-group-item.active .list-group-item-heading { - color: inherit; -} - -a.list-group-item.active .list-group-item-text { - color: #e1edf7; -} - -.panel { - padding: 15px; - margin-bottom: 20px; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.panel-heading { - padding: 10px 15px; - margin: -15px -15px 15px; - background-color: #f5f5f5; - border-bottom: 1px solid #dddddd; - border-top-right-radius: 3px; - border-top-left-radius: 3px; -} - -.panel-title { - margin-top: 0; - margin-bottom: 0; - font-size: 17.5px; - font-weight: 500; -} - -.panel-footer { - padding: 10px 15px; - margin: 15px -15px -15px; - background-color: #f5f5f5; - border-top: 1px solid #dddddd; - border-bottom-right-radius: 3px; - border-bottom-left-radius: 3px; -} - -.panel-primary { - border-color: #428bca; -} - -.panel-primary .panel-heading { - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -.panel-success { - border-color: #d6e9c6; -} - -.panel-success .panel-heading { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.panel-warning { - border-color: #fbeed5; -} - -.panel-warning .panel-heading { - color: #c09853; - background-color: #fcf8e3; - border-color: #fbeed5; -} - -.panel-danger { - border-color: #eed3d7; -} - -.panel-danger .panel-heading { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.panel-info { - border-color: #bce8f1; -} - -.panel-info .panel-heading { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.list-group-flush { - margin: 15px -15px -15px; -} - -.list-group-flush .list-group-item { - border-width: 1px 0; -} - -.list-group-flush .list-group-item:first-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.list-group-flush .list-group-item:last-child { - border-bottom: 0; -} - -.well { - min-height: 20px; - padding: 19px; - margin-bottom: 20px; - background-color: #f5f5f5; - border: 1px solid #e3e3e3; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); -} - -.well blockquote { - border-color: #ddd; - border-color: rgba(0, 0, 0, 0.15); -} - -.well-large { - padding: 24px; - border-radius: 6px; -} - -.well-small { - padding: 9px; - border-radius: 3px; -} - -.close { - float: right; - font-size: 21px; - font-weight: bold; - line-height: 1; - color: #000000; - text-shadow: 0 1px 0 #ffffff; - opacity: 0.2; - filter: alpha(opacity=20); -} - -.close:hover, -.close:focus { - color: #000000; - text-decoration: none; - cursor: pointer; - opacity: 0.5; - filter: alpha(opacity=50); -} - -button.close { - padding: 0; - cursor: pointer; - background: transparent; - border: 0; - -webkit-appearance: none; -} - -.nav { - padding-left: 0; - margin-bottom: 0; - list-style: none; -} - -.nav:before, -.nav:after { - display: table; - content: " "; -} - -.nav:after { - clear: both; -} - -.nav:before, -.nav:after { - display: table; - content: " "; -} - -.nav:after { - clear: both; -} - -.nav > li { - position: relative; - display: block; -} - -.nav > li > a { - position: relative; - display: block; - padding: 10px 15px; -} - -.nav > li > a:hover, -.nav > li > a:focus { - text-decoration: none; - background-color: #eeeeee; -} - -.nav > li.disabled > a { - color: #999999; -} - -.nav > li.disabled > a:hover, -.nav > li.disabled > a:focus { - color: #999999; - text-decoration: none; - cursor: not-allowed; - background-color: transparent; -} - -.nav.open > a, -.nav.open > a:hover, -.nav.open > a:focus { - color: #ffffff; - background-color: #428bca; - border-color: #428bca; -} - -.nav.open > a .caret, -.nav.open > a:hover .caret, -.nav.open > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.nav > .pull-right { - float: right; -} - -.nav .nav-divider { - height: 1px; - margin: 9px 0; - overflow: hidden; - background-color: #e5e5e5; -} - -.nav-tabs { - border-bottom: 1px solid #dddddd; -} - -.nav-tabs > li { - float: left; - margin-bottom: -1px; -} - -.nav-tabs > li > a { - margin-right: 2px; - line-height: 1.428571429; - border: 1px solid transparent; - border-radius: 4px 4px 0 0; -} - -.nav-tabs > li > a:hover { - border-color: #eeeeee; -} - -.nav-tabs > li.active > a, -.nav-tabs > li.active > a:hover, -.nav-tabs > li.active > a:focus { - color: #555555; - cursor: default; - background-color: #ffffff; - border: 1px solid #dddddd; - border-bottom-color: transparent; -} - -.nav-tabs.nav-justified { - width: 100%; - border-bottom: 0; -} - -.nav-tabs.nav-justified > li { - display: table-cell; - float: none; - width: 1%; -} - -.nav-tabs.nav-justified > li > a { - text-align: center; -} - -.nav-tabs.nav-justified > li > a { - margin-right: 0; - border-bottom: 1px solid #dddddd; -} - -.nav-tabs.nav-justified > .active > a { - border-bottom-color: #ffffff; -} - -.nav-pills > li { - float: left; -} - -.nav-pills > li > a { - border-radius: 5px; -} - -.nav-pills > li + li { - margin-left: 2px; -} - -.nav-pills > li.active > a, -.nav-pills > li.active > a:hover, -.nav-pills > li.active > a:focus { - color: #ffffff; - background-color: #428bca; -} - -.nav-stacked > li { - float: none; -} - -.nav-stacked > li + li { - margin-top: 2px; - margin-left: 0; -} - -.nav-justified { - width: 100%; -} - -.nav-justified > li { - display: table-cell; - float: none; - width: 1%; -} - -.nav-justified > li > a { - text-align: center; -} - -.nav-tabs-justified { - border-bottom: 0; -} - -.nav-tabs-justified > li > a { - margin-right: 0; - border-bottom: 1px solid #dddddd; -} - -.nav-tabs-justified > .active > a { - border-bottom-color: #ffffff; -} - -.tabbable:before, -.tabbable:after { - display: table; - content: " "; -} - -.tabbable:after { - clear: both; -} - -.tabbable:before, -.tabbable:after { - display: table; - content: " "; -} - -.tabbable:after { - clear: both; -} - -.tab-content > .tab-pane, -.pill-content > .pill-pane { - display: none; -} - -.tab-content > .active, -.pill-content > .active { - display: block; -} - -.nav .caret { - border-top-color: #428bca; - border-bottom-color: #428bca; -} - -.nav a:hover .caret { - border-top-color: #2a6496; - border-bottom-color: #2a6496; -} - -.nav-tabs .dropdown-menu { - margin-top: -1px; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.navbar { - position: relative; - min-height: 50px; - padding-right: 15px; - padding-left: 15px; - margin-bottom: 20px; - background-color: #eeeeee; - border-radius: 4px; -} - -.navbar:before, -.navbar:after { - display: table; - content: " "; -} - -.navbar:after { - clear: both; -} - -.navbar:before, -.navbar:after { - display: table; - content: " "; -} - -.navbar:after { - clear: both; -} - -.navbar-nav { - margin-top: 10px; - margin-bottom: 15px; -} - -.navbar-nav > li > a { - padding-top: 15px; - padding-bottom: 15px; - line-height: 20px; - color: #777777; - border-radius: 4px; -} - -.navbar-nav > li > a:hover, -.navbar-nav > li > a:focus { - color: #333333; - background-color: transparent; -} - -.navbar-nav > .active > a, -.navbar-nav > .active > a:hover, -.navbar-nav > .active > a:focus { - color: #555555; - background-color: #d5d5d5; -} - -.navbar-nav > .disabled > a, -.navbar-nav > .disabled > a:hover, -.navbar-nav > .disabled > a:focus { - color: #cccccc; - background-color: transparent; -} - -.navbar-nav.pull-right { - width: 100%; -} - -.navbar-static-top { - border-radius: 0; -} - -.navbar-fixed-top, -.navbar-fixed-bottom { - position: fixed; - right: 0; - left: 0; - z-index: 1030; - border-radius: 0; -} - -.navbar-fixed-top { - top: 0; -} - -.navbar-fixed-bottom { - bottom: 0; - margin-bottom: 0; -} - -.navbar-brand { - display: block; - max-width: 200px; - padding: 15px 15px; - margin-right: auto; - margin-left: auto; - font-size: 18px; - font-weight: 500; - line-height: 20px; - color: #777777; - text-align: center; -} - -.navbar-brand:hover, -.navbar-brand:focus { - color: #5e5e5e; - text-decoration: none; - background-color: transparent; -} - -.navbar-toggle { - position: absolute; - top: 9px; - right: 10px; - width: 48px; - height: 32px; - padding: 8px 12px; - background-color: transparent; - border: 1px solid #dddddd; - border-radius: 4px; -} - -.navbar-toggle:hover, -.navbar-toggle:focus { - background-color: #dddddd; -} - -.navbar-toggle .icon-bar { - display: block; - width: 22px; - height: 2px; - background-color: #cccccc; - border-radius: 1px; -} - -.navbar-toggle .icon-bar + .icon-bar { - margin-top: 4px; -} - -.navbar-form { - margin-top: 6px; - margin-bottom: 6px; -} - -.navbar-form .form-control, -.navbar-form .radio, -.navbar-form .checkbox { - display: inline-block; -} - -.navbar-form .radio, -.navbar-form .checkbox { - margin-top: 0; - margin-bottom: 0; -} - -.navbar-nav > li > .dropdown-menu { - margin-top: 0; - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.navbar-nav > .dropdown > a:hover .caret, -.navbar-nav > .dropdown > a:focus .caret { - border-top-color: #333333; - border-bottom-color: #333333; -} - -.navbar-nav > .open > a, -.navbar-nav > .open > a:hover, -.navbar-nav > .open > a:focus { - color: #555555; - background-color: #d5d5d5; -} - -.navbar-nav > .open > a .caret, -.navbar-nav > .open > a:hover .caret, -.navbar-nav > .open > a:focus .caret { - border-top-color: #555555; - border-bottom-color: #555555; -} - -.navbar-nav > .dropdown > a .caret { - border-top-color: #777777; - border-bottom-color: #777777; -} - -.navbar-nav.pull-right > li > .dropdown-menu, -.navbar-nav > li > .dropdown-menu.pull-right { - right: 0; - left: auto; -} - -.navbar-inverse { - background-color: #222222; -} - -.navbar-inverse .navbar-brand { - color: #999999; -} - -.navbar-inverse .navbar-brand:hover, -.navbar-inverse .navbar-brand:focus { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .navbar-text { - color: #999999; -} - -.navbar-inverse .navbar-nav > li > a { - color: #999999; -} - -.navbar-inverse .navbar-nav > li > a:hover, -.navbar-inverse .navbar-nav > li > a:focus { - color: #ffffff; - background-color: transparent; -} - -.navbar-inverse .navbar-nav > .active > a, -.navbar-inverse .navbar-nav > .active > a:hover, -.navbar-inverse .navbar-nav > .active > a:focus { - color: #ffffff; - background-color: #080808; -} - -.navbar-inverse .navbar-nav > .disabled > a, -.navbar-inverse .navbar-nav > .disabled > a:hover, -.navbar-inverse .navbar-nav > .disabled > a:focus { - color: #444444; - background-color: transparent; -} - -.navbar-inverse .navbar-toggle { - border-color: #333333; -} - -.navbar-inverse .navbar-toggle:hover, -.navbar-inverse .navbar-toggle:focus { - background-color: #333333; -} - -.navbar-inverse .navbar-toggle .icon-bar { - background-color: #ffffff; -} - -.navbar-inverse .navbar-nav > .open > a, -.navbar-inverse .navbar-nav > .open > a:hover, -.navbar-inverse .navbar-nav > .open > a:focus { - color: #ffffff; - background-color: #080808; -} - -.navbar-inverse .navbar-nav > .dropdown > a:hover .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -.navbar-inverse .navbar-nav > .dropdown > a .caret { - border-top-color: #999999; - border-bottom-color: #999999; -} - -.navbar-inverse .navbar-nav > .open > a .caret, -.navbar-inverse .navbar-nav > .open > a:hover .caret, -.navbar-inverse .navbar-nav > .open > a:focus .caret { - border-top-color: #ffffff; - border-bottom-color: #ffffff; -} - -@media screen and (min-width: 768px) { - .navbar-brand { - float: left; - margin-right: 5px; - margin-left: -15px; - } - .navbar-nav { - float: left; - margin-top: 0; - margin-bottom: 0; - } - .navbar-nav > li { - float: left; - } - .navbar-nav > li > a { - border-radius: 0; - } - .navbar-nav.pull-right { - float: right; - width: auto; - } - .navbar-toggle { - position: relative; - top: auto; - left: auto; - display: none; - } - .nav-collapse.collapse { - display: block !important; - height: auto !important; - overflow: visible !important; - } -} - -.navbar-btn { - margin-top: 6px; -} - -.navbar-text { - margin-top: 15px; - margin-bottom: 15px; -} - -.navbar-link { - color: #777777; -} - -.navbar-link:hover { - color: #333333; -} - -.navbar-inverse .navbar-link { - color: #999999; -} - -.navbar-inverse .navbar-link:hover { - color: #ffffff; -} - -.btn .caret { - border-top-color: #ffffff; -} - -.dropup .btn .caret { - border-bottom-color: #ffffff; -} - -.btn-group, -.btn-group-vertical { - position: relative; - display: inline-block; - vertical-align: middle; -} - -.btn-group > .btn, -.btn-group-vertical > .btn { - position: relative; - float: left; -} - -.btn-group > .btn:hover, -.btn-group-vertical > .btn:hover, -.btn-group > .btn:focus, -.btn-group-vertical > .btn:focus, -.btn-group > .btn:active, -.btn-group-vertical > .btn:active { - z-index: 2; -} - -.btn-group .btn + .btn { - margin-left: -1px; -} - -.btn-toolbar:before, -.btn-toolbar:after { - display: table; - content: " "; -} - -.btn-toolbar:after { - clear: both; -} - -.btn-toolbar:before, -.btn-toolbar:after { - display: table; - content: " "; -} - -.btn-toolbar:after { - clear: both; -} - -.btn-toolbar .btn-group { - float: left; -} - -.btn-toolbar > .btn + .btn, -.btn-toolbar > .btn-group + .btn, -.btn-toolbar > .btn + .btn-group, -.btn-toolbar > .btn-group + .btn-group { - margin-left: 5px; -} - -.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) { - border-radius: 0; -} - -.btn-group > .btn:first-child { - margin-left: 0; -} - -.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.btn-group > .btn:last-child:not(:first-child), -.btn-group > .dropdown-toggle:not(:first-child) { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.btn-group > .btn-group { - float: left; -} - -.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn { - border-radius: 0; -} - -.btn-group > .btn-group:first-child > .btn:last-child, -.btn-group > .btn-group:first-child > .dropdown-toggle { - border-top-right-radius: 0; - border-bottom-right-radius: 0; -} - -.btn-group > .btn-group:last-child > .btn:first-child { - border-bottom-left-radius: 0; - border-top-left-radius: 0; -} - -.btn-group .dropdown-toggle:active, -.btn-group.open .dropdown-toggle { - outline: 0; -} - -.btn-group > .btn + .dropdown-toggle { - padding-right: 8px; - padding-left: 8px; -} - -.btn-group > .btn-large + .dropdown-toggle { - padding-right: 12px; - padding-left: 12px; -} - -.btn-group.open .dropdown-toggle { - -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); - box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125); -} - -.btn .caret { - margin-left: 0; -} - -.btn-large .caret { - border-width: 5px; -} - -.dropup .btn-large .caret { - border-bottom-width: 5px; -} - -.btn-group-vertical > .btn { - display: block; - float: none; - width: 100%; - max-width: 100%; -} - -.btn-group-vertical > .btn + .btn { - margin-top: -1px; -} - -.btn-group-vertical .btn:not(:first-child):not(:last-child) { - border-radius: 0; -} - -.btn-group-vertical .btn:first-child { - border-bottom-right-radius: 0; - border-bottom-left-radius: 0; -} - -.btn-group-vertical .btn:last-child { - border-top-right-radius: 0; - border-top-left-radius: 0; -} - -.btn-group-justified { - display: table; - width: 100%; -} - -.btn-group-justified .btn { - display: table-cell; - float: none; - width: 1%; -} - -.btn-group[data-toggle="buttons"] > .btn > input[type="radio"], -.btn-group[data-toggle="buttons"] > .btn > input[type="checkbox"] { - display: none; -} - -.breadcrumb { - padding: 8px 15px; - margin-bottom: 20px; - list-style: none; - background-color: #f5f5f5; - border-radius: 4px; -} - -.breadcrumb > li { - display: inline-block; -} - -.breadcrumb > li + li:before { - padding: 0 5px; - color: #cccccc; - content: "/\00a0"; -} - -.breadcrumb > .active { - color: #999999; -} - -.pagination { - display: inline-block; - padding-left: 0; - margin: 20px 0; - border-radius: 4px; -} - -.pagination > li { - display: inline; -} - -.pagination > li > a, -.pagination > li > span { - float: left; - padding: 4px 12px; - line-height: 1.428571429; - text-decoration: none; - background-color: #ffffff; - border: 1px solid #dddddd; - border-left-width: 0; -} - -.pagination > li:first-child > a, -.pagination > li:first-child > span { - border-left-width: 1px; - border-bottom-left-radius: 4px; - border-top-left-radius: 4px; -} - -.pagination > li:last-child > a, -.pagination > li:last-child > span { - border-top-right-radius: 4px; - border-bottom-right-radius: 4px; -} - -.pagination > li > a:hover, -.pagination > li > a:focus, -.pagination > .active > a, -.pagination > .active > span { - background-color: #f5f5f5; -} - -.pagination > .active > a, -.pagination > .active > span { - color: #999999; - cursor: default; -} - -.pagination > .disabled > span, -.pagination > .disabled > a, -.pagination > .disabled > a:hover, -.pagination > .disabled > a:focus { - color: #999999; - cursor: not-allowed; - background-color: #ffffff; -} - -.pagination-large > li > a, -.pagination-large > li > span { - padding: 14px 16px; - font-size: 18px; -} - -.pagination-large > li:first-child > a, -.pagination-large > li:first-child > span { - border-bottom-left-radius: 6px; - border-top-left-radius: 6px; -} - -.pagination-large > li:last-child > a, -.pagination-large > li:last-child > span { - border-top-right-radius: 6px; - border-bottom-right-radius: 6px; -} - -.pagination-small > li > a, -.pagination-small > li > span { - padding: 5px 10px; - font-size: 12px; -} - -.pagination-small > li:first-child > a, -.pagination-small > li:first-child > span { - border-bottom-left-radius: 3px; - border-top-left-radius: 3px; -} - -.pagination-small > li:last-child > a, -.pagination-small > li:last-child > span { - border-top-right-radius: 3px; - border-bottom-right-radius: 3px; -} - -.pager { - padding-left: 0; - margin: 20px 0; - text-align: center; - list-style: none; -} - -.pager:before, -.pager:after { - display: table; - content: " "; -} - -.pager:after { - clear: both; -} - -.pager:before, -.pager:after { - display: table; - content: " "; -} - -.pager:after { - clear: both; -} - -.pager li { - display: inline; -} - -.pager li > a, -.pager li > span { - display: inline-block; - padding: 5px 14px; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 15px; -} - -.pager li > a:hover, -.pager li > a:focus { - text-decoration: none; - background-color: #f5f5f5; -} - -.pager .next > a, -.pager .next > span { - float: right; -} - -.pager .previous > a, -.pager .previous > span { - float: left; -} - -.pager .disabled > a, -.pager .disabled > a:hover, -.pager .disabled > a:focus, -.pager .disabled > span { - color: #999999; - cursor: not-allowed; - background-color: #ffffff; -} - -.modal-open { - overflow: hidden; -} - -.modal { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1040; - display: none; - overflow: auto; - overflow-y: scroll; -} - -.modal.fade .modal-dialog { - -webkit-transform: translate(0, -25%); - -ms-transform: translate(0, -25%); - transform: translate(0, -25%); - -webkit-transition: -webkit-transform 0.3s ease-out; - -moz-transition: -moz-transform 0.3s ease-out; - -o-transition: -o-transform 0.3s ease-out; - transition: transform 0.3s ease-out; -} - -.modal.fade.in .modal-dialog { - -webkit-transform: translate(0, 0); - -ms-transform: translate(0, 0); - transform: translate(0, 0); -} - -.modal-dialog { - z-index: 1050; - width: auto; - padding: 10px; - margin-right: auto; - margin-left: auto; -} - -.modal-content { - position: relative; - background-color: #ffffff; - border: 1px solid #999999; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - outline: none; - -webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5); - background-clip: padding-box; -} - -.modal-backdrop { - position: fixed; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: 1030; - background-color: #000000; -} - -.modal-backdrop.fade { - opacity: 0; - filter: alpha(opacity=0); -} - -.modal-backdrop.fade.in { - opacity: 0.5; - filter: alpha(opacity=50); -} - -.modal-header { - min-height: 16.428571429px; - padding: 15px; - border-bottom: 1px solid #e5e5e5; -} - -.modal-header .close { - margin-top: -2px; -} - -.modal-title { - margin: 0; - line-height: 1.428571429; -} - -.modal-body { - position: relative; - padding: 20px; -} - -.modal-footer { - padding: 19px 20px 20px; - margin-top: 15px; - text-align: right; - border-top: 1px solid #e5e5e5; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer:before, -.modal-footer:after { - display: table; - content: " "; -} - -.modal-footer:after { - clear: both; -} - -.modal-footer .btn + .btn { - margin-bottom: 0; - margin-left: 5px; -} - -.modal-footer .btn-group .btn + .btn { - margin-left: -1px; -} - -.modal-footer .btn-block + .btn-block { - margin-left: 0; -} - -@media screen and (min-width: 768px) { - .modal-dialog { - right: auto; - left: 50%; - width: 600px; - padding-top: 30px; - padding-bottom: 30px; - } - .modal-content { - -webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); - } -} - -.tooltip { - position: absolute; - z-index: 1030; - display: block; - font-size: 12px; - line-height: 1.4; - opacity: 0; - filter: alpha(opacity=0); - visibility: visible; -} - -.tooltip.in { - opacity: 1; - filter: alpha(opacity=100); -} - -.tooltip.top { - padding: 5px 0; - margin-top: -3px; -} - -.tooltip.right { - padding: 0 5px; - margin-left: 3px; -} - -.tooltip.bottom { - padding: 5px 0; - margin-top: 3px; -} - -.tooltip.left { - padding: 0 5px; - margin-left: -3px; -} - -.tooltip-inner { - max-width: 200px; - padding: 3px 8px; - color: #ffffff; - text-align: center; - text-decoration: none; - background-color: rgba(0, 0, 0, 0.9); - border-radius: 4px; -} - -.tooltip-arrow { - position: absolute; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.tooltip.top .tooltip-arrow { - bottom: 0; - left: 50%; - margin-left: -5px; - border-top-color: rgba(0, 0, 0, 0.9); - border-width: 5px 5px 0; -} - -.tooltip.top-left .tooltip-arrow { - bottom: 0; - left: 5px; - border-top-color: rgba(0, 0, 0, 0.9); - border-width: 5px 5px 0; -} - -.tooltip.top-right .tooltip-arrow { - right: 5px; - bottom: 0; - border-top-color: rgba(0, 0, 0, 0.9); - border-width: 5px 5px 0; -} - -.tooltip.right .tooltip-arrow { - top: 50%; - left: 0; - margin-top: -5px; - border-right-color: rgba(0, 0, 0, 0.9); - border-width: 5px 5px 5px 0; -} - -.tooltip.left .tooltip-arrow { - top: 50%; - right: 0; - margin-top: -5px; - border-left-color: rgba(0, 0, 0, 0.9); - border-width: 5px 0 5px 5px; -} - -.tooltip.bottom .tooltip-arrow { - top: 0; - left: 50%; - margin-left: -5px; - border-bottom-color: rgba(0, 0, 0, 0.9); - border-width: 0 5px 5px; -} - -.tooltip.bottom-left .tooltip-arrow { - top: 0; - left: 5px; - border-bottom-color: rgba(0, 0, 0, 0.9); - border-width: 0 5px 5px; -} - -.tooltip.bottom-right .tooltip-arrow { - top: 0; - right: 5px; - border-bottom-color: rgba(0, 0, 0, 0.9); - border-width: 0 5px 5px; -} - -.popover { - position: absolute; - top: 0; - left: 0; - z-index: 1010; - display: none; - max-width: 276px; - padding: 1px; - text-align: left; - white-space: normal; - background-color: #ffffff; - border: 1px solid #cccccc; - border: 1px solid rgba(0, 0, 0, 0.2); - border-radius: 6px; - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); - background-clip: padding-box; - -webkit-bg-clip: padding-box; - -moz-bg-clip: padding; -} - -.popover.top { - margin-top: -10px; -} - -.popover.right { - margin-left: 10px; -} - -.popover.bottom { - margin-top: 10px; -} - -.popover.left { - margin-left: -10px; -} - -.popover-title { - padding: 8px 14px; - margin: 0; - font-size: 14px; - font-weight: normal; - line-height: 18px; - background-color: #f7f7f7; - border-bottom: 1px solid #ebebeb; - border-radius: 5px 5px 0 0; -} - -.popover-content { - padding: 9px 14px; -} - -.popover .arrow, -.popover .arrow:after { - position: absolute; - display: block; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; -} - -.popover .arrow { - border-width: 11px; -} - -.popover .arrow:after { - border-width: 10px; - content: ""; -} - -.popover.top .arrow { - bottom: -11px; - left: 50%; - margin-left: -11px; - border-top-color: #999999; - border-top-color: rgba(0, 0, 0, 0.25); - border-bottom-width: 0; -} - -.popover.top .arrow:after { - bottom: 1px; - margin-left: -10px; - border-top-color: #ffffff; - border-bottom-width: 0; - content: " "; -} - -.popover.right .arrow { - top: 50%; - left: -11px; - margin-top: -11px; - border-right-color: #999999; - border-right-color: rgba(0, 0, 0, 0.25); - border-left-width: 0; -} - -.popover.right .arrow:after { - bottom: -10px; - left: 1px; - border-right-color: #ffffff; - border-left-width: 0; - content: " "; -} - -.popover.bottom .arrow { - top: -11px; - left: 50%; - margin-left: -11px; - border-bottom-color: #999999; - border-bottom-color: rgba(0, 0, 0, 0.25); - border-top-width: 0; -} - -.popover.bottom .arrow:after { - top: 1px; - margin-left: -10px; - border-bottom-color: #ffffff; - border-top-width: 0; - content: " "; -} - -.popover.left .arrow { - top: 50%; - right: -11px; - margin-top: -11px; - border-left-color: #999999; - border-left-color: rgba(0, 0, 0, 0.25); - border-right-width: 0; -} - -.popover.left .arrow:after { - right: 1px; - bottom: -10px; - border-left-color: #ffffff; - border-right-width: 0; - content: " "; -} - -.alert { - padding: 10px 35px 10px 15px; - margin-bottom: 20px; - color: #c09853; - background-color: #fcf8e3; - border: 1px solid #fbeed5; - border-radius: 4px; -} - -.alert h4 { - margin-top: 0; - color: inherit; -} - -.alert hr { - border-top-color: #f8e5be; -} - -.alert .alert-link { - font-weight: 500; - color: #a47e3c; -} - -.alert .close { - position: relative; - top: -2px; - right: -21px; - color: inherit; -} - -.alert-success { - color: #468847; - background-color: #dff0d8; - border-color: #d6e9c6; -} - -.alert-success hr { - border-top-color: #c9e2b3; -} - -.alert-success .alert-link { - color: #356635; -} - -.alert-danger { - color: #b94a48; - background-color: #f2dede; - border-color: #eed3d7; -} - -.alert-danger hr { - border-top-color: #e6c1c7; -} - -.alert-danger .alert-link { - color: #953b39; -} - -.alert-info { - color: #3a87ad; - background-color: #d9edf7; - border-color: #bce8f1; -} - -.alert-info hr { - border-top-color: #a6e1ec; -} - -.alert-info .alert-link { - color: #2d6987; -} - -.alert-block { - padding-top: 15px; - padding-bottom: 15px; -} - -.alert-block > p, -.alert-block > ul { - margin-bottom: 0; -} - -.alert-block p + p { - margin-top: 5px; -} - -.thumbnail, -.img-thumbnail { - padding: 4px; - line-height: 1.428571429; - background-color: #ffffff; - border: 1px solid #dddddd; - border-radius: 4px; - -webkit-transition: all 0.2s ease-in-out; - transition: all 0.2s ease-in-out; -} - -.thumbnail { - display: block; -} - -.thumbnail > img, -.img-thumbnail { - display: inline-block; - height: auto; - max-width: 100%; -} - -a.thumbnail:hover, -a.thumbnail:focus { - border-color: #428bca; -} - -.thumbnail > img { - margin-right: auto; - margin-left: auto; -} - -.thumbnail .caption { - padding: 9px; - color: #333333; -} - -.media, -.media-body { - overflow: hidden; - zoom: 1; -} - -.media, -.media .media { - margin-top: 15px; -} - -.media:first-child { - margin-top: 0; -} - -.media-object { - display: block; -} - -.media-heading { - margin: 0 0 5px; -} - -.media > .pull-left { - margin-right: 10px; -} - -.media > .pull-right { - margin-left: 10px; -} - -.media-list { - padding-left: 0; - list-style: none; -} - -.label { - display: inline; - padding: .25em .6em; - font-size: 75%; - font-weight: 500; - line-height: 1; - color: #ffffff; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: #999999; - border-radius: .25em; -} - -.label[href]:hover, -.label[href]:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; - background-color: #808080; -} - -.label-danger { - background-color: #d9534f; -} - -.label-danger[href]:hover, -.label-danger[href]:focus { - background-color: #c9302c; -} - -.label-success { - background-color: #5cb85c; -} - -.label-success[href]:hover, -.label-success[href]:focus { - background-color: #449d44; -} - -.label-warning { - background-color: #f0ad4e; -} - -.label-warning[href]:hover, -.label-warning[href]:focus { - background-color: #ec971f; -} - -.label-info { - background-color: #5bc0de; -} - -.label-info[href]:hover, -.label-info[href]:focus { - background-color: #31b0d5; -} - -.badge { - display: inline-block; - min-width: 10px; - padding: 3px 7px; - font-size: 12px; - font-weight: bold; - line-height: 1; - color: #ffffff; - text-align: center; - white-space: nowrap; - vertical-align: middle; - background-color: #999999; - border-radius: 10px; -} - -.badge:empty { - display: none; -} - -a.badge:hover, -a.badge:focus { - color: #ffffff; - text-decoration: none; - cursor: pointer; -} - -.btn .badge { - position: relative; - top: -1px; -} - -a.list-group-item.active > .badge, -.nav-pills > .active > a > .badge { - color: #428bca; - background-color: #ffffff; -} - -.nav-pills > li > a > .badge { - margin-left: 3px; -} - -@-webkit-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-moz-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-ms-keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -@-o-keyframes progress-bar-stripes { - from { - background-position: 0 0; - } - to { - background-position: 40px 0; - } -} - -@keyframes progress-bar-stripes { - from { - background-position: 40px 0; - } - to { - background-position: 0 0; - } -} - -.progress { - height: 20px; - margin-bottom: 20px; - overflow: hidden; - background-color: #f5f5f5; - border-radius: 4px; - -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); - box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); -} - -.progress-bar { - float: left; - width: 0; - height: 100%; - font-size: 12px; - color: #ffffff; - text-align: center; - background-color: #428bca; - -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); - -webkit-transition: width 0.6s ease; - transition: width 0.6s ease; -} - -.progress-striped .progress-bar { - background-color: #428bca; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-size: 40px 40px; -} - -.progress.active .progress-bar { - -webkit-animation: progress-bar-stripes 2s linear infinite; - -moz-animation: progress-bar-stripes 2s linear infinite; - -ms-animation: progress-bar-stripes 2s linear infinite; - -o-animation: progress-bar-stripes 2s linear infinite; - animation: progress-bar-stripes 2s linear infinite; -} - -.progress-bar-danger { - background-color: #d9534f; -} - -.progress-striped .progress-bar-danger { - background-color: #d9534f; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-success { - background-color: #5cb85c; -} - -.progress-striped .progress-bar-success { - background-color: #5cb85c; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-warning { - background-color: #f0ad4e; -} - -.progress-striped .progress-bar-warning { - background-color: #f0ad4e; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.progress-bar-info { - background-color: #5bc0de; -} - -.progress-striped .progress-bar-info { - background-color: #5bc0de; - background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); - background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); - background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); -} - -.accordion { - margin-bottom: 20px; -} - -.accordion-group { - margin-bottom: 2px; - border: 1px solid #e5e5e5; - border-radius: 4px; -} - -.accordion-heading { - border-bottom: 0; -} - -.accordion-heading .accordion-toggle { - display: block; - padding: 8px 15px; - cursor: pointer; -} - -.accordion-inner { - padding: 9px 15px; - border-top: 1px solid #e5e5e5; -} - -.carousel { - position: relative; -} - -.carousel-inner { - position: relative; - width: 100%; - overflow: hidden; -} - -.carousel-inner > .item { - position: relative; - display: none; - -webkit-transition: 0.6s ease-in-out left; - transition: 0.6s ease-in-out left; -} - -.carousel-inner > .item > img, -.carousel-inner > .item > a > img { - display: inline-block; - height: auto; - max-width: 100%; - line-height: 1; -} - -.carousel-inner > .active, -.carousel-inner > .next, -.carousel-inner > .prev { - display: block; -} - -.carousel-inner > .active { - left: 0; -} - -.carousel-inner > .next, -.carousel-inner > .prev { - position: absolute; - top: 0; - width: 100%; -} - -.carousel-inner > .next { - left: 100%; -} - -.carousel-inner > .prev { - left: -100%; -} - -.carousel-inner > .next.left, -.carousel-inner > .prev.right { - left: 0; -} - -.carousel-inner > .active.left { - left: -100%; -} - -.carousel-inner > .active.right { - left: 100%; -} - -.carousel-control { - position: absolute; - top: 0; - bottom: 0; - left: 0; - width: 15%; - font-size: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); - opacity: 0.5; - filter: alpha(opacity=50); -} - -.carousel-control.left { - background-color: rgba(0, 0, 0, 0.0001); - background-color: transparent; - background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.5)), to(rgba(0, 0, 0, 0.0001))); - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.5) 0), color-stop(rgba(0, 0, 0, 0.0001) 100%)); - background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0, rgba(0, 0, 0, 0.0001) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1); -} - -.carousel-control.right { - right: 0; - left: auto; - background-color: rgba(0, 0, 0, 0.5); - background-color: transparent; - background-image: -webkit-gradient(linear, 0 top, 100% top, from(rgba(0, 0, 0, 0.0001)), to(rgba(0, 0, 0, 0.5))); - background-image: -webkit-linear-gradient(left, color-stop(rgba(0, 0, 0, 0.0001) 0), color-stop(rgba(0, 0, 0, 0.5) 100%)); - background-image: -moz-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0, rgba(0, 0, 0, 0.5) 100%); - background-repeat: repeat-x; - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1); -} - -.carousel-control:hover, -.carousel-control:focus { - color: #ffffff; - text-decoration: none; - opacity: 0.9; - filter: alpha(opacity=90); -} - -.carousel-control .glyphicon, -.carousel-control .icon-prev, -.carousel-control .icon-next { - position: absolute; - top: 50%; - left: 50%; - z-index: 5; - display: inline-block; - width: 20px; - height: 20px; - margin-top: -10px; - margin-left: -10px; - font-family: serif; -} - -.carousel-control .icon-prev:before { - content: '\2039'; -} - -.carousel-control .icon-next:before { - content: '\203a'; -} - -.carousel-indicators { - position: absolute; - bottom: 10px; - left: 50%; - z-index: 15; - width: 120px; - padding-left: 0; - margin-left: -60px; - text-align: center; - list-style: none; -} - -.carousel-indicators li { - display: inline-block; - width: 10px; - height: 10px; - margin: 1px; - text-indent: -999px; - cursor: pointer; - border: 1px solid #ffffff; - border-radius: 10px; -} - -.carousel-indicators .active { - width: 12px; - height: 12px; - margin: 0; - background-color: #ffffff; -} - -.carousel-caption { - position: absolute; - right: 15%; - bottom: 20px; - left: 15%; - z-index: 10; - padding-top: 20px; - padding-bottom: 20px; - color: #ffffff; - text-align: center; - text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); -} - -.carousel-caption .btn { - text-shadow: none; -} - -@media screen and (min-width: 768px) { - .carousel-control .glyphicon, - .carousel-control .icon-prev, - .carousel-control .icon-next { - width: 30px; - height: 30px; - margin-top: -15px; - margin-left: -15px; - font-size: 30px; - } - .carousel-caption { - right: 20%; - left: 20%; - padding-bottom: 30px; - } - .carousel-indicators { - bottom: 20px; - } -} - -.jumbotron { - padding: 30px; - margin-bottom: 30px; - font-size: 21px; - font-weight: 200; - line-height: 2.1428571435; - color: inherit; - background-color: #eeeeee; -} - -.jumbotron h1 { - line-height: 1; - color: inherit; -} - -.jumbotron p { - line-height: 1.4; -} - -@media screen and (min-width: 768px) { - .jumbotron { - padding: 50px 60px; - border-radius: 6px; - } - .jumbotron h1 { - font-size: 63px; - } -} - -.clearfix:before, -.clearfix:after { - display: table; - content: " "; -} - -.clearfix:after { - clear: both; -} - -.pull-right { - float: right; -} - -.pull-left { - float: left; -} - -.hide { - display: none !important; -} - -.show { - display: block !important; -} - -.invisible { - visibility: hidden; -} - -.text-hide { - font: 0/0 a; - color: transparent; - text-shadow: none; - background-color: transparent; - border: 0; -} - -.affix { - position: fixed; -} - -@-ms-viewport { - width: device-width; -} - -@media screen and (max-width: 400px) { - @-ms-viewport { - width: 320px; - } -} - -.hidden { - display: none !important; - visibility: hidden !important; -} - -.visible-sm { - display: block !important; -} - -tr.visible-sm { - display: table-row !important; -} - -th.visible-sm, -td.visible-sm { - display: table-cell !important; -} - -.visible-md { - display: none !important; -} - -tr.visible-md { - display: none !important; -} - -th.visible-md, -td.visible-md { - display: none !important; -} - -.visible-lg { - display: none !important; -} - -tr.visible-lg { - display: none !important; -} - -th.visible-lg, -td.visible-lg { - display: none !important; -} - -.hidden-sm { - display: none !important; -} - -tr.hidden-sm { - display: none !important; -} - -th.hidden-sm, -td.hidden-sm { - display: none !important; -} - -.hidden-md { - display: block !important; -} - -tr.hidden-md { - display: table-row !important; -} - -th.hidden-md, -td.hidden-md { - display: table-cell !important; -} - -.hidden-lg { - display: block !important; -} - -tr.hidden-lg { - display: table-row !important; -} - -th.hidden-lg, -td.hidden-lg { - display: table-cell !important; -} - -@media (min-width: 768px) and (max-width: 991px) { - .visible-sm { - display: none !important; - } - tr.visible-sm { - display: none !important; - } - th.visible-sm, - td.visible-sm { - display: none !important; - } - .visible-md { - display: block !important; - } - tr.visible-md { - display: table-row !important; - } - th.visible-md, - td.visible-md { - display: table-cell !important; - } - .visible-lg { - display: none !important; - } - tr.visible-lg { - display: none !important; - } - th.visible-lg, - td.visible-lg { - display: none !important; - } - .hidden-sm { - display: block !important; - } - tr.hidden-sm { - display: table-row !important; - } - th.hidden-sm, - td.hidden-sm { - display: table-cell !important; - } - .hidden-md { - display: none !important; - } - tr.hidden-md { - display: none !important; - } - th.hidden-md, - td.hidden-md { - display: none !important; - } - .hidden-lg { - display: block !important; - } - tr.hidden-lg { - display: table-row !important; - } - th.hidden-lg, - td.hidden-lg { - display: table-cell !important; - } -} - -@media (min-width: 992px) { - .visible-sm { - display: none !important; - } - tr.visible-sm { - display: none !important; - } - th.visible-sm, - td.visible-sm { - display: none !important; - } - .visible-md { - display: none !important; - } - tr.visible-md { - display: none !important; - } - th.visible-md, - td.visible-md { - display: none !important; - } - .visible-lg { - display: block !important; - } - tr.visible-lg { - display: table-row !important; - } - th.visible-lg, - td.visible-lg { - display: table-cell !important; - } - .hidden-sm { - display: block !important; - } - tr.hidden-sm { - display: table-row !important; - } - th.hidden-sm, - td.hidden-sm { - display: table-cell !important; - } - .hidden-md { - display: block !important; - } - tr.hidden-md { - display: table-row !important; - } - th.hidden-md, - td.hidden-md { - display: table-cell !important; - } - .hidden-lg { - display: none !important; - } - tr.hidden-lg { - display: none !important; - } - th.hidden-lg, - td.hidden-lg { - display: none !important; - } -} - -.visible-print { - display: none !important; -} - -tr.visible-print { - display: none !important; -} - -th.visible-print, -td.visible-print { - display: none !important; -} - -@media print { - .visible-print { - display: block !important; - } - tr.visible-print { - display: table-row !important; - } - th.visible-print, - td.visible-print { - display: table-cell !important; - } - .hidden-print { - display: none !important; - } - tr.hidden-print { - display: none !important; - } - th.hidden-print, - td.hidden-print { - display: none !important; - } -} \ No newline at end of file diff --git a/scripts/src/ice_mod/doc/_static/css/bootstrap.min.css b/scripts/src/ice_mod/doc/_static/css/bootstrap.min.css deleted file mode 100644 index 4494938..0000000 --- a/scripts/src/ice_mod/doc/_static/css/bootstrap.min.css +++ /dev/null @@ -1,9 +0,0 @@ -/*! - * Bootstrap v3.0.0 - * - * Copyright 2013 Twitter, Inc - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Designed and built with all the love in the world by @mdo and @fat. - *//*! normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,video{display:inline-block}audio:not([controls]){display:none;height:0}[hidden]{display:none}html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}a:focus{outline:thin dotted}a:active,a:hover{outline:0}h1{margin:.67em 0;font-size:2em}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:bold}dfn{font-style:italic}hr{height:0;-moz-box-sizing:content-box;box-sizing:content-box}mark{color:#000;background:#ff0}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em}pre{white-space:pre-wrap}q{quotes:"\201C" "\201D" "\2018" "\2019"}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:0}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid #c0c0c0}legend{padding:0;border:0}button,input,select,textarea{margin:0;font-family:inherit;font-size:100%}button,input{line-height:normal}button,select{text-transform:none}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}button[disabled],html input[disabled]{cursor:default}input[type="checkbox"],input[type="radio"]{padding:0;box-sizing:border-box}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}textarea{overflow:auto;vertical-align:top}table{border-collapse:collapse;border-spacing:0}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:2cm .5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.table td,.table th{background-color:#fff!important}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table-bordered th,.table-bordered td{border:1px solid #ddd!important}}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:62.5%;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.428571429;color:#333;background-color:#fff}input,button,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#428bca;text-decoration:none}a:hover,a:focus{color:#2a6496;text-decoration:underline}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}img{vertical-align:middle}.img-responsive{display:inline-block;height:auto;max-width:100%}.img-rounded{border-radius:6px}.img-circle{border-radius:500px}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16.099999999999998px;font-weight:200;line-height:1.4}@media(min-width:768px){.lead{font-size:21px}}small{font-size:85%}cite{font-style:normal}.text-muted{color:#999}.text-primary{color:#428bca}.text-warning{color:#c09853}.text-danger{color:#b94a48}.text-success{color:#468847}.text-info{color:#3a87ad}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6,.h1,.h2,.h3,.h4,.h5,.h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-weight:500;line-height:1.1}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small,.h1 small,.h2 small,.h3 small,.h4 small,.h5 small,.h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{margin-top:20px;margin-bottom:10px}h4,h5,h6{margin-top:10px;margin-bottom:10px}h1,.h1{font-size:38px}h2,.h2{font-size:32px}h3,.h3{font-size:24px}h4,.h4{font-size:18px}h5,.h5{font-size:14px}h6,.h6{font-size:12px}h1 small,.h1 small{font-size:24px}h2 small,.h2 small{font-size:18px}h3 small,.h3 small,h4 small,.h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ul,ol{margin-top:0;margin-bottom:10px}ul ul,ol ul,ul ol,ol ol{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-bottom:20px}dt,dd{line-height:1.428571429}dt{font-weight:bold}dd{margin-left:0}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}.dl-horizontal dd:before,.dl-horizontal dd:after{display:table;content:" "}.dl-horizontal dd:after{clear:both}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{font-size:17.5px;font-weight:300;line-height:1.25}blockquote p:last-child{margin-bottom:0}blockquote small{display:block;line-height:1.428571429;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:1.428571429}code,pre{font-family:Monaco,Menlo,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;white-space:nowrap;background-color:#f9f2f4;border-radius:4px}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.428571429;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{margin-right:auto;margin-left:auto}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.container:before,.container:after{display:table;content:" "}.container:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}.row:before,.row:after{display:table;content:" "}.row:after{clear:both}@media(min-width:768px){.row{margin-right:-15px;margin-left:-15px}}.row .row{margin-right:-15px;margin-left:-15px}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-1,.col-2,.col-3,.col-4,.col-5,.col-6,.col-7,.col-8,.col-9,.col-10,.col-11,.col-12{float:left}.col-1{width:8.333333333333332%}.col-2{width:16.666666666666664%}.col-3{width:25%}.col-4{width:33.33333333333333%}.col-5{width:41.66666666666667%}.col-6{width:50%}.col-7{width:58.333333333333336%}.col-8{width:66.66666666666666%}.col-9{width:75%}.col-10{width:83.33333333333334%}.col-11{width:91.66666666666666%}.col-12{width:100%}@media(min-width:768px){.container{max-width:728px}.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-1{width:8.333333333333332%}.col-sm-2{width:16.666666666666664%}.col-sm-3{width:25%}.col-sm-4{width:33.33333333333333%}.col-sm-5{width:41.66666666666667%}.col-sm-6{width:50%}.col-sm-7{width:58.333333333333336%}.col-sm-8{width:66.66666666666666%}.col-sm-9{width:75%}.col-sm-10{width:83.33333333333334%}.col-sm-11{width:91.66666666666666%}.col-sm-12{width:100%}.col-push-1{left:8.333333333333332%}.col-push-2{left:16.666666666666664%}.col-push-3{left:25%}.col-push-4{left:33.33333333333333%}.col-push-5{left:41.66666666666667%}.col-push-6{left:50%}.col-push-7{left:58.333333333333336%}.col-push-8{left:66.66666666666666%}.col-push-9{left:75%}.col-push-10{left:83.33333333333334%}.col-push-11{left:91.66666666666666%}.col-pull-1{right:8.333333333333332%}.col-pull-2{right:16.666666666666664%}.col-pull-3{right:25%}.col-pull-4{right:33.33333333333333%}.col-pull-5{right:41.66666666666667%}.col-pull-6{right:50%}.col-pull-7{right:58.333333333333336%}.col-pull-8{right:66.66666666666666%}.col-pull-9{right:75%}.col-pull-10{right:83.33333333333334%}.col-pull-11{right:91.66666666666666%}}@media(min-width:992px){.container{max-width:940px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-1{width:8.333333333333332%}.col-lg-2{width:16.666666666666664%}.col-lg-3{width:25%}.col-lg-4{width:33.33333333333333%}.col-lg-5{width:41.66666666666667%}.col-lg-6{width:50%}.col-lg-7{width:58.333333333333336%}.col-lg-8{width:66.66666666666666%}.col-lg-9{width:75%}.col-lg-10{width:83.33333333333334%}.col-lg-11{width:91.66666666666666%}.col-lg-12{width:100%}.col-offset-1{margin-left:8.333333333333332%}.col-offset-2{margin-left:16.666666666666664%}.col-offset-3{margin-left:25%}.col-offset-4{margin-left:33.33333333333333%}.col-offset-5{margin-left:41.66666666666667%}.col-offset-6{margin-left:50%}.col-offset-7{margin-left:58.333333333333336%}.col-offset-8{margin-left:66.66666666666666%}.col-offset-9{margin-left:75%}.col-offset-10{margin-left:83.33333333333334%}.col-offset-11{margin-left:91.66666666666666%}}@media(min-width:1200px){.container{max-width:1170px}}table{max-width:100%;background-color:transparent}th{text-align:left}.table{width:100%;margin-bottom:20px}.table thead>tr>th,.table tbody>tr>th,.table tfoot>tr>th,.table thead>tr>td,.table tbody>tr>td,.table tfoot>tr>td{padding:8px;line-height:1.428571429;vertical-align:top;border-top:1px solid #ddd}.table thead>tr>th{vertical-align:bottom}.table caption+thead tr:first-child th,.table colgroup+thead tr:first-child th,.table thead:first-child tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed thead>tr>th,.table-condensed tbody>tr>th,.table-condensed tfoot>tr>th,.table-condensed thead>tr>td,.table-condensed tbody>tr>td,.table-condensed tfoot>tr>td{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>thead>tr>th,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>tbody>tr>td,.table-bordered>tfoot>tr>td{border:1px solid #ddd}.table-striped>tbody>tr:nth-child(odd)>td,.table-striped>tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover>tbody>tr:hover>td,.table-hover>tbody>tr:hover>th{background-color:#f5f5f5}table col[class^="col-"]{display:table-column;float:none}table td[class^="col-"],table th[class^="col-"]{display:table-cell;float:none}.table>thead>tr>td.active,.table>tbody>tr>td.active,.table>tfoot>tr>td.active,.table>thead>tr>th.active,.table>tbody>tr>th.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>tbody>tr.active>td,.table>tfoot>tr.active>td,.table>thead>tr.active>th,.table>tbody>tr.active>th,.table>tfoot>tr.active>th{background-color:#f5f5f5}.table>thead>tr>td.success,.table>tbody>tr>td.success,.table>tfoot>tr>td.success,.table>thead>tr>th.success,.table>tbody>tr>th.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>tbody>tr.success>td,.table>tfoot>tr.success>td,.table>thead>tr.success>th,.table>tbody>tr.success>th,.table>tfoot>tr.success>th{background-color:#dff0d8;border-color:#d6e9c6}.table>thead>tr>td.danger,.table>tbody>tr>td.danger,.table>tfoot>tr>td.danger,.table>thead>tr>th.danger,.table>tbody>tr>th.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>tbody>tr.danger>td,.table>tfoot>tr.danger>td,.table>thead>tr.danger>th,.table>tbody>tr.danger>th,.table>tfoot>tr.danger>th{background-color:#f2dede;border-color:#eed3d7}.table>thead>tr>td.warning,.table>tbody>tr>td.warning,.table>tfoot>tr>td.warning,.table>thead>tr>th.warning,.table>tbody>tr>th.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>tbody>tr.warning>td,.table>tfoot>tr.warning>td,.table>thead>tr.warning>th,.table>tbody>tr.warning>th,.table>tfoot>tr.warning>th{background-color:#fcf8e3;border-color:#fbeed5}.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover,.table-hover>tbody>tr.success:hover>td{background-color:#d0e9c6;border-color:#c9e2b3}.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover,.table-hover>tbody>tr.danger:hover>td{background-color:#ebcccc;border-color:#e6c1c7}.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover,.table-hover>tbody>tr.warning:hover>td{background-color:#faf2cc;border-color:#f8e5be}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;margin-bottom:5px;font-weight:bold}input[type="search"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;line-height:normal}input[type="file"]{display:block}select[multiple],select[size]{height:auto}select optgroup{font-family:inherit;font-size:inherit;font-style:inherit}input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}input[type="number"]::-webkit-outer-spin-button,input[type="number"]::-webkit-inner-spin-button{height:auto}.form-control:-moz-placeholder{color:#999}.form-control::-moz-placeholder{color:#999}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control{display:block;width:100%;height:38px;padding:8px 12px;font-size:14px;line-height:1.428571429;color:#555;vertical-align:middle;background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:rgba(82,168,236,0.8);outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{cursor:not-allowed;background-color:#eee}textarea.form-control{height:auto}.form-group{margin-bottom:15px}.radio,.checkbox{display:block;min-height:20px;padding-left:20px;margin-top:10px;margin-bottom:10px;vertical-align:middle}.radio label,.checkbox label{display:inline;margin-bottom:0;font-weight:normal;cursor:pointer}.radio input[type="radio"],.radio-inline input[type="radio"],.checkbox input[type="checkbox"],.checkbox-inline input[type="checkbox"]{float:left;margin-left:-20px}.radio+.radio,.checkbox+.checkbox{margin-top:-5px}.radio-inline,.checkbox-inline{display:inline-block;padding-left:20px;margin-bottom:0;font-weight:normal;vertical-align:middle;cursor:pointer}.radio-inline+.radio-inline,.checkbox-inline+.checkbox-inline{margin-top:0;margin-left:10px}.input-large{height:56px;padding:14px 16px;font-size:18px;border-radius:6px}.input-small{height:30px;padding:5px 10px;font-size:12px;border-radius:3px}select.input-large{height:56px;line-height:56px}select.input-small{height:30px;line-height:30px}textarea.input-large,textarea.input-small{height:auto}.has-warning .help-block,.has-warning .control-label{color:#c09853}.has-warning .form-control{padding-right:32px;border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-warning .form-control:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.has-warning .input-group-addon{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.has-error .help-block,.has-error .control-label{color:#b94a48}.has-error .form-control{padding-right:32px;border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-error .form-control:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.has-error .input-group-addon{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.has-success .help-block,.has-success .control-label{color:#468847}.has-success .form-control{padding-right:32px;border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.has-success .form-control:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.has-success .input-group-addon{color:#468847;background-color:#dff0d8;border-color:#468847}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}.btn{display:inline-block;padding:8px 12px;margin-bottom:0;font-size:14px;font-weight:500;line-height:1.428571429;text-align:center;white-space:nowrap;vertical-align:middle;cursor:pointer;border:1px solid transparent;border-radius:4px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn:hover,.btn:focus{color:#fff;text-decoration:none}.btn:active,.btn.active{outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{pointer-events:none;cursor:default;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none}.btn-default{color:#fff;background-color:#474949;border-color:#474949}.btn-default:hover,.btn-default:focus,.btn-default:active,.btn-default.active{background-color:#3a3c3c;border-color:#2e2f2f}.btn-default.disabled,.btn-default[disabled],fieldset[disabled] .btn-default,.btn-default.disabled:hover,.btn-default[disabled]:hover,fieldset[disabled] .btn-default:hover,.btn-default.disabled:focus,.btn-default[disabled]:focus,fieldset[disabled] .btn-default:focus,.btn-default.disabled:active,.btn-default[disabled]:active,fieldset[disabled] .btn-default:active,.btn-default.disabled.active,.btn-default[disabled].active,fieldset[disabled] .btn-default.active{background-color:#474949;border-color:#474949}.btn-primary{color:#fff;background-color:#428bca;border-color:#428bca}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active{background-color:#357ebd;border-color:#3071a9}.btn-primary.disabled,.btn-primary[disabled],fieldset[disabled] .btn-primary,.btn-primary.disabled:hover,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary:hover,.btn-primary.disabled:focus,.btn-primary[disabled]:focus,fieldset[disabled] .btn-primary:focus,.btn-primary.disabled:active,.btn-primary[disabled]:active,fieldset[disabled] .btn-primary:active,.btn-primary.disabled.active,.btn-primary[disabled].active,fieldset[disabled] .btn-primary.active{background-color:#428bca;border-color:#428bca}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#f0ad4e}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active{background-color:#eea236;border-color:#ec971f}.btn-warning.disabled,.btn-warning[disabled],fieldset[disabled] .btn-warning,.btn-warning.disabled:hover,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning:hover,.btn-warning.disabled:focus,.btn-warning[disabled]:focus,fieldset[disabled] .btn-warning:focus,.btn-warning.disabled:active,.btn-warning[disabled]:active,fieldset[disabled] .btn-warning:active,.btn-warning.disabled.active,.btn-warning[disabled].active,fieldset[disabled] .btn-warning.active{background-color:#f0ad4e;border-color:#f0ad4e}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d9534f}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active{background-color:#d43f3a;border-color:#c9302c}.btn-danger.disabled,.btn-danger[disabled],fieldset[disabled] .btn-danger,.btn-danger.disabled:hover,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger:hover,.btn-danger.disabled:focus,.btn-danger[disabled]:focus,fieldset[disabled] .btn-danger:focus,.btn-danger.disabled:active,.btn-danger[disabled]:active,fieldset[disabled] .btn-danger:active,.btn-danger.disabled.active,.btn-danger[disabled].active,fieldset[disabled] .btn-danger.active{background-color:#d9534f;border-color:#d9534f}.btn-success{color:#fff;background-color:#5cb85c;border-color:#5cb85c}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active{background-color:#4cae4c;border-color:#449d44}.btn-success.disabled,.btn-success[disabled],fieldset[disabled] .btn-success,.btn-success.disabled:hover,.btn-success[disabled]:hover,fieldset[disabled] .btn-success:hover,.btn-success.disabled:focus,.btn-success[disabled]:focus,fieldset[disabled] .btn-success:focus,.btn-success.disabled:active,.btn-success[disabled]:active,fieldset[disabled] .btn-success:active,.btn-success.disabled.active,.btn-success[disabled].active,fieldset[disabled] .btn-success.active{background-color:#5cb85c;border-color:#5cb85c}.btn-info{color:#fff;background-color:#5bc0de;border-color:#5bc0de}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active{background-color:#46b8da;border-color:#31b0d5}.btn-info.disabled,.btn-info[disabled],fieldset[disabled] .btn-info,.btn-info.disabled:hover,.btn-info[disabled]:hover,fieldset[disabled] .btn-info:hover,.btn-info.disabled:focus,.btn-info[disabled]:focus,fieldset[disabled] .btn-info:focus,.btn-info.disabled:active,.btn-info[disabled]:active,fieldset[disabled] .btn-info:active,.btn-info.disabled.active,.btn-info[disabled].active,fieldset[disabled] .btn-info.active{background-color:#5bc0de;border-color:#5bc0de}.btn-link{font-weight:normal;color:#428bca;cursor:pointer;border-radius:0}.btn-link,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active{border-color:transparent}.btn-link:hover,.btn-link:focus{color:#2a6496;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,fieldset[disabled] .btn-link:hover,.btn-link[disabled]:focus,fieldset[disabled] .btn-link:focus{color:#333;text-decoration:none}.btn-large{padding:14px 16px;font-size:18px;border-radius:6px}.btn-small,.btn-mini{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-mini{padding:3px 5px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;transition:height .35s ease}.input-group{display:table;border-collapse:separate}.input-group.col{float:none;padding-right:0;padding-left:0}.input-group .form-control{width:100%;margin-bottom:0}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:8px 12px;font-size:14px;font-weight:normal;line-height:1.428571429;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-group-addon.input-small{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-large{padding:14px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type="radio"],.input-group-addon input[type="checkbox"]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:last-child>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group-btn:first-child>.btn:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-4px}.input-group-btn>.btn:hover,.input-group-btn>.btn:active{z-index:2}.form-inline .form-control,.form-inline .radio,.form-inline .checkbox{display:inline-block}.form-inline .radio,.form-inline .checkbox{margin-top:0;margin-bottom:0}.form-horizontal .control-label{padding-top:9px}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}.form-horizontal .form-group:before,.form-horizontal .form-group:after{display:table;content:" "}.form-horizontal .form-group:after{clear:both}@media(min-width:768px){.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}}.form-horizontal .form-group .row{margin-right:-15px;margin-left:-15px}@media(min-width:768px){.form-horizontal .control-label{text-align:right}}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,0.175);box-shadow:0 6px 12px rgba(0,0,0,0.175);background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:1.428571429;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus{color:#fff;text-decoration:none;background-color:#357ebd;background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#357ebd));background-image:-webkit-linear-gradient(top,#428bca,0%,#357ebd,100%);background-image:-moz-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#357ebd;background-image:-webkit-gradient(linear,left 0,left 100%,from(#428bca),to(#357ebd));background-image:-webkit-linear-gradient(top,#428bca,0%,#357ebd,100%);background-image:-moz-linear-gradient(top,#428bca 0,#357ebd 100%);background-image:linear-gradient(to bottom,#428bca 0,#357ebd 100%);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff428bca',endColorstr='#ff357ebd',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.428571429;color:#999}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 30px 10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-right-radius:4px;border-top-left-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.list-group-item>.badge{float:right;margin-right:-15px}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}a.list-group-item .list-group-item-heading{color:#333}a.list-group-item .list-group-item-text{color:#555}a.list-group-item:hover,a.list-group-item:focus{text-decoration:none;background-color:#f5f5f5}a.list-group-item.active{z-index:2;color:#fff;background-color:#428bca;border-color:#428bca}a.list-group-item.active .list-group-item-heading{color:inherit}a.list-group-item.active .list-group-item-text{color:#e1edf7}.panel{padding:15px;margin-bottom:20px;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.05);box-shadow:0 1px 1px rgba(0,0,0,0.05)}.panel-heading{padding:10px 15px;margin:-15px -15px 15px;background-color:#f5f5f5;border-bottom:1px solid #ddd;border-top-right-radius:3px;border-top-left-radius:3px}.panel-title{margin-top:0;margin-bottom:0;font-size:17.5px;font-weight:500}.panel-footer{padding:10px 15px;margin:15px -15px -15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel-primary{border-color:#428bca}.panel-primary .panel-heading{color:#fff;background-color:#428bca;border-color:#428bca}.panel-success{border-color:#d6e9c6}.panel-success .panel-heading{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.panel-warning{border-color:#fbeed5}.panel-warning .panel-heading{color:#c09853;background-color:#fcf8e3;border-color:#fbeed5}.panel-danger{border-color:#eed3d7}.panel-danger .panel-heading{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.panel-info{border-color:#bce8f1}.panel-info .panel-heading{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.list-group-flush{margin:15px -15px -15px}.list-group-flush .list-group-item{border-width:1px 0}.list-group-flush .list-group-item:first-child{border-top-right-radius:0;border-top-left-radius:0}.list-group-flush .list-group-item:last-child{border-bottom:0}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;border-radius:6px}.well-small{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:bold;line-height:1;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.5;filter:alpha(opacity=50)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav:before,.nav:after{display:table;content:" "}.nav:after{clear:both}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#999}.nav>li.disabled>a:hover,.nav>li.disabled>a:focus{color:#999;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav.open>a,.nav.open>a:hover,.nav.open>a:focus{color:#fff;background-color:#428bca;border-color:#428bca}.nav.open>a .caret,.nav.open>a:hover .caret,.nav.open>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.nav>.pull-right{float:right}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.428571429;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee}.nav-tabs>li.active>a,.nav-tabs>li.active>a:hover,.nav-tabs>li.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{display:table-cell;float:none;width:1%}.nav-tabs.nav-justified>li>a{text-align:center}.nav-tabs.nav-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs.nav-justified>.active>a{border-bottom-color:#fff}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:5px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:hover,.nav-pills>li.active>a:focus{color:#fff;background-color:#428bca}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{display:table-cell;float:none;width:1%}.nav-justified>li>a{text-align:center}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-bottom:1px solid #ddd}.nav-tabs-justified>.active>a{border-bottom-color:#fff}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tabbable:before,.tabbable:after{display:table;content:" "}.tabbable:after{clear:both}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.nav .caret{border-top-color:#428bca;border-bottom-color:#428bca}.nav a:hover .caret{border-top-color:#2a6496;border-bottom-color:#2a6496}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-right-radius:0;border-top-left-radius:0}.navbar{position:relative;min-height:50px;padding-right:15px;padding-left:15px;margin-bottom:20px;background-color:#eee;border-radius:4px}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar:before,.navbar:after{display:table;content:" "}.navbar:after{clear:both}.navbar-nav{margin-top:10px;margin-bottom:15px}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px;line-height:20px;color:#777;border-radius:4px}.navbar-nav>li>a:hover,.navbar-nav>li>a:focus{color:#333;background-color:transparent}.navbar-nav>.active>a,.navbar-nav>.active>a:hover,.navbar-nav>.active>a:focus{color:#555;background-color:#d5d5d5}.navbar-nav>.disabled>a,.navbar-nav>.disabled>a:hover,.navbar-nav>.disabled>a:focus{color:#ccc;background-color:transparent}.navbar-nav.pull-right{width:100%}.navbar-static-top{border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;border-radius:0}.navbar-fixed-top{top:0}.navbar-fixed-bottom{bottom:0;margin-bottom:0}.navbar-brand{display:block;max-width:200px;padding:15px 15px;margin-right:auto;margin-left:auto;font-size:18px;font-weight:500;line-height:20px;color:#777;text-align:center}.navbar-brand:hover,.navbar-brand:focus{color:#5e5e5e;text-decoration:none;background-color:transparent}.navbar-toggle{position:absolute;top:9px;right:10px;width:48px;height:32px;padding:8px 12px;background-color:transparent;border:1px solid #ddd;border-radius:4px}.navbar-toggle:hover,.navbar-toggle:focus{background-color:#ddd}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;background-color:#ccc;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}.navbar-form{margin-top:6px;margin-bottom:6px}.navbar-form .form-control,.navbar-form .radio,.navbar-form .checkbox{display:inline-block}.navbar-form .radio,.navbar-form .checkbox{margin-top:0;margin-bottom:0}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-right-radius:0;border-top-left-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-nav>.dropdown>a:hover .caret,.navbar-nav>.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar-nav>.open>a,.navbar-nav>.open>a:hover,.navbar-nav>.open>a:focus{color:#555;background-color:#d5d5d5}.navbar-nav>.open>a .caret,.navbar-nav>.open>a:hover .caret,.navbar-nav>.open>a:focus .caret{border-top-color:#555;border-bottom-color:#555}.navbar-nav>.dropdown>a .caret{border-top-color:#777;border-bottom-color:#777}.navbar-nav.pull-right>li>.dropdown-menu,.navbar-nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar-inverse{background-color:#222}.navbar-inverse .navbar-brand{color:#999}.navbar-inverse .navbar-brand:hover,.navbar-inverse .navbar-brand:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .navbar-nav>li>a{color:#999}.navbar-inverse .navbar-nav>li>a:hover,.navbar-inverse .navbar-nav>li>a:focus{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:hover,.navbar-inverse .navbar-nav>.active>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:hover,.navbar-inverse .navbar-nav>.disabled>a:focus{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:hover,.navbar-inverse .navbar-toggle:focus{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:hover,.navbar-inverse .navbar-nav>.open>a:focus{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.dropdown>a:hover .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-nav>.dropdown>a .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .navbar-nav>.open>a .caret,.navbar-inverse .navbar-nav>.open>a:hover .caret,.navbar-inverse .navbar-nav>.open>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}@media screen and (min-width:768px){.navbar-brand{float:left;margin-right:5px;margin-left:-15px}.navbar-nav{float:left;margin-top:0;margin-bottom:0}.navbar-nav>li{float:left}.navbar-nav>li>a{border-radius:0}.navbar-nav.pull-right{float:right;width:auto}.navbar-toggle{position:relative;top:auto;left:auto;display:none}.nav-collapse.collapse{display:block!important;height:auto!important;overflow:visible!important}}.navbar-btn{margin-top:6px}.navbar-text{margin-top:15px;margin-bottom:15px}.navbar-link{color:#777}.navbar-link:hover{color:#333}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover{color:#fff}.btn .caret{border-top-color:#fff}.dropup .btn .caret{border-bottom-color:#fff}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group>.btn,.btn-group-vertical>.btn{position:relative;float:left}.btn-group>.btn:hover,.btn-group-vertical>.btn:hover,.btn-group>.btn:focus,.btn-group-vertical>.btn:focus,.btn-group>.btn:active,.btn-group-vertical>.btn:active{z-index:2}.btn-group .btn+.btn{margin-left:-1px}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar:before,.btn-toolbar:after{display:table;content:" "}.btn-toolbar:after{clear:both}.btn-toolbar .btn-group{float:left}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group,.btn-toolbar>.btn-group+.btn-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-bottom-left-radius:0;border-top-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child>.btn:last-child,.btn-group>.btn-group:first-child>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child>.btn:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-large+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,0.125);box-shadow:inset 0 3px 5px rgba(0,0,0,0.125)}.btn .caret{margin-left:0}.btn-large .caret{border-width:5px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-group-vertical>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn+.btn{margin-top:-1px}.btn-group-vertical .btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical .btn:first-child{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical .btn:last-child{border-top-right-radius:0;border-top-left-radius:0}.btn-group-justified{display:table;width:100%}.btn-group-justified .btn{display:table-cell;float:none;width:1%}.btn-group[data-toggle="buttons"]>.btn>input[type="radio"],.btn-group[data-toggle="buttons"]>.btn>input[type="checkbox"]{display:none}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#999}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{float:left;padding:4px 12px;line-height:1.428571429;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination>li:first-child>a,.pagination>li:first-child>span{border-left-width:1px;border-bottom-left-radius:4px;border-top-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:hover,.pagination>li>a:focus,.pagination>.active>a,.pagination>.active>span{background-color:#f5f5f5}.pagination>.active>a,.pagination>.active>span{color:#999;cursor:default}.pagination>.disabled>span,.pagination>.disabled>a,.pagination>.disabled>a:hover,.pagination>.disabled>a:focus{color:#999;cursor:not-allowed;background-color:#fff}.pagination-large>li>a,.pagination-large>li>span{padding:14px 16px;font-size:18px}.pagination-large>li:first-child>a,.pagination-large>li:first-child>span{border-bottom-left-radius:6px;border-top-left-radius:6px}.pagination-large>li:last-child>a,.pagination-large>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-small>li>a,.pagination-small>li>span{padding:5px 10px;font-size:12px}.pagination-small>li:first-child>a,.pagination-small>li:first-child>span{border-bottom-left-radius:3px;border-top-left-radius:3px}.pagination-small>li:last-child>a,.pagination-small>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager:before,.pager:after{display:table;content:" "}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:not-allowed;background-color:#fff}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;display:none;overflow:auto;overflow-y:scroll}.modal.fade .modal-dialog{-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);transform:translate(0,-25%);-webkit-transition:-webkit-transform .3s ease-out;-moz-transition:-moz-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out}.modal.fade.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);transform:translate(0,0)}.modal-dialog{z-index:1050;width:auto;padding:10px;margin-right:auto;margin-left:auto}.modal-content{position:relative;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,0.5);box-shadow:0 3px 9px rgba(0,0,0,0.5);background-clip:padding-box}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1030;background-color:#000}.modal-backdrop.fade{opacity:0;filter:alpha(opacity=0)}.modal-backdrop.fade.in{opacity:.5;filter:alpha(opacity=50)}.modal-header{min-height:16.428571429px;padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.428571429}.modal-body{position:relative;padding:20px}.modal-footer{padding:19px 20px 20px;margin-top:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer:before,.modal-footer:after{display:table;content:" "}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}@media screen and (min-width:768px){.modal-dialog{right:auto;left:50%;width:600px;padding-top:30px;padding-bottom:30px}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,0.5);box-shadow:0 5px 15px rgba(0,0,0,0.5)}}.tooltip{position:absolute;z-index:1030;display:block;font-size:12px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:1;filter:alpha(opacity=100)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;text-decoration:none;background-color:rgba(0,0,0,0.9);border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.top-left .tooltip-arrow{bottom:0;left:5px;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.top-right .tooltip-arrow{right:5px;bottom:0;border-top-color:rgba(0,0,0,0.9);border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:rgba(0,0,0,0.9);border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:rgba(0,0,0,0.9);border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.tooltip.bottom-left .tooltip-arrow{top:0;left:5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.tooltip.bottom-right .tooltip-arrow{top:0;right:5px;border-bottom-color:rgba(0,0,0,0.9);border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);background-clip:padding-box;-webkit-bg-clip:padding-box;-moz-bg-clip:padding}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0;content:" "}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0;content:" "}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0;content:" "}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0;content:" "}.alert{padding:10px 35px 10px 15px;margin-bottom:20px;color:#c09853;background-color:#fcf8e3;border:1px solid #fbeed5;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert hr{border-top-color:#f8e5be}.alert .alert-link{font-weight:500;color:#a47e3c}.alert .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#356635}.alert-danger{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger hr{border-top-color:#e6c1c7}.alert-danger .alert-link{color:#953b39}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#2d6987}.alert-block{padding-top:15px;padding-bottom:15px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.thumbnail,.img-thumbnail{padding:4px;line-height:1.428571429;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.thumbnail{display:block}.thumbnail>img,.img-thumbnail{display:inline-block;height:auto;max-width:100%}a.thumbnail:hover,a.thumbnail:focus{border-color:#428bca}.thumbnail>img{margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#333}.media,.media-body{overflow:hidden;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{padding-left:0;list-style:none}.label{display:inline;padding:.25em .6em;font-size:75%;font-weight:500;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#999;border-radius:.25em}.label[href]:hover,.label[href]:focus{color:#fff;text-decoration:none;cursor:pointer;background-color:#808080}.label-danger{background-color:#d9534f}.label-danger[href]:hover,.label-danger[href]:focus{background-color:#c9302c}.label-success{background-color:#5cb85c}.label-success[href]:hover,.label-success[href]:focus{background-color:#449d44}.label-warning{background-color:#f0ad4e}.label-warning[href]:hover,.label-warning[href]:focus{background-color:#ec971f}.label-info{background-color:#5bc0de}.label-info[href]:hover,.label-info[href]:focus{background-color:#31b0d5}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:bold;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#999;border-radius:10px}.badge:empty{display:none}a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.btn .badge{position:relative;top:-1px}a.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#428bca;background-color:#fff}.nav-pills>li>a>.badge{margin-left:3px}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;background-color:#428bca;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-striped .progress-bar{background-color:#428bca;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-size:40px 40px}.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-color:#d9534f;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-color:#5cb85c;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-color:#f0ad4e;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px;cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:inline-block;height:auto;max-width:100%;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6);opacity:.5;filter:alpha(opacity=50)}.carousel-control.left{background-color:rgba(0,0,0,0.0001);background-color:transparent;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.5)),to(rgba(0,0,0,0.0001)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.5) 0),color-stop(rgba(0,0,0,0.0001) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.5) 0,rgba(0,0,0,0.0001) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000',endColorstr='#00000000',GradientType=1)}.carousel-control.right{right:0;left:auto;background-color:rgba(0,0,0,0.5);background-color:transparent;background-image:-webkit-gradient(linear,0 top,100% top,from(rgba(0,0,0,0.0001)),to(rgba(0,0,0,0.5)));background-image:-webkit-linear-gradient(left,color-stop(rgba(0,0,0,0.0001) 0),color-stop(rgba(0,0,0,0.5) 100%));background-image:-moz-linear-gradient(left,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-image:linear-gradient(to right,rgba(0,0,0,0.0001) 0,rgba(0,0,0,0.5) 100%);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000',endColorstr='#80000000',GradientType=1)}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-control .glyphicon,.carousel-control .icon-prev,.carousel-control .icon-next{position:absolute;top:50%;left:50%;z-index:5;display:inline-block;width:20px;height:20px;margin-top:-10px;margin-left:-10px;font-family:serif}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:120px;padding-left:0;margin-left:-60px;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,0.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon,.carousel-control .icon-prev,.carousel-control .icon-next{width:30px;height:30px;margin-top:-15px;margin-left:-15px;font-size:30px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.jumbotron{padding:30px;margin-bottom:30px;font-size:21px;font-weight:200;line-height:2.1428571435;color:inherit;background-color:#eee}.jumbotron h1{line-height:1;color:inherit}.jumbotron p{line-height:1.4}@media screen and (min-width:768px){.jumbotron{padding:50px 60px;border-radius:6px}.jumbotron h1{font-size:63px}}.clearfix:before,.clearfix:after{display:table;content:" "}.clearfix:after{clear:both}.pull-right{float:right}.pull-left{float:left}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.affix{position:fixed}@-ms-viewport{width:device-width}@media screen and (max-width:400px){@-ms-viewport{width:320px}}.hidden{display:none!important;visibility:hidden!important}.visible-sm{display:block!important}tr.visible-sm{display:table-row!important}th.visible-sm,td.visible-sm{display:table-cell!important}.visible-md{display:none!important}tr.visible-md{display:none!important}th.visible-md,td.visible-md{display:none!important}.visible-lg{display:none!important}tr.visible-lg{display:none!important}th.visible-lg,td.visible-lg{display:none!important}.hidden-sm{display:none!important}tr.hidden-sm{display:none!important}th.hidden-sm,td.hidden-sm{display:none!important}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}@media(min-width:768px) and (max-width:991px){.visible-sm{display:none!important}tr.visible-sm{display:none!important}th.visible-sm,td.visible-sm{display:none!important}.visible-md{display:block!important}tr.visible-md{display:table-row!important}th.visible-md,td.visible-md{display:table-cell!important}.visible-lg{display:none!important}tr.visible-lg{display:none!important}th.visible-lg,td.visible-lg{display:none!important}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}.hidden-md{display:none!important}tr.hidden-md{display:none!important}th.hidden-md,td.hidden-md{display:none!important}.hidden-lg{display:block!important}tr.hidden-lg{display:table-row!important}th.hidden-lg,td.hidden-lg{display:table-cell!important}}@media(min-width:992px){.visible-sm{display:none!important}tr.visible-sm{display:none!important}th.visible-sm,td.visible-sm{display:none!important}.visible-md{display:none!important}tr.visible-md{display:none!important}th.visible-md,td.visible-md{display:none!important}.visible-lg{display:block!important}tr.visible-lg{display:table-row!important}th.visible-lg,td.visible-lg{display:table-cell!important}.hidden-sm{display:block!important}tr.hidden-sm{display:table-row!important}th.hidden-sm,td.hidden-sm{display:table-cell!important}.hidden-md{display:block!important}tr.hidden-md{display:table-row!important}th.hidden-md,td.hidden-md{display:table-cell!important}.hidden-lg{display:none!important}tr.hidden-lg{display:none!important}th.hidden-lg,td.hidden-lg{display:none!important}}.visible-print{display:none!important}tr.visible-print{display:none!important}th.visible-print,td.visible-print{display:none!important}@media print{.visible-print{display:block!important}tr.visible-print{display:table-row!important}th.visible-print,td.visible-print{display:table-cell!important}.hidden-print{display:none!important}tr.hidden-print{display:none!important}th.hidden-print,td.hidden-print{display:none!important}} \ No newline at end of file diff --git a/scripts/src/ice_mod/doc/_static/css/jhepc.css b/scripts/src/ice_mod/doc/_static/css/jhepc.css deleted file mode 100644 index 1d39c20..0000000 --- a/scripts/src/ice_mod/doc/_static/css/jhepc.css +++ /dev/null @@ -1,235 +0,0 @@ -body { - font-family: sans-serif; - font-size: 16px; - line-height: 1.5em; -} - -p { -} - -a { - color: #08519C; -} - -a:hover{ - color: #FF3D00; - text-decoration: none; -} - -div.navbar { - position: fixed; - width: 20%; - top: 0; - text-align: right; - background-color: rgb(240, 240, 240); - border-right: 1px solid; - border-right-color: rgb(189, 189, 189); - height: 100%; - text-transform: uppercase; - font-weight: bold; - z-index: 50; -} - -.navbar-nav>li>a, .navbar-nav>.active>a, .navbar-nav>.active>a:hover, - .navbar-nav>.active>a.active { - background: transparent; - text-transform: uppercase; - font-weight: bold; - height: 65px; - vertical-align: middle; - padding: 20px 30px; -} - -.navbar-nav>li>a>img { - visibility: hidden; - padding-left: 8px; - padding-bottom: 3px; -} - -.navbar-nav>li>a:hover>img{ - visibility: visible; -} - -div.navbar .navbar-brand { - max-width: 400px; - vertical-align: middle; - padding: 20px; -} - -div.navbar .navbar-brand { - padding-top: 7px; -} - -div.navbar ul { - padding-top: 15em; -} - -body { - background-color: rgb(255, 255, 255); -} - -div.container{ - min-height: 75%; - margin: 0; - border-bottom: 1px solid rgb(189, 189, 189); -} - -div.container, footer { - max-width: 1450px; - margin-left: 20%; - padding: 5em 15em 5em 4em; -} - -div.container div#gallery { - margin-left: -8em; - margin-right: -2em; -} - -div.container div#gallery h1 { - margin-left: 3em; - margin-right: 2em; -} - -#carousel-container { - width: 100%; - margin: 0; - padding: 0; -} - -h1 a.headerlink, h2 a.headerlink, h3 a.headerlink { - display: none; - font-weight: normal; -} - -h1 { - padding-top: 50px; - padding-bottom: 30px; - font-family: sans-serif; - text-transform: uppercase; - font-size: 1.7em; - letter-spacing: 0.01em; -} - -h2 { - font-family: sans-serif; - font-size: 1.3em; - text-transform: uppercase; - letter-spacing: 0.01em; - -} - -.carousel-inner { - border-bottom: 1px solid rgb(189, 189, 189); -} - -.carousel-inner .item { - margin: 0; - width: 100%; - top: 65px; - height: 500px; -} - -.carousel-inner .item .carousel-text { - height: 500px; - position: absolute; - top: 65px; - right: 0px; - width: 35%; - padding-left: 0em; - display: inline-block; - text-align: right; - padding-right: 18em; -} - -.carousel-inner .item .carousel-text h2 { - font-size: 60px; -} - -.carousel-inner .item .carousel-text h3 { - font-size: 35px; -} - - -.carousel-inner .item .carousel-image { - height: 500px; - width: 60%; - padding: 0 0px; - display: inline-block; - text-align: right; -} - -.carousel-inner .item .carousel-image img { - padding: 50px 0px; - max-width: 80%; -} - -.black { - background-color: black; - color: rgb(245, 245, 245); -} - -.white { - background-color: white; - color: #333333; -} - -.dark-grey { - background-color: #222; - color: rgb(245, 245, 245); -} - -.section img { - -webkit-border-radius: 10px; /* Saf3-4, iOS 1-3.2, Android <1.6 */ - -moz-border-radius: 10px; /* FF1-3.6 */ - border-radius: 10px; /* Opera 10.5, IE9, Saf5, Chrome, FF4, iOS 4, Android 2.1+ */ - border: 2px solid #fff; - max-width: 75%; - max-height: 60%; -} - -.highlight { - background-color: transparent; -} - -pre { - width: 70%; - font-family: monospace,serif; - background-color: white; - padding: 20px; -} - -div.admonition { - margin-bottom: 10px; - margin-top: 10px; - padding: 7px; - border-radius: 4px; - -moz-border-radius: 4px; -} - -div.note { - background-color: #EEE; - border: 1px solid #CCC; -} - -pre { - padding: 10px; - background-color: #F8F8F8; - color: #222; - line-height: 1.2em; - border: 1px solid #DDD; - margin: 1.5em 0 1.5em 0; -} - -p.admonition-title { - margin: 0px 10px 5px 0px; - font-weight: bold; - display: inline; -} - -.first { - margin-top: 0 !important; -} - -.highlight a { - text-decoration: underline; -} diff --git a/scripts/src/ice_mod/doc/_static/js/bootstrap.js b/scripts/src/ice_mod/doc/_static/js/bootstrap.js deleted file mode 100644 index 643e71c..0000000 --- a/scripts/src/ice_mod/doc/_static/js/bootstrap.js +++ /dev/null @@ -1,2280 +0,0 @@ -/* =================================================== - * bootstrap-transition.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#transitions - * =================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) - * ======================================================= */ - - $(function () { - - $.support.transition = (function () { - - var transitionEnd = (function () { - - var el = document.createElement('bootstrap') - , transEndEventNames = { - 'WebkitTransition' : 'webkitTransitionEnd' - , 'MozTransition' : 'transitionend' - , 'OTransition' : 'oTransitionEnd otransitionend' - , 'transition' : 'transitionend' - } - , name - - for (name in transEndEventNames){ - if (el.style[name] !== undefined) { - return transEndEventNames[name] - } - } - - }()) - - return transitionEnd && { - end: transitionEnd - } - - })() - - }) - -}(window.jQuery);/* ========================================================== - * bootstrap-alert.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#alerts - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* ALERT CLASS DEFINITION - * ====================== */ - - var dismiss = '[data-dismiss="alert"]' - , Alert = function (el) { - $(el).on('click', dismiss, this.close) - } - - Alert.prototype.close = function (e) { - var $this = $(this) - , selector = $this.attr('data-target') - , $parent - - if (!selector) { - selector = $this.attr('href') - selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 - } - - $parent = $(selector) - - e && e.preventDefault() - - $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) - - $parent.trigger(e = $.Event('close')) - - if (e.isDefaultPrevented()) return - - $parent.removeClass('in') - - function removeElement() { - $parent - .trigger('closed') - .remove() - } - - $.support.transition && $parent.hasClass('fade') ? - $parent.on($.support.transition.end, removeElement) : - removeElement() - } - - - /* ALERT PLUGIN DEFINITION - * ======================= */ - - var old = $.fn.alert - - $.fn.alert = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('alert') - if (!data) $this.data('alert', (data = new Alert(this))) - if (typeof option == 'string') data[option].call($this) - }) - } - - $.fn.alert.Constructor = Alert - - - /* ALERT NO CONFLICT - * ================= */ - - $.fn.alert.noConflict = function () { - $.fn.alert = old - return this - } - - - /* ALERT DATA-API - * ============== */ - - $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) - -}(window.jQuery);/* ============================================================ - * bootstrap-button.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#buttons - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* BUTTON PUBLIC CLASS DEFINITION - * ============================== */ - - var Button = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.button.defaults, options) - } - - Button.prototype.setState = function (state) { - var d = 'disabled' - , $el = this.$element - , data = $el.data() - , val = $el.is('input') ? 'val' : 'html' - - state = state + 'Text' - data.resetText || $el.data('resetText', $el[val]()) - - $el[val](data[state] || this.options[state]) - - // push to event loop to allow forms to submit - setTimeout(function () { - state == 'loadingText' ? - $el.addClass(d).attr(d, d) : - $el.removeClass(d).removeAttr(d) - }, 0) - } - - Button.prototype.toggle = function () { - var $parent = this.$element.closest('[data-toggle="buttons-radio"]') - - $parent && $parent - .find('.active') - .removeClass('active') - - this.$element.toggleClass('active') - } - - - /* BUTTON PLUGIN DEFINITION - * ======================== */ - - var old = $.fn.button - - $.fn.button = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('button') - , options = typeof option == 'object' && option - if (!data) $this.data('button', (data = new Button(this, options))) - if (option == 'toggle') data.toggle() - else if (option) data.setState(option) - }) - } - - $.fn.button.defaults = { - loadingText: 'loading...' - } - - $.fn.button.Constructor = Button - - - /* BUTTON NO CONFLICT - * ================== */ - - $.fn.button.noConflict = function () { - $.fn.button = old - return this - } - - - /* BUTTON DATA-API - * =============== */ - - $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { - var $btn = $(e.target) - if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') - $btn.button('toggle') - }) - -}(window.jQuery);/* ========================================================== - * bootstrap-carousel.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#carousel - * ========================================================== - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ========================================================== */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* CAROUSEL CLASS DEFINITION - * ========================= */ - - var Carousel = function (element, options) { - this.$element = $(element) - this.$indicators = this.$element.find('.carousel-indicators') - this.options = options - this.options.pause == 'hover' && this.$element - .on('mouseenter', $.proxy(this.pause, this)) - .on('mouseleave', $.proxy(this.cycle, this)) - } - - Carousel.prototype = { - - cycle: function (e) { - if (!e) this.paused = false - if (this.interval) clearInterval(this.interval); - this.options.interval - && !this.paused - && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) - return this - } - - , getActiveIndex: function () { - this.$active = this.$element.find('.item.active') - this.$items = this.$active.parent().children() - return this.$items.index(this.$active) - } - - , to: function (pos) { - var activeIndex = this.getActiveIndex() - , that = this - - if (pos > (this.$items.length - 1) || pos < 0) return - - if (this.sliding) { - return this.$element.one('slid', function () { - that.to(pos) - }) - } - - if (activeIndex == pos) { - return this.pause().cycle() - } - - return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) - } - - , pause: function (e) { - if (!e) this.paused = true - if (this.$element.find('.next, .prev').length && $.support.transition.end) { - this.$element.trigger($.support.transition.end) - this.cycle(true) - } - clearInterval(this.interval) - this.interval = null - return this - } - - , next: function () { - if (this.sliding) return - return this.slide('next') - } - - , prev: function () { - if (this.sliding) return - return this.slide('prev') - } - - , slide: function (type, next) { - var $active = this.$element.find('.item.active') - , $next = next || $active[type]() - , isCycling = this.interval - , direction = type == 'next' ? 'left' : 'right' - , fallback = type == 'next' ? 'first' : 'last' - , that = this - , e - - this.sliding = true - - isCycling && this.pause() - - $next = $next.length ? $next : this.$element.find('.item')[fallback]() - - e = $.Event('slide', { - relatedTarget: $next[0] - , direction: direction - }) - - if ($next.hasClass('active')) return - - if (this.$indicators.length) { - this.$indicators.find('.active').removeClass('active') - this.$element.one('slid', function () { - var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) - $nextIndicator && $nextIndicator.addClass('active') - }) - } - - if ($.support.transition && this.$element.hasClass('slide')) { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $next.addClass(type) - $next[0].offsetWidth // force reflow - $active.addClass(direction) - $next.addClass(direction) - this.$element.one($.support.transition.end, function () { - $next.removeClass([type, direction].join(' ')).addClass('active') - $active.removeClass(['active', direction].join(' ')) - that.sliding = false - setTimeout(function () { that.$element.trigger('slid') }, 0) - }) - } else { - this.$element.trigger(e) - if (e.isDefaultPrevented()) return - $active.removeClass('active') - $next.addClass('active') - this.sliding = false - this.$element.trigger('slid') - } - - isCycling && this.cycle() - - return this - } - - } - - - /* CAROUSEL PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.carousel - - $.fn.carousel = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('carousel') - , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) - , action = typeof option == 'string' ? option : options.slide - if (!data) $this.data('carousel', (data = new Carousel(this, options))) - if (typeof option == 'number') data.to(option) - else if (action) data[action]() - else if (options.interval) data.pause().cycle() - }) - } - - $.fn.carousel.defaults = { - interval: 5000 - , pause: 'hover' - } - - $.fn.carousel.Constructor = Carousel - - - /* CAROUSEL NO CONFLICT - * ==================== */ - - $.fn.carousel.noConflict = function () { - $.fn.carousel = old - return this - } - - /* CAROUSEL DATA-API - * ================= */ - - $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { - var $this = $(this), href - , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 - , options = $.extend({}, $target.data(), $this.data()) - , slideIndex - - $target.carousel(options) - - if (slideIndex = $this.attr('data-slide-to')) { - $target.data('carousel').pause().to(slideIndex).cycle() - } - - e.preventDefault() - }) - -}(window.jQuery);/* ============================================================= - * bootstrap-collapse.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#collapse - * ============================================================= - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* COLLAPSE PUBLIC CLASS DEFINITION - * ================================ */ - - var Collapse = function (element, options) { - this.$element = $(element) - this.options = $.extend({}, $.fn.collapse.defaults, options) - - if (this.options.parent) { - this.$parent = $(this.options.parent) - } - - this.options.toggle && this.toggle() - } - - Collapse.prototype = { - - constructor: Collapse - - , dimension: function () { - var hasWidth = this.$element.hasClass('width') - return hasWidth ? 'width' : 'height' - } - - , show: function () { - var dimension - , scroll - , actives - , hasData - - if (this.transitioning || this.$element.hasClass('in')) return - - dimension = this.dimension() - scroll = $.camelCase(['scroll', dimension].join('-')) - actives = this.$parent && this.$parent.find('> .accordion-group > .in') - - if (actives && actives.length) { - hasData = actives.data('collapse') - if (hasData && hasData.transitioning) return - actives.collapse('hide') - hasData || actives.data('collapse', null) - } - - this.$element[dimension](0) - this.transition('addClass', $.Event('show'), 'shown') - $.support.transition && this.$element[dimension](this.$element[0][scroll]) - } - - , hide: function () { - var dimension - if (this.transitioning || !this.$element.hasClass('in')) return - dimension = this.dimension() - this.reset(this.$element[dimension]()) - this.transition('removeClass', $.Event('hide'), 'hidden') - this.$element[dimension](0) - } - - , reset: function (size) { - var dimension = this.dimension() - - this.$element - .removeClass('collapse') - [dimension](size || 'auto') - [0].offsetWidth - - this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') - - return this - } - - , transition: function (method, startEvent, completeEvent) { - var that = this - , complete = function () { - if (startEvent.type == 'show') that.reset() - that.transitioning = 0 - that.$element.trigger(completeEvent) - } - - this.$element.trigger(startEvent) - - if (startEvent.isDefaultPrevented()) return - - this.transitioning = 1 - - this.$element[method]('in') - - $.support.transition && this.$element.hasClass('collapse') ? - this.$element.one($.support.transition.end, complete) : - complete() - } - - , toggle: function () { - this[this.$element.hasClass('in') ? 'hide' : 'show']() - } - - } - - - /* COLLAPSE PLUGIN DEFINITION - * ========================== */ - - var old = $.fn.collapse - - $.fn.collapse = function (option) { - return this.each(function () { - var $this = $(this) - , data = $this.data('collapse') - , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) - if (!data) $this.data('collapse', (data = new Collapse(this, options))) - if (typeof option == 'string') data[option]() - }) - } - - $.fn.collapse.defaults = { - toggle: true - } - - $.fn.collapse.Constructor = Collapse - - - /* COLLAPSE NO CONFLICT - * ==================== */ - - $.fn.collapse.noConflict = function () { - $.fn.collapse = old - return this - } - - - /* COLLAPSE DATA-API - * ================= */ - - $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { - var $this = $(this), href - , target = $this.attr('data-target') - || e.preventDefault() - || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 - , option = $(target).data('collapse') ? 'toggle' : $this.data() - $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') - $(target).collapse(option) - }) - -}(window.jQuery);/* ============================================================ - * bootstrap-dropdown.js v2.3.2 - * http://twitter.github.com/bootstrap/javascript.html#dropdowns - * ============================================================ - * Copyright 2012 Twitter, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================ */ - - -!function ($) { - - "use strict"; // jshint ;_; - - - /* DROPDOWN CLASS DEFINITION - * ========================= */ - - var toggle = '[data-toggle=dropdown]' - , Dropdown = function (element) { - var $el = $(element).on('click.dropdown.data-api', this.toggle) - $('html').on('click.dropdown.data-api', function () { - $el.parent().removeClass('open') - }) - } - - Dropdown.prototype = { - - constructor: Dropdown - - , toggle: function (e) { - var $this = $(this) - , $parent - , isActive - - if ($this.is('.disabled, :disabled')) return - - $parent = getParent($this) - - isActive = $parent.hasClass('open') - - clearMenus() - - if (!isActive) { - if ('ontouchstart' in document.documentElement) { - // if mobile we we use a backdrop because click events don't delegate - $('