extract_insert_size: Extract Insert size from SampleBam

View source: R/get_fragment_profile.R

extract_insert_sizeR Documentation

Extract Insert size from SampleBam

Description

Extract Insert size from SampleBam

Usage

extract_insert_size(readbam_bin, maximum_length = 600, minimum_length = 20)

Arguments

readbam_bin

SampleBam Object

maximum_length

Int; Maximum length of fragment. cfDNA fragment longer than this value will not be considered; Default 600

minimum_length

Int; Minimum length of fragment. cfDNA fragment shorter than this value will not be considered; Default 20

Value

Numeric Vector; Insert size of given sample

Examples

### Loading example SampleBam file
example_file <-  system.file("extdata","example_patientcfDNA_SampleBam.RDS",package = "cfdnakit")
sample_bambin <- readRDS(example_file)
extract_insert_size(sample_bambin)
### Extract only insert size of fragment having specific size
extract_insert_size(sample_bambin,maximum_length=500, minimum_length = 50)

Pitithat-pu/cfDNAkit documentation built on Oct. 2, 2024, 7:31 a.m.