Package: epiout
EpiOutInstallInstallepioutand its companion packages with:pipinstallepiouthic-strawis optional dependency to annotate chromatin interactions withEpiAnnot:conda install -c bioconda hic-straworconda install -c conda-forge curl
pip install hic-strawand another optional dependency isonnxruntimeto predict aberrant gene expression from aberrant chromatin accessibility:pip install onnxruntimeUsageCounting chromatin accessibility from ATAC-seq data withEpiCount:epicount--bed{bed}--alignments{alignments.tsv}--output_prefix{output_prefix}--cores{threads}wherebedis a bed file of genomic regions to count accessibility,alignments.tsvis a tab-delimited file of ATAC-seq alignments,output_prefixis the prefix of output files, andthreadsis the number of threads to use. Seeepicount --helpfor more details.alignments.tsvlists bam files of ATAC-seq alignments, one file per line, with the following columns:path/a.bam
path/b.bam
path/c.bamFile names are used as sample names in the output files. Alternatively, you can use a tab-delimited file with the following columns to specify sample names:path/a.bam	sample_a
path/b.bam	sample_b
path/c.bam	sample_cEpiCountwill generate three files:prefix.counts.parquet,prefix.raw_counts.parquet,prefix.bed. The parquet files containing the count matrix. Theraw_countsfile is not filtered for replication andcountsfile is filtered.bedfile containing replicated the genomic regions across samples. The parquet file can be loaded withpandasand looking like:df=pd.read_parquet('output_prefix.parquet')dfEpiOutTo call outliers with EpiOut, run:epiout--count_table{prefix.counts.parquet}--output_prefix{output_prefix}--cores{threads}wherecount_tableis the output ofEpiCount,output_prefixis the prefix of output files, andthreadsis the number of threads to use. Seeepiout --helpfor more details. You can pass ordinary csv file of count matrix to--count_tableargument where rows are genomic regions and columns are samples.Output ofEpiOutisprefix.h5adfile andprefix.results.csv. h5ad file contains statistics about outliersfromepioutimportEpiOutResultresult=EpiOutResult.load('result.h5ad')# outliers as dataframeresult.outlier# log adjusted p-values as dataframeresult.log_padj# results as dataframe alternatively read results.csv filedf_results=result.results()# Visualize outliers or accessibile regionsresult.qq_plot('chr1:100-200')result.plot_counts('chr1:100-200')result.plot_volcona('chr1:100-200')See the documentation ofEpiOutResultfor more details.EpiOut performs hyperparameter optimization to tune optimal bottleneck size of autoencoder. To specifiy the bottleneck size, use--bottleneck_sizearguments.EpiAnnotepiannot_create--tissue{tissueorcelllinename}--output_prefix{output_prefix}wheretissueis the name of tissue or cell line avaliable on ENCODE to fetch,output_prefixis the prefix of output files whereconfig.yamlwill be created and contains metadata and related files will be downloaded. Seeepiannot_create --helpfor more details:Also you can check avaliabletissuesorcell lines:epiannot_listTo annotate accesible regions and chromatin interactions withEpiAnnot, run:epiannot--bed{bed}--gtf{gtf}--counts{prefix.h5ad}--chrom_sizes{chrom_sizes}--output_prefix{output_prefix}wherebedis a bed file of genomic regions to annotate,gtfis a gtf file of gene annotations,countsis the output ofEpiOutin h5ad file format orcountsobtained with EpiCount,chrom_sizesis a file of chromosome sizes can be generated with pyfaidx from fasta file, andoutput_prefixis the prefix of output files. Seeepiannot --helpfor more details.Output containsprefix.annotation.csvannotation of genomic regions based on histone marks provided in the config file,prefix.gtf.csvannotation on regions based on the proximity to genes,prefix.interaction.csvannotation of chromatin interactions between regions andprefix.genes.csvindicating that poteintial effected by the aberrant chromatin accessibility.You can create annotation with your custom config file:config.yamlH3K27ac:-ENCFF817IVB.bed.gz-ENCFF916FML.bed.gzH3K4me1:-ENCFF456GWH.bed.gzH3K4me3:-ENCFF867WVM.bed.gzyour_custom_mark:-a.bedhic:-ENCFF311CLH.hic-ENCFF787ZVA.hicThey keys in the config file are the names of histone marks and the values are the list of bed files of histone marks. The config file can also contain a list of hic files to annotate chromatin interactions. Hic data is optional. The config file can be created withepiannot_createcommand or you can use your config file. To call promoter, active and poised enhancers please make sure that you name your histone marks asH3K4me3,H3K27ac, andH3K4me1respectively. An other histone mark or bed files can be used annotate regions. Outputprefix.annotation.csvwill have a column for each key in the config file and will incidate if accesible region overlaps with the annotation source.