QSEA:Error in h(simpleError(msg, call))
1
0
Entering edit mode
kf • 0
@kf-24098
Last seen 8 days ago
SA

Hi,

I run into an error when I tried to use addLibraryFactors(qseaSet). Here is the full error message:

deriving TMM library factors for 66 samples
Error in h(simpleError(msg, call)) : 
  error in evaluating the argument 'x' in selecting a method for function 'as.matrix': sequences chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22, chrX, chrY have incompatible genomes:
  - in 'x': hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38, hg38
  - in 'y': BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.hg38, BSgenome.Hsapiens.UCSC.h

and here is my codes

library(qsea)
library("GenomicRanges")
library("BSgenome.Hsapiens.UCSC.hg38")
library(tidyverse)
library(rtracklayer)
library("BiocParallel")

# build meta dataframe
# Define the directory containing the bam files
dir_path <- "/mnt/data/kfang/HuiZ/cfDNA/dedup_bam_pe"
# List all bam files in the directory
bam_files <- list.files(path = dir_path, pattern = "\\.bam$", full.names = TRUE)
bam_df <- tibble(file_name = bam_files) %>%
  # Extract the sample name from the filename
  mutate(sample_name = basename(file_name) %>%
           str_remove("_dedup.bam")) %>%
  # Filter out test files with 'T' in the sample name
  filter(!str_detect(sample_name, "_T")) %>%
  # Determine the tumor status based on the sample name
  mutate(group = if_else(str_detect(sample_name, "^OVC"), "cancer", "health"))
bam_df <- as.data.frame(bam_df)
bam_df$sex <- 'female'

# load Loyfer's region
dna_methy_regions <- import(con = '/home/kfang/data/kfang/HuiZ/cfDNA/GSE186458_blocks.s207.hg38.4bp.noM.bed', format = "BED")
dna_methy_regions <- trim(dna_methy_regions)
# load 
qseaSet=createQseaSet(sampleTable=bam_df, 
                      BSgenome="BSgenome.Hsapiens.UCSC.hg38", 
                      Regions = dna_methy_regions)

register(MulticoreParam(workers=10))
qseaSet=addCoverage(qseaSet, paired=TRUE, parallel=TRUE)
qseaSet=addCNV(qseaSet, file_name="file_name",window_size=3e6, 
               paired=TRUE, parallel=TRUE, MeDIP=TRUE)
qseaSet=addLibraryFactors(qseaSet)

I wondered if anyone could shed some light on it?

Best, Kun

qsea • 235 views
ADD COMMENT
0
Entering edit mode
kf • 0
@kf-24098
Last seen 8 days ago
SA

genome(qseaSet@regions)<-"BSgenome.Hsapiens.UCSC.hg38" solve the problem

ADD COMMENT

Login before adding your answer.

Traffic: 388 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6