Kun:LabNotes/SingleCellExpr/2016-9-23
Jump to navigation
Jump to search
scTHS-seq data analysis
Converting a site count matrix into a gene set count matrix
- Rationale: scTHS-seq data are very sparse, only small percentage of cells have transposase insertion at a given genomic location (site). In order to compare the similarity among different cells, the data need to be collapsed in some meaningful ways, one of which is to combine all insertion events in or near genes of a gene set into a single metric. This will greatly reduce the number of rows in the data matrix, and make it much less sparse.
- The matrix conversion depends on the following:
- Definition of gene sets. Existing annotation such as GO might be too general and non-specific, especially for brain data. We will probably need to manually compile more specific gene sets relevant to the specific biological samples.
- Extraction of chromosomal intervals for all genes in multiple gene sets. I wrote a script for this purpose. It takes all gene set files in a folder, and generate bed files covering the transcribed regions, plus upstream/downstream flaking regions. The gene set files has a specific format, in which a file contain one or more descriptions, and gene names after each description (Example: Media: neuronal_genes.txt). There will be a gene set info file listing all gene set bed files and the description of each set.
- I wrote three scripts to extracting the intervals for different genomic features:
#Gene span: the full transcribed regions plus upstream/downstream flanking regions. /media/Home_Raid1/kunzhang/bin/get_gene_set_chr_span.pl Brain_genes #TSS: upstream/downstream regions centering at the TSS sites /media/Home_Raid1/kunzhang/bin/get_gene_set_TSS.pl Brain_genes #Up_distal: distal regulatory regions 1kb upstream of TSS sites. /media/Home_Raid1/kunzhang/bin/get_gene_set_up_distal.pl Brain_genes
Update@11/01/2016: I wrote another script to use TSS flanking regions, which seem to be more specific /media/Home_Raid1/kunzhang/bin/get_gene_set_tss_region.pl Brain_genes
- Matrix conversion. I have a second script that take a binary site matrix as the input, plus a gene set info file, and report the gene set matrix in STDOUT.
/media/Home_Raid1/kunzhang/bin/site2geneset_matrix.pl ../binary_count_matrices/160211_scTHS_R2_human_brain_nuclei_hg38_matrix_binary_cells_sites_pass_filter.csv geneSetOrder2description_lookup_table.txt > 160211_scTHS_R2_human_brain_nuclei_hg38_matrix_cells_geneset_pass_filt.txt
- Note that it's important to get all the files in the right directory.
- The two commands above were run successfully on genome-miner at this directory: /media/Home_Raid1/kunzhang/SingleCell/sc_THS_seq/gene_set_analysis
- All the gene sets and the associated bed files are in this directory: /media/Home_Raid1/kunzhang/SingleCell/sc_THS_seq/gene_set_analysis/Brain_genes