### Install Sequenza R Package Source: https://github.com/sztup/scarhrd/blob/master/README.md Installs the latest version of the Sequenza R package from Bitbucket. Ensure R and devtools are installed. ```r library(devtools) install_bitbucket('sequenza_tools/sequenza') ``` -------------------------------- ### Sequenza Workflow Example Source: https://github.com/sztup/scarhrd/blob/master/README.md Example command for using Sequenza utilities to call allele specific copy number profile from BAM files. This step precedes scarHRD analysis. ```bash sequenza-utils bam2seqz -gc /reference/GRCh38.gc50Base.txt.gz --fasta /reference/GRCh38.d1.vd1.fa -n /data/normal.bam --tumor /data/tumor.bam -C chr1 chr2 chr3 chr4 chr5 chr6 chr7 chr8 chr9 chr10 chr11 chr12 chr13 chr14 chr15 chr16 chr17 chr18 chr19 chr20 chr21 chr22 chr23 chr24 chrX | sequenza-utils seqz_binning -w 50 -s - | gzip > /results/tumor_small.seqz.gz ``` -------------------------------- ### Install scarHRD R Package Source: https://github.com/sztup/scarhrd/blob/master/README.md Installs the scarHRD R package from GitHub using devtools. Set build_vignettes to TRUE to include vignettes. ```r library(devtools) install_github('sztup/scarHRD',build_vignettes = TRUE) ``` -------------------------------- ### Install copynumber R Package for GRCh38 Source: https://github.com/sztup/scarhrd/blob/master/README.md Installs a modified version of the copynumber R package from GitHub, necessary for running scarHRD on GRCh38. ```r library(devtools) install_github('aroneklund/copynumber') ``` -------------------------------- ### Read Sequenza Input File Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.md Reads a Sequenza-formatted segmentation file into an R data frame. This is an example of preparing input data for scarHRD. ```r example1<-system.file("extdata", "test1.small.seqz.gz", package = "scarHRD") a<-read.table(example1, header=T) head(a) ``` -------------------------------- ### Read Simplified Input File Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.md Reads a simplified segmentation file into an R data frame. This example demonstrates handling a different input format for scarHRD. ```r example2<-system.file("extdata", "test1.small.seqz.gz", package = "scarHRD") a<-read.table(example2, header=T) head(a) ``` -------------------------------- ### Run scarHRD on Mouse Genomes Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.md Demonstrates how to specify a mouse reference genome for scarHRD analysis. Note the limitations in evaluating HRD scores for mouse genomes due to chromosomal structure and isogenic models. ```R scarHRD(referrence="mouse") ``` -------------------------------- ### Calculate HRD Score from Text File Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.html Calculates the HRD score using a .txt file. Ensure the 'grch38' reference genome is specified and seqz is set to FALSE. ```R scar_score("/examples/test2.txt",reference = "grch38", seqz=FALSE) ``` -------------------------------- ### Read and Display Data Table Source: https://github.com/sztup/scarhrd/blob/master/README.md Reads a data table from a specified file path and displays the first few rows. This is useful for initial data inspection. ```r a<-read.table("/examples/test2.txt", header=T) head(a) ``` -------------------------------- ### Read scarHRD Input File Source: https://github.com/sztup/scarhrd/blob/master/README.md Reads a gzipped Sequenza segmentation file into an R data frame. This file serves as input for the scarHRD function. ```r a<-read.table("/examples/test1.small.seqz.gz", header=T) head(a) ``` -------------------------------- ### Calculate HRD Score from Seqz File Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.html Calculates the HRD score using a .seqz.gz file. Ensure the 'grch38' reference genome is specified. ```R scar_score("/examples/test1.small.seqz.gz",reference = "grch38", seqz=TRUE) ``` -------------------------------- ### Calculate scarHRD scores with different file types Source: https://github.com/sztup/scarhrd/blob/master/scarHRD.md Use scar_score to calculate HRD-LOH scores. Specify seqz=TRUE for .small.seqz.gz files and seqz=FALSE for .txt files. Ensure the reference genome is correctly set. ```r scar_score("/examples/test1.small.seqz.gz",reference = "grch38", seqz=TRUE) scar_score("/examples/test2.txt",reference = "grch38", seqz=FALSE) ``` -------------------------------- ### Calculate HRD Score from Text File Source: https://github.com/sztup/scarhrd/blob/master/README.md Calculates the scarHRD score using a plain text file. Set seqz to FALSE for non-seqz formatted files. This function determines HRD-LOH, LST, and TAI scores. ```r scar_score("F:/Documents/scarHRD/examples/test2.txt",reference = "grch38", seqz=FALSE) ``` -------------------------------- ### Calculate HRD Score from Seqz File Source: https://github.com/sztup/scarhrd/blob/master/README.md Calculates the scarHRD score using a .seqz.gz file. Ensure the correct reference genome is specified. This function preprocesses the data and determines HRD, LST, and TAI scores. ```r library("scarHRD") scar_score("F:/Documents/scarHRD/examples/test1.small.seqz.gz",reference = "grch38", seqz=TRUE) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.