Hi,
I have a problem using FourCseq, which I don't really understand. i am trying to use the tool to my data of Arabidopsis Thaliana . i have 2 replications for 2 conditions everything seems to work normal but when i am using the countFragmentOverlaps either i have 0 counts and the counts files are emplty but without any error (reference: Arabidopsis_thaliana.TAIR10.24.dna.genome.fa) or if i use another version of reference genome (Arabidopsis_thaliana.TAIR10.27.dna.toplevel.fa)i have a warning like :
reading bam files calculating overlaps Warning messages: 1: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 2: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 3: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 4: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 5: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 6: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 7: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.) 8: In .Seqinfo.mergexy(x, y) : The 2 combined objects have no sequence levels in common. (Use suppressWarnings() to suppress this warning.)
the result in the first case is an assay like that :
fcar
class: FourC
dim: 37838 4
exptData(7): projectPath fragmentDir ... primerFile bamFilePath
assays(3): counts countsLeftFragmentEnd countsRightFragmentEnd
rownames: NULL
rowRanges metadata column names(4): leftSize rightSize leftValid rightValid
colnames(4): FLC_condition_1_1 FLC_condition_1_2 FLC_condition_2_1 FLC_condition_2_2
colData names(21): viewpoint condition ... mappedReads mappingRatio
> assays(fcar)
List of length 3
names(3): counts countsLeftFragmentEnd countsRightFragmentEnd
> head(assay(fcar, "counts"))
FLC_condition_1_1 FLC_condition_1_2 FLC_condition_2_1 FLC_condition_2_2
[1,] 0 0 0 0
[2,] 0 0 0 0
[3,] 0 0 0 0
[4,] 0 0 0 0
[5,] 0 0 0 0
[6,] 0 0 0 0
Why the tool is not able to find overlaprs ? Am i doing something wrong ???
Here is my code:
library(FourCSeq)
referenceGenomeFile = system.file("extdata/Arabidopsis_thaliana.TAIR10.24.dna.genome.fa",package ="FourCSeq")
referenceGenomeFile
bamFilePath = system.file ("extdata/bam", package="FourCSeq")
bamFilePath
primerFile = system.file ("extdata/primerAGATCT.fa",package="FourCSeq")
primerFile
writeLines(readLines(primerFile))
exptData <- SimpleList (projectPath="exampleData",
fragmentDir="re_fragments",
referenceGenomeFile = referenceGenomeFile,
reSequence1 = "AGATCT",
reSequence2 = "CATG",
primerFile = primerFile ,
bamFilePath = bamFilePath)
exptData
colData <- DataFrame (viewpoint = "FLC",
condition = factor(rep(c("condition_1","condition_2"),
each=2),
levels = c("condition_1","condition_2")),
replicate = rep(c(1,2), 2),
bamFile = c("INDEX_1_3_2misTAIR10sorted.bam",
"INDEX_1_4_2misTAIR10sorted.bam",
"INDEX_1_5_2misTAIR10sorted.bam",
"INDEX_1_6_2misTAIR10sorted.bam"),
sequencingPrimer="first")
colData
fcar <- FourC(colData, exptData)
fcar
fcar<-addFragments(fcar, minSize = 20, filter = TRUE, save =TRUE )
fcar
rowRanges(fcar)
findViewpointFragments(fcar)
fcar <- addViewpointFrags(fcar)
fcar <- countFragmentOverlaps(fcar, trim=6, minMapq=-1, shift=0)
fcar
fcar <- combineFragEnds(fcar)
fcar
assays(fcar)
head(assay(fcar, "counts"))

The files in your example (Arabidopsis_thaliana.TAIR10.24.dna.genome.fa, primerAGATCT.fa) are not part of the FourCSeq package, and I'm a bit confused how they ended up in the data directories of the package. If you can specify where this data is coming from, it will be easier to reproduce your issue.