Skip to Content
Python APIPeak BasedHiChIPPipeline

HiChIPPipeline

class chr3d.peak_based.hichip_pipline.HiChIPPipeline( genome_index: str, linkers: list, threads: int = 4, mapq: int = 30, genome_size: str = 'hs', qvalue: float = 0.05, alpha: float = 0.05, min_score: int = 20, min_tag: int = 15, max_tag: int = 40, )

End-to-end HiChIP pipeline orchestrator.

Similar to ChIA-PET pipeline but optimized for HiChIP data with restriction fragment-based purification.

Parameters

ParameterTypeDescription
genome_indexstrPath to BWA-indexed genome FASTA
linkerslistOne or more linker sequences to filter against
threadsintCPU threads for BWA / samtools / linker filtering (default: 4)
mapqintMinimum mapping quality for BAM filtering (default: 30)
genome_sizestrMACS3 genome size string (default: 'hs')
qvaluefloatMACS3 q-value cutoff (default: 0.05)
alphafloatFDR significance threshold (default: 0.05)
min_scoreintMinimum parasail alignment score (default: 20)
min_tagintMinimum tag length after linker removal (default: 15)
max_tagintMaximum tag length after linker removal (default: 40)

Methods

run

def run( self, fastq_r1: str, fastq_r2: str, output_dir: str, sample_id: str, fragment_bed: str, ) -> Dict[str, Any]

Run the full HiChIP pipeline.

Parameters:

ParameterTypeDescription
fastq_r1strPath to R1 FASTQ file
fastq_r2strPath to R2 FASTQ file
output_dirstrOutput directory
sample_idstrSample identifier
fragment_bedstrPath to restriction fragment BED file

Example:

from chr3d.peak_based.hichip_pipline import HiChIPPipeline pipeline = HiChIPPipeline( genome_index="/data/genomes/hg38.fa", linkers=["GATCGATC"], # MboI site threads=24, mapq=30, ) stats = pipeline.run( fastq_r1="sample_R1.fastq.gz", fastq_r2="sample_R2.fastq.gz", output_dir="hichip_results/", sample_id="sample1", fragment_bed="hg38_MboI_fragments.bed", )
Last updated on