Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

Latest commit

History

198 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CONICS

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

CONICS works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data!

The CONICS paper has been accepted for publication in Bioinformatics. Check it out here !

Table of contents

CONICSmat - Identifying CNVs from scRNA-seq using a count table

CONICSmat is an R package that can be used to identify CNVs in single cell RNA-seq data from a gene expression table, without the need of an explicit normal control dataset. CONICSmat works with either full transcript (e.g. Fluidigm C1) or 5'/3' tagged (e.g. 10X Genomics) data. A tutorial on how to use CONICSmat, and a Smart-Seq2 dataset, can be found on the CONICSmat Wiki page [CLICK here].

overview Visualizations of scRNA-seq data from Oligodendroglioma (Tirosh et al., 2016) generated with CONICSmat.



CONICS - Identifying CNVs from scRNA-seq with alignment files

Requirements

  • Python and Perl
  • beanplot
  • samtools
  • bedtools IMPORTANT: Bedtools >2.2.5 is needed in order to correctly calculate the coverage using CONICS.
  • Two directories, the first containing the aligned scRNA-seq data to be classified by CNV status, and a second, containing aligned scRNA-seq data to be used as a control.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count
  • FDR for CNV calling

Test data

A set of tumor cells from three glioblastoma patients and a normal brain control, as well as a file with genomic coordinate of large-scale CNVs are available here.

Running

