sc_atac_feature_counting: generating the feature by cell matrix

View source: R/sc_atac_feature_counting.R

sc_atac_feature_countingR Documentation

generating the feature by cell matrix

Description

feature matrix is created using a given demultiplexed BAM file and a selected feature type

Usage

sc_atac_feature_counting(
  fragment_file,
  feature_input = NULL,
  bam_tags = list(bc = "CB", mb = "OX"),
  feature_type = "peak",
  organism = "hg38",
  cell_calling = "filter",
  sample_name = "",
  genome_size = NULL,
  promoters_file = NULL,
  tss_file = NULL,
  enhs_file = NULL,
  gene_anno_file = NULL,
  pheno_data = NULL,
  bin_size = NULL,
  yieldsize = 1e+06,
  n_filter_cell_counts = 200,
  n_filter_feature_counts = 10,
  exclude_regions = FALSE,
  excluded_regions_filename = NULL,
  output_folder = NULL,
  fix_chr = "none",
  lower = NULL,
  min_uniq_frags = 3000,
  max_uniq_frags = 50000,
  min_frac_peak = 0.3,
  min_frac_tss = 0,
  min_frac_enhancer = 0,
  min_frac_promoter = 0.1,
  max_frac_mito = 0.15,
  create_report = FALSE
)

Arguments

fragment_file

The fragment file

feature_input

The feature input data e.g. the .narrowPeak file for peaks of a bed file format

bam_tags

The BAM tags

feature_type

The type of feature

organism

The organism type (contains hg19, hg38, mm10)

cell_calling

The desired cell calling method; either cellranger, emptydrops or filter.

sample_name

The sample name to identify which is the data is analysed for.

genome_size

The size of the genome (used for the cellranger cell calling method)

promoters_file

The path of the promoter annotation file (if the specified organism isn't recognised).

tss_file

The path of the tss annotation file (if the specified organism isn't recognised).

enhs_file

The path of the enhs annotation file (if the specified organism isn't recognised).

gene_anno_file

The path of the gene annotation file (gtf or gff3 format).

pheno_data

The phenotypic data as a data frame

bin_size

The size of the bins

yieldsize

The yield size

n_filter_cell_counts

An integer value to filter the feature matrix on the number of reads per cell (default = 200)

n_filter_feature_counts

An integer value to filter the feature matrix on the number of reads per feature (default = 10).

exclude_regions

Whether or not the regions (specified in the file) should be excluded

excluded_regions_filename

The filename of the file containing the regions to be excluded

output_folder

The output folder

fix_chr

Whether chr should be fixed or not

lower

the lower threshold for the data if using the emptydrops function for cell calling

min_uniq_frags

The minimum number of required unique fragments required for a cell (used for filter cell calling)

max_uniq_frags

The maximum number of required unique fragments required for a cell (used for filter cell calling)

min_frac_peak

The minimum proportion of fragments in a cell to overlap with a peak (used for filter cell calling)

min_frac_tss

The minimum proportion of fragments in a cell to overlap with a tss (used for filter cell calling)

min_frac_enhancer

The minimum proportion of fragments in a cell to overlap with a enhancer sequence (used for filter cell calling)

min_frac_promoter

The minimum proportion of fragments in a cell to overlap with a promoter sequence (used for filter cell calling)

max_frac_mito

The maximum proportion of fragments in a cell that are mitochondrial (used for filter cell calling)

create_report

Logical value to say whether to create the report or not (default = TRUE).

Value

None (invisible 'NULL')

Examples

## Not run: 
sc_atac_feature_counting(
   fragment_file = fragment_file,
   cell_calling = "filter",
   exclude_regions = TRUE,
   feature_input = feature_file)

## End(Not run)    

LuyiTian/scPipe documentation built on Dec. 11, 2023, 8:21 p.m.