Thanks to OP for sharing that their image is from https://hub.docker.com/r/etal/cnvkit
I downloaded this and it seems pretty simple.
My tests:
singularity pull docker://etal/cnvkit:latest
$ singularity shell ./cnvkit_latest.sif
INFO: Converting SIF file to temporary sandbox...
bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
Singularity> ls /
bin boot dev environment etc home lib lib32 lib64 libx32 media mnt opt proc root run sbin singularity srv sys tmp usr var
Singularity> ls /singularity
/singularity
Singularity> cnvkit.py
usage: cnvkit.py [-h]
{batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,bintest,import-picard,import-seg,import-theta,import-rna,export,version}
...
CNVkit, a command-line toolkit for copy number analysis.
positional arguments:
{batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,bintest,import-picard,import-seg,import-theta,import-rna,export,version}
Sub-commands (use with -h for more info)
batch Run the complete CNVkit pipeline on one or more BAM files.
target Transform bait intervals into targets more suitable for CNVkit.
access List the locations of accessible sequence regions in a FASTA file.
antitarget Derive off-target ("antitarget") bins from target regions.
autobin Quickly calculate reasonable bin sizes from BAM read counts.
coverage Calculate coverage in the given regions from BAM read depths.
reference Compile a coverage reference from the given files (normal samples).
fix Combine target and antitarget coverages and correct for biases. Adjust raw coverage data according to the given reference, correct potential biases and re-center.
segment Infer copy number segments from the given coverage table.
call Call copy number variants from segmented log2 ratios.
diagram Draw copy number (log2 coverages, segments) on chromosomes as a diagram. If both the raw probes and segments are given, show them side-by-side on each chromosome (segments on the left side, probes on the right
side).
scatter Plot probe log2 coverages and segmentation calls together.
heatmap Plot copy number for multiple samples as a heatmap.
breaks List the targeted genes in which a copy number breakpoint occurs.
genemetrics Identify targeted genes with copy number gain or loss.
sex Guess samples' sex from the relative coverage of chromosomes X and Y.
metrics Compute coverage deviations and other metrics for self-evaluation.
segmetrics Compute segment-level metrics from bin-level log2 ratios.
bintest Test for single-bin copy number alterations.
import-picard Convert Picard CalculateHsMetrics tabular output to CNVkit .cnn files. The input file is generated by the PER_TARGET_COVERAGE option in the CalculateHsMetrics script in Picard tools. If 'antitarget' is in the
input filename, the generated output filename will have the suffix '.antitargetcoverage.cnn', otherwise '.targetcoverage.cnn'.
import-seg Convert a SEG file to CNVkit .cns files.
import-theta Convert THetA output to a BED-like, CNVkit-like tabular format. Equivalently, use the THetA results file to convert CNVkit .cns segments to integer copy number calls.
import-rna Convert a cohort of per-gene log2 ratios to CNVkit .cnr format.
export Convert CNVkit output files to another format.
version Display this program's version.
options:
-h, --help show this help message and exit
See the online manual for details: https://cnvkit.readthedocs.io
Singularity> which cnvkit.py
/usr/local/bin/cnvkit.py
As you can see, since cnvkit.py
is in /usr/local/bin/
, simply typing cnvkit.py
within the shell works. Let's try an exec with no frills:
$ singularity exec cnvkit_latest.sif cnvkit.py
INFO: Converting SIF file to temporary sandbox...
usage: cnvkit.py [-h]
{batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,bintest,import-picard,import-seg,import-theta,import-rna,export,version}
...
CNVkit, a command-line toolkit for copy number analysis.
positional arguments:
{batch,target,access,antitarget,autobin,coverage,reference,fix,segment,call,diagram,scatter,heatmap,breaks,genemetrics,gainloss,sex,gender,metrics,segmetrics,bintest,import-picard,import-seg,import-theta,import-rna,export,version}
Sub-commands (use with -h for more info)
batch Run the complete CNVkit pipeline on one or more BAM files.
target Transform bait intervals into targets more suitable for CNVkit.
access List the locations of accessible sequence regions in a FASTA file.
antitarget Derive off-target ("antitarget") bins from target regions.
autobin Quickly calculate reasonable bin sizes from BAM read counts.
coverage Calculate coverage in the given regions from BAM read depths.
reference Compile a coverage reference from the given files (normal samples).
fix Combine target and antitarget coverages and correct for biases. Adjust raw coverage data according to the given reference, correct potential biases and re-center.
segment Infer copy number segments from the given coverage table.
call Call copy number variants from segmented log2 ratios.
diagram Draw copy number (log2 coverages, segments) on chromosomes as a diagram. If both the raw probes and segments are given, show them side-by-side on each chromosome (segments on the left side, probes on the right
side).
scatter Plot probe log2 coverages and segmentation calls together.
heatmap Plot copy number for multiple samples as a heatmap.
breaks List the targeted genes in which a copy number breakpoint occurs.
genemetrics Identify targeted genes with copy number gain or loss.
sex Guess samples' sex from the relative coverage of chromosomes X and Y.
metrics Compute coverage deviations and other metrics for self-evaluation.
segmetrics Compute segment-level metrics from bin-level log2 ratios.
bintest Test for single-bin copy number alterations.
import-picard Convert Picard CalculateHsMetrics tabular output to CNVkit .cnn files. The input file is generated by the PER_TARGET_COVERAGE option in the CalculateHsMetrics script in Picard tools. If 'antitarget' is in the
input filename, the generated output filename will have the suffix '.antitargetcoverage.cnn', otherwise '.targetcoverage.cnn'.
import-seg Convert a SEG file to CNVkit .cns files.
import-theta Convert THetA output to a BED-like, CNVkit-like tabular format. Equivalently, use the THetA results file to convert CNVkit .cns segments to integer copy number calls.
import-rna Convert a cohort of per-gene log2 ratios to CNVkit .cnr format.
export Convert CNVkit output files to another format.
version Display this program's version.
options:
-h, --help show this help message and exit
See the online manual for details: https://cnvkit.readthedocs.io
INFO: Cleaning up image...
The answer seems to be a lot easier than having to find cnvkit.py
, as it is already in the PATH.