FourC object from scratch
0
0
Entering edit mode
@nicolas-servant-1466
Last seen 2.6 years ago
France

Hi Felix,

You're rigth, I move to the BioC list.

I tried your exemple, it works well.

In the exptData, do I really need all these fields ? or can I use an empty string for projectPath, fragmentDir, reSequence1 ... ?

Then, just to clarify some points ;

fc@colData is your experimental design, so in your exemple, you have 6 samples from the same viewpoint "testdata".

What about rowData ? if I'm correct, these are the measures (counts) per viewpoint ? so here you only have interacting loci per viewpoint ? Which make sense with the dim of the counts object (6 samples x 2 measures)

I'm just wondering if you can have multiple viewpoints in the same FourC object ? with potentially different number of measures ...

Thank you again,

Best wishes

N.

--------------------------------

Hi Nicolas,

this might be interesting to other users as well. So I would recommend we move the discussion to the Biocondoctor Support Forum if this is fine with you.

Have a look at the script below. This should explain all the steps you need to do to add a custom fragment reference, viewpoint information and counts.

Best regards,
Felix

--------------------------------

library(FourCSeq)

exptData <- SimpleList(projectPath=tempdir(),
                       fragmentDir="re_fragments",
referenceGenomeFile=system.file("extdata/dm3_chr2L_1-6900.fa",
package="FourCSeq"),
                       reSequence1="GATC",
                       reSequence2="CATG",
                       primerFile="",
                       bamFilePath="")

colData <- DataFrame(viewpoint = "testdata",
                     condition = factor(rep(c("WE_68h", "MESO_68h", "WE_34h"),
                                            each=2),
                                        levels = c("WE_68h", "MESO_68h", "WE_34h")),
                     replicate = rep(c(1, 2),
                                     3),
                     bamFile = "",
                     sequencingPrimer="")

fc <- FourC(colData, exptData)
fc


## this step can also be skipped by adding your fragment reference (GRanges)
##rowData(fc) <- your Fragment GRanges
fc <- addFragments(fc)
fc

## counts would by your HiC counts, here I take a random sample
cnts <- matrix(sample(1:10, prod(dim(fc)), replace = TRUE),
               nrow=nrow(fc))
cnts

## make sure they are integers otherwise you will get an error
typeof(cnts)

counts(fc) <- cnts
fc

## manually add viewpoint information because there is no primerfile
colData(fc)$chr = "chr2L"
colData(fc)$start = 6027
colData(fc)$end = 6878

## now you should be able to continue with the workflow

 


On 10/09/2015 06:34 PM, Nicolas Servant wrote:
Dear Felix,

I'm developing the HiTC package on Bioconductor to analyse Hi-C data.
I would like to make a test to see whether the method implemented in FourCSeq can be used on some specific Hi-C viewpoints (so 4C like information).
So actually, my question is quite simple, let's say that I have a GRanges objects with a count information extracted from HiTC, and that I would like to enter into FourCSeq to detect valid interactions.
I saw that the FourC object require many information about the pre-processing such as the BAM file, etc.
Could give any advices to create such object from a count table ?

Thank you very much
Best wishes
Nicolas

hic-c hitc fourcseq • 1.3k views
ADD COMMENT

Login before adding your answer.

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