Error in fragEnds[, 1] : incorrect number of dimensions while using printWigFile function in Basic4Cseq package
0
0
Entering edit mode
koushik • 0
@koushik-24906
Last seen 3.0 years ago
United States

Dear All, I am currently using the Basic4Cseq package to analyze my 4C data.. the analysis pipeline seems fine.. I used two "4-based" cutters to generate my library and my goal to generate a wig file to find trans interactions and further downstream analysis.. the following is the pipeline I used

## Bam to Wig using Basic4Cseq
library(Basic4Cseq)

library(BSgenome.Hsapiens.UCSC.hg19)
createVirtualFragmentLibrary(chosenGenome = Hsapiens, firstCutter = "gatc",
                               secondCutter = "ctag", readLength = 75, libraryName = "human_DpnII_Bfal.csv")

library(GenomicAlignments)

## MCF7
libraryFile <- file.path("human_DpnII_Bfal.csv")
bamfile <- file.path("MCF7-DB.bam")
mcf7reads <- readGAlignments(bamfile)  ### path to bam file
mcf7reads


pointsOfInterestFile <- file.path("demo_hg19.bed.txt")
liverPoints<-readPointsOfInterestFile(pointsOfInterestFile)
liverPoints

l3mbtl3Data <- Data4Cseq(viewpointChromosome = "chr11", viewpointInterval = c(61908390, 61908490), 
                         readLength = 75, pointsOfInterest = liverPoints, rawReads = mcf7reads)
l3mbtl3Data

rawFragments(l3mbtl3Data) <- readsToFragments(l3mbtl3Data, libraryFile)
l3mbtl3Data

# normalization of near-cis data
nearCisFragments(l3mbtl3Data) <- normalizeFragmentData(l3mbtl3Data)
head(nearCisFragments(l3mbtl3Data))

getReadDistribution(l3mbtl3Data, useFragEnds = TRUE, outputName = "")
printWigFile(l3mbtl3Data, wigFileName = "MCF7_DB_basic4cseq.wig")

the following report summarise the analysis results:

>getReadDistribution(l3mbtl3Data, useFragEnds = TRUE, outputName = "")
[1] "total reads: 6462494"
[1] "reads on the viewpoint chromosome: 4109392 (63.59% of total reads)"
[1] "reads in the viewpoint region: 3517037 (54.42% of total reads)"
[1] "covered fragment ends in the viewpoint region: 82.7%"

But while implementing

> printWigFile(l3mbtl3Data, wigFileName = "MCF7_DB_basic4cseq.wig")

getting an error Error in fragEnds[, 1] : incorrect number of dimensions

The same pipeline code worked for some other samples with the same format/file type but getting the above error while dealing with others. Can anyone please have any idea how to solve this?

Thank you!

GenomicInteractions Basic4Cseq DNASeq GenomicFiles • 753 views
ADD COMMENT

Login before adding your answer.

Traffic: 521 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