[BioC] ChiPseq input files?

Jonathan Cairns Jonathan.Cairns at cancer.org.uk
Mon Sep 17 17:35:56 CEST 2012


Hi John,

I'm afraid I don't understand your question. It sounds like you are trying to bin the reads? This shouldn't be necessary, as both packages do this for you. Was that your intended query?

Jonathan
________________________________________
From: John linux-user [johnlinuxuser at yahoo.com]
Sent: 17 September 2012 15:59
To: Jonathan Cairns; bioconductor at r-project.org
Subject: Re: [BioC] ChiPseq input files?

Hi Jonathan,

Thanks for your response and codes. That saves me a lot of time to look over the webs. Your answers are great!  but if I try to create a table using python or other scripts and then input the table to R for statistics, how can I decide the range (e.g. start and end) when I count the reads in each position across the chromosomes/genome? Can you give me more suggestions? Thanks.

Best,

John

________________________________
From: Jonathan Cairns <Jonathan.Cairns at cancer.org.uk>
To: John linux-user <johnlinuxuser at yahoo.com>; "bioconductor at r-project.org" <bioconductor at r-project.org>
Sent: Monday, September 17, 2012 10:38 AM
Subject: RE: [BioC] ChiPseq input files?

Hi John,

I would try the Rsamtools package. You'd need something like this (warning, untested code):

library(Rsamtools)

bamFile = "path/to/Bamfile.bam"
p <- ScanBamParam(what=c("rname", "strand", "pos", "qwidth"))
bam <- scanBam(bamFile, param=p)[[1]]

BayesPeak accepts data.frames or RangedDatas. I would suggest the easiest thing to do is construct a RangedData:

library(IRanges)
IR <- IRanges(start=bam[["pos"]], width=bam[["qwidth"]])
x <- RangedData(ranges=IR, strand=bam[["strand"]], space=bam[["rname"]])

chipseq accepts GRanges by preference:

library(GenomicRanges)
y <- GRanges(seqnames=bam[["rname"]], ranges=IR, strand=bam[["strand"]])

There may be a faster/cleverer way of doing it, but this should work.

Jonathan


________________________________________
From: bioconductor-bounces at r-project.org<mailto:bioconductor-bounces at r-project.org> [bioconductor-bounces at r-project.org<mailto:bioconductor-bounces at r-project.org>] On Behalf Of John linux-user [johnlinuxuser at yahoo.com<mailto:johnlinuxuser at yahoo.com>]
Sent: 17 September 2012 15:04
To: bioconductor at r-project.org<mailto:bioconductor at r-project.org>
Subject: [BioC] ChiPseq input files?

Hi,

I am wondering how to simply prepare the input files for R BayesPeak and chipseq packages, assuming BAM files already generated by BWA and samtools.  Thanks.

John
        [[alternative HTML version deleted]]


NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose.

We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you.
Cancer Research UK
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)
A company limited by guarantee.  Registered company in England and Wales (4325234) and the Isle of Man (5713F).
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.



NOTICE AND DISCLAIMER
This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose. 

We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you. 
Cancer Research UK
Registered charity in England and Wales (1089464), Scotland (SC041666) and the Isle of Man (1103)
A company limited by guarantee.  Registered company in England and Wales (4325234) and the Isle of Man (5713F).
Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD.



More information about the Bioconductor mailing list