### Install setuptools user-specific way Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools Alternative user-specific installation of setuptools using wget and python. ```bash $ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py $ python ez_setup.py --user ``` -------------------------------- ### Install setuptools using wget and python Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools Troubleshooting step to install setuptools, which provides the easy_install command. ```bash $ wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py -O - | python ``` -------------------------------- ### Install deepTools from source via git clone Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools Clones the deepTools repository and runs the setup script to install. You may need root permissions for a global install and can customize the install location. ```shell $ git clone https://github.com/fidelram/deepTools ``` ```shell $ cd deepTools/ $ vim config/deepTools.cfg $ python setup.py install ``` -------------------------------- ### Install deepTools from source Source: https://github.com/deeptools/deeptools/blob/master/docs/content/installation.rst Clone the repository and install the development version from source. ```bash $ git clone https://github.com/deeptools/deepTools.git $ cd deepTools $ pip install . ``` -------------------------------- ### FASTQ format example Source: https://github.com/deeptools/deeptools/wiki/Help/Glossary/Glossary Example of a FASTQ file containing a single sequence read. The format includes a header line starting with '@', the sequence, a separator line with '+', and quality scores. The quality scores are ASCII characters where '!' represents the lowest quality and '~' the highest. ```fastq @SEQ_ID GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT + !''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65 ``` -------------------------------- ### Run multiBamSummary bins with options and show head of output Source: https://github.com/deeptools/deeptools/blob/master/docs/content/tools/multiBamSummary.rst Example command for multiBamSummary bins, using all BAM files in a folder, setting a minimum mapping quality, limiting to chromosome 19, and specifying labels. The output includes a compressed numpy array and a raw counts tab-delimited file. The head of the raw counts file is shown, with columns for chromosome, start, end, and each sample. ```bash $ deepTools2.0/bin/multiBamSummary bins \ --bamfiles testFiles/*bam \ # using all BAM files in the folder --minMappingQuality 30 \ --region 19 \ # limiting the binning of the genome to chromosome 19 --labels H3K27me3 H3K4me1 H3K4me3 HeK9me3 input \ -out readCounts.npz --outRawCounts readCounts.tab $ head readCounts.tab #'chr' 'start' 'end' 'H3K27me3' 'H3K4me1' 'H3K4me3' 'HeK9me3' 'input' 19 10000 20000 0.0 0.0 0.0 0.0 0.0 19 20000 30000 0.0 0.0 0.0 0.0 0.0 19 30000 40000 0.0 0.0 0.0 0.0 0.0 19 40000 50000 0.0 0.0 0.0 0.0 0.0 19 50000 60000 0.0 0.0 0.0 0.0 0.0 19 60000 70000 1.0 1.0 0.0 0.0 1.0 19 70000 80000 0.0 1.0 7.0 0.0 1.0 19 80000 90000 15.0 0.0 0.0 6.0 4.0 19 90000 100000 73.0 7.0 4.0 16.0 5.0 ``` -------------------------------- ### Example output of fragment length statistics Source: https://github.com/deeptools/deeptools/blob/master/docs/content/example_api_tutorial.rst This is the output from the mapReduce example, showing the mean and median fragment lengths. It is not code but a sample result. ```default 0.170030741997, 0.216740390353 ``` -------------------------------- ### Get deepTools revision from Tool Shed Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools Get the latest revision number of deepTools from the Galaxy Tool Shed, which is needed for the installation command. ```shell hg identify http://toolshed.g2.bx.psu.edu/view/bgruening/deeptools ``` -------------------------------- ### BED file example lines Source: https://github.com/deeptools/deeptools/wiki/Help/Glossary/Glossary Example lines from a BED file of mouse genes, showing the 0-based start and 1-based end positions following UCSC conventions. ```text chr1 3204562 3661579 NM_001011874 Xkr4 - chr1 4481008 4486494 NM_011441 Sox17 - chr1 4763278 4775807 NM_001177658 Mrpl15 - chr1 4797973 4836816 NM_008866 Lypla1 + ``` -------------------------------- ### Show deepTools setup.py help Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools Displays command-line options for the deepTools setup.py script, useful for customizing the installation. ```shell $ python setup.py --help ``` -------------------------------- ### FASTA format example Source: https://github.com/deeptools/deeptools/wiki/Help/Glossary/Glossary Example of a FASTA file containing a single DNA/protein sequence. The header line starts with '>' followed by the sequence identifier and description. The sequence follows on subsequent lines. ```fasta >gi|5524211|gb|AAD44166.1| cytochrome b [Elephas maximus maximus] LCLYTHIGRNIYYGSYLYSETWNTGIMLLLITMATAFMGYVLPWGQMSFWGATVITNLFSAIPYIGTNLV EWIWGGFSVDKATLNRFFAFHFILPFTMVALAGVHLTFLHETGSNNPLGLTSDSDKIPFHPYYTIKDFLG LLILILLLLLLALLSPDMLGDPDNHMPADPLNTPLHIKPEWYFLFAYAILRSVPNKLGGVLALFLSIVIL GLMPFLHTSKHRSMMLRPLSQALFWTLTMDLLTLTWIGSQPVEYPYTIIGQMASILYFSIILAFLPIAGX IENY ``` -------------------------------- ### bamCoverage --help Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/All-command-line-options Displays all available command-line options for bamCoverage. Use this to see the full list of options and their descriptions. ```bash $ /deepTools/bin/bamCoverage --help ``` -------------------------------- ### bedGraph file example lines Source: https://github.com/deeptools/deeptools/wiki/Help/Glossary/Glossary Four exemplary lines from a bedGraph file, showing the 4-column format with chromosome, start, end, and score. ```text chr1 10 20 1.5 chr1 20 30 1.7 chr1 30 40 2.0 chr1 40 50 1.8 ``` -------------------------------- ### computeMatrix reference-point single input example Source: https://github.com/deeptools/deeptools/blob/master/docs/content/tools/computeMatrix.rst Demonstrates the reference-point mode with a single bigWig and BED file. The example specifies the TSS as reference point, sets region lengths before and after, uses a BED and bigWig file, skips zero coverage regions, and outputs files for heatmap and profile plotting. ```bash $ computeMatrix reference-point \ # choose the mode --referencePoint TSS \ # alternatives: TES, center -b 3000 -a 10000 \ # define the region you are interested in -R testFiles/genes.bed \ -S testFiles/log2ratio_H3K4Me3_chr19.bw \ --skipZeros \ -o matrix1_H3K4me3_l2r_TSS.gz \ # to be used with plotHeatmap and plotProfile --outFileSortedRegions regions1_H3K4me3_l2r_genes.bed ``` -------------------------------- ### Display testBed.bed file contents Source: https://github.com/deeptools/deeptools/blob/master/docs/content/help_faq.rst Shows the initial BED file used in the examples. It contains overlapping regions and a duplicate entry. ```default $ cat testBed.bed chr1 10 20 region1 chr1 7 15 region2 chr1 18 29 region3 chr1 35 40 region4 chr1 10 20 region1Duplicate ``` -------------------------------- ### Build with system toolchain using pip, uv, or pipx Source: https://github.com/deeptools/deeptools/blob/master/docs/content/installation.rst Install Rust and system libraries, then build deepTools from source using any of these commands. This is the same path used by deepTools' CI. ```bash $ pip install . # from a checkout $ uv tool install deeptools $ pipx install deeptools ``` -------------------------------- ### Set environment variables and install deepTools with pip Source: https://github.com/deeptools/deeptools/wiki/technical_documentation/Installing-deepTools After installing NumPy and SciPy via dmg images, set the PYTHONPATH and PATH environment variables, then install deepTools with pip. ```bash $ cd ~ $ export PYTHONPATH=$PYTHONPATH:~/lib/python2.7/site-packages $ export PATH=$PATH:~/bin:~/.local/bin:~/Library/Python/2.7/bin ``` ```bash $ easy_install --prefix=~ pip ``` ```bash $ pip install --user deeptools ``` -------------------------------- ### Example output of bamPEFragmentSize (truncated) Source: https://github.com/deeptools/deeptools/blob/master/docs/content/tools/bamPEFragmentSize.rst Sample output showing per-sample statistics for fragment lengths and read lengths, truncated for brevity. ```bash BAM file : testFiles/RNAseq_sample1.bam Sample size: 10815 Fragment lengths: Min.: 0.0 1st Qu.: 311.0 Mean: 8960.68987517 Median: 331.0 3rd Qu.: 362.0 Max.: 53574842.0 Std: 572421.46625 Read lengths: Min.: 20.0 1st Qu.: 101.0 Mean: 99.1621821544 Median: 101.0 3rd Qu.: 101.0 Max.: 101.0 Std: 9.16567362755 BAM file : testFiles/RNAseq_sample2.bam Sample size: 6771 Fragment lengths: Min.: 43.0 1st Qu.: 148.0 Mean: 176.465071629 Median: 164.0 3rd Qu.: 185.0 Max.: 500.0 Std: 53.733877263 ......(output truncated) ``` -------------------------------- ### Install deepTools via uv, pipx, or pixi Source: https://github.com/deeptools/deeptools/blob/master/README.md Install deepTools using uv, pipx, or pixi package managers. These are alternative methods to pip and conda for installing the stable release. ```bash $ uv tool install deeptools ``` ```bash $ pipx install deeptools ``` ```bash $ pixi global install -c conda-forge -c bioconda deeptools ``` -------------------------------- ### computeMatrix scale-regions multiple input files example Source: https://github.com/deeptools/deeptools/blob/master/docs/content/tools/computeMatrix.rst This example shows the scale-regions mode with multiple BED files and multiple bigWig files. It uses a wildcard for bigWig files, sets regions before and after, defines body length, and skips zeros, outputting the matrix and sorted regions. ```bash $ deepTools2.0/bin/computeMatrix scale-regions \ -R genes_chr19_firstHalf.bed genes_chr19_secondHalf.bed \ # separate multiple files with spaces -S testFiles/log2ratio_*.bw \ or use the wild card approach -b 3000 -a 3000 \ --regionBodyLength 5000 \ --skipZeros -o matrix2_multipleBW_l2r_twoGroups_scaled.gz \ --outFileNameMatrix matrix2_multipleBW_l2r_twoGroups_scaled.tab \ --outFileSortedRegions regions2_multipleBW_l2r_twoGroups_genes.bed ``` -------------------------------- ### Typical deepTools command: bamCoverage example Source: https://github.com/deeptools/deeptools/blob/master/docs/content/list_of_tools.rst Shows the structure of a typical deepTools command, generating a bigWig coverage file from a BAM file with options for read extension, filtering, and scaling. ```bash $ bamCoverage --bam myAlignedReads.bam \ --outFileName myCoverageFile.bigWig \ --outFileFormat bigwig \ --extendReads 200 \ --samFlagExclude 1024 \ --scaleFactor 0.5 ```