Skip to content

KevinZ的小窝

Menu
  • Home
  • Categories
Menu

scarHRD

Posted on 2025年 3月 10日2025年 3月 10日 by KevinZhou

1. 进入虚拟环境并安装sequenza

scarHRD需要sequenza的结果文件运行

conda activate sequenza

R
library(devtools)
install_github('sztup/scarHRD',build_vignettes = TRUE)
install_github('aroneklund/copynumber')

2. 构建按样本运行scarHRD的R脚本

EXAMPLE_scarHRD.R

library(copynumber)
library(sequenza)
library(scarHRD)
scar_score("/data02/zhangmengmeng/BPT/LCM-WES/sequenza/EXAMPLE.small.seqz.gz",reference = "grch38", seqz=TRUE)

运行scarHRD :
RunScarHRD.sh

#!/bin/bash

# Directory containing the .seqz.gz files
input_dir="../sequenza"

# Loop through each .seqz.gz file in the directory
for file in $input_dir/*small.seqz.gz; do
    # Extract the base name without path and extension
    sample_name=$(basename "$file" .small.seqz.gz)

    # Create the necessary commands and run them
    cp ./EXAMPLE_scarHRD.R $sample_name.R
    sed -i "s/EXAMPLE/$sample_name/" $sample_name.R
    Rscript $sample_name.R
    echo "$sample_name scarHRD ok"
done

合并结果文件

awk 'FNR==1 && NR!=1 {next} {print}' *.small.seqz._HRDresults.txt > All_HRDresults.txt
2025 年 3 月
一 二 三 四 五 六 日
 12
3456789
10111213141516
17181920212223
24252627282930
31  
« 2 月   4 月 »

俺家的猫~

胖达~

© 2025 KevinZ的小窝 |

粤ICP备2023017690号

|

粤公网安备 44010402003004号