bash run_CONICS.sh [directory for tumor] [directory for normal] [.bed file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [directory for normal]: path to directory containing aligned bam files to be used as a control. Example nonmalignant brain data, used in the manuscript, can be obtained here was used as an examples for the journal

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

    [chromosome]	[start]	[end]	[chromosome:start:end:CNV]
    

    Note: the 4th column of the file must have the exact format shown here:(Amp: amplification, Del: deletion)

7 19533 157408385 7:19533:157408385:Amp
9 19116859 32405639 9:19116859:32405639:Del
  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_.

  1. incidenceMatrix.csv: matrix of presence/absence for all CNVs, in individual cells
  2. Read-count distribution in CNV segments. (violin plot)
  3. Hierarchical clustering of the single cells by CNV status.

violindendrogram

Integrating estimates of point-mutation minor-allele frequencies

Regions of copy-number alteration will show a drop in the frequency of reads quantifying the minor allele. Averaged over large regions of copy-number alteration, this provides an additional metric to increase confidence in single-cell CNV-calls.

Requirements

  • Python and R
  • bam-readcount
  • gplots and ggplot2
  • One directory containing the aligned tumor scRNA-seq data to be classified
  • Two variant VCF files from exome-seq of (blood) control and tumor tissue, eg generated with the GATK toolkit.
  • A file containing the genomic coordinates of the CNVs in BED format.

Config file

Adjust CONICS.cfg to customize the following:

  • Path to python/bam-readcount/Rscript
  • Path to genome which reads were aligned to (FASTA format)

Running

 bash run_BAf_analysis.sh [directory for tumor] [VCF file for normal exome-seq] [VCF file for tumor exome-seq] [BED file for CNV segments] [base name]
  • [directory for tumor]: path to directory containing aligned bam files to be tested. Example glioblastoma data, used in the manuscript, can be obtained here.

  • [VCF file for normal exome-seq]: Vcf file containing mutations for a control exome-seq, e.g. from blood of the patient. This file can be generated with tools like GATK toolkit.

  • [VCF file for tumor exome-seq]: Vcf file containing mutations detected in exome-seq of the tumor. This file can be generated with tools like GATK toolkit.

  • [BED file for CNV segments]: tab-delimited bed file of CNV segments to be quantified.

  • [base name] : base name for output directory

Output

All output files will be located in the directory output[base name]_

  1. _germline-snvs.bed: BED file containing position and BAFs from Exome-seq, generated in step 1.
  2. _af.txt: TAB separated table containing the counts for the A allele at each locus in each cell, generated in step 2
  3. _bf.txt: TAB separated table containing the counts for the B allele at each locus in each cell, generated in step 2
  4. baf_hist.pdf Hierarchical clustering of the average B allele frequency in each of the loci altered by copy number for each cell, generated in step 3

heatmap

Phylogenetic tree contruction

CONICS can generate a phylogenetic tree from the CNV incidence matrix, using the Fitch-Margoliash algorithm. Other phylogenetic reconstruction algorithms can be applied, using the incidence matrix as a starting point.

Requirements

Config file

Adjust Tree.cfg to change the following.

  • Path to Rscript
  • Path to Rphylip

Running

  • Before running, set the path to Phylip in Tree.cfg file.
bash run_Tree.sh [CNV presence/absence matrix][number of genotypes] [base name for output file]
  • [CNV presence/absence matrix]: .incidenceMatrix.csv files.
  • [number of genotypes]: the number of genotypes to model
  • [base name] : base name for output directory

Output

cluster.pdf (phylogenetic trees) and cluster.txt will be generated in the output directory. Each leaf corresponds to a clusters of cells with a common genotype. Cluster assignments for each cell will be in cluster.txt.

tree

cluster_1 D12,E10,F9,G3,A12,C8,C9,A3,A5,A6,C3,C2,C1,C7,H12,C4,D8,D9,A9,E4,E7,E3,F1,E1,B5,B7,E9,B3,D7,D1
cluster_2 E8,G7,G9,A7,G2,B6,E2
cluster_3 H3,A2,A4,H8,G11,F2,F3,H1,H7
cluster_4 A10,B2
cluster_5 C5
cluster_6 F8,B1

Intra-clone co-expression networks

CONICS can construct the local co-expression network of a given gene, based on correlations across single cells.

Requirements

Config file

Adjust CorrelationNetwork.cfg to configure the following:

  • Path to Rscript
  • ncore: Number of cores (default: 12)
  • cor_threshold: Starting threshold to construct the co-expression network (default: 0.9)
  • min_neighbours: How many direct neighbours of gene of interest should be analyzed (default: 20)
  • minRawReads: How many raw reads should map to a gene for it to be included (default: 100)
  • percentCellsExpressing: Percentage (0.15 =15%) of cells expressing a gene for it to be included (default: 0.15)
  • minGenesExpr: How many genes should be expressed in a cell for it to be included (default: 800)
  • depth: How deep should the gene analysis search. (2=only direct neighbor genes would be considered) (default: 2)

Running

bash run_CorrelationNetwork.sh [input matrix] [centered gene] [base name]
  • [input matrix]: tab-delimited file of read counts for each gene (rows), for each cell (columns).
  • [centered gene]: a target gene of which neighbor genes are analyzed.
  • [base name] : base name for output directory

Output

All the output files will be located in output.

  1. [correlstion_threshold]_[gene_name].txt : co-expression network
  2. [gene_name]corMat.rd: Rdata containing the adjusted correlation matrix
  3. topCorrelations.pdf: bar graph of top correlations.

CXnet

Assessing the correlation of CNV status with single-cell gene-expression

Requirements

Config file

Adjust CompareExomeSeq_vs_ScRNAseq.cfg to set the following:

  • Path to Rscript
  • window size for assessing CNV status

Running

bash run_compareExomeSeq_vs_ScRNAseq.sh [matrix for read counts] [base name for output file]
  • [matrix for read counts]: tab-delimited file of the number of mapped reads to each gene in the DNA sequencing and in scRNA-seq. Genes on each chromosome should be ordered by their chromosomal position.

    [gene] [chromosome] [start] [#read in DNA-seq(normal)] [#read in DNA-seq(tumor)] [#read in scRNA-seq(normal)] [#read in scRNA-seq(tumor)]
    
    • example

DDX11L1 1 11874 538 199 5 0
WASH7P 1 14362 4263 6541 223 45
  • [base name] : base name for output directory

Output

Compare[window_size].pdf_ (Box plot) will be generated in the output directory. compare

False discovery rate estimation: Cross validation

CONICS can estimate false discovery rate via 10-fold cross-validation, using the user-supplied control scRNA-seq dataset. For example, in the manuscript cross validation was performed using normal brain controls.

Requirements

Config file

Adjust 10X_cross_validation.cfg to set the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read-count.
  • FDR for CNV calling

Running

bash run_10X_cross_validation.sh [directory for control scRNA-seq] [.bed file containing CNV segments] [base name]
  • [directory for test]: path to directory containing the aligned BAM files of the scRNA-seq control data.

  • [.bed file for CNV segments], [base name] : same as described in run_CONICS.sh ;

Output

Box plot of 10 FDRs resulting from each pooled sample would be generated (boxplot.pdf) in the output directory. 10X

False discovery rate estimation: Empirical testing

FDRs can also be estimated by empirical testing. In the manuscript, the number of false positive CNV calls was calculated using a non-malignant fetal brain dataset. These data are independent from the training set

Requirements

Config file

Adjust Empirical_validation.cfg to change the following:

  • Paths to python/samtools/bedtools/Rscript
  • Thresholds for mapping-quality and read count
  • FDR for CNV calling

Running

bash run_empirical_validation.sh [directory for train] [directory for test] [.bed files for CNV segments] [base name]
  • [directory for train]: path to directory containing aligned bam files of scRNA-seq data used as a control to call CNVs

  • [directory for test]: path to directory containing aligned bam files of scRNA-seq data known not to have CNVs, used as a gold standard.

  • [BED file for CNV segments] : same as described in run_CONICS.sh

Output

Box plot of FDRs will be generated (boxplot.pdf) in the output directory. empirical

About

CONICS: COpy-Number analysis In single-Cell RNA-Sequencing

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages