separate MEDIPS.createSet required for each replicate? RE: using custom BSgenome with MEDIPS
2
0
Entering edit mode
Vining, Kelly ▴ 220
@vining-kelly-5029
Last seen 10.2 years ago
Hi Lukas, I have a question about the MEDIPS.createSet function with biological replicates. In the vignette, a MEDIPS.createSet command is issued for the first replicate of a set, and then other replicates are appended to make a list of MEDIPS SETs. Does that mean that one "set" equals one data set from one individual, so that I have to have a separate MEDIPS.createSet call for each biological replicate? This seems inefficient, because the BSgenome, uniq, extend etc. parameters must be repeated for each rep even though all of those parameters are the same across all replicates. Can I simply do something like this? Rep1_MeDIP = system.file("extdata", rep1.bam) Rep2_MeDIP = system.file("extdata", rep2.bam) Rep3_MeDIP = system.file("extdata", rep3.bam) AllReps = MEDIPS.createSet(c(Rep1_MEDIP, Rep2_MEDIP, Rep3_MEDIP, BSgenome=BSgenome) Thanks, --Kelly V. From: Lukas Chavez [mailto:lukas.chavez.mailings@googlemail.com] Sent: Wednesday, December 18, 2013 12:42 PM To: Vining, Kelly Cc: bioconductor@r-project.org Subject: Re: [BioC] using custom BSgenome with MEDIPS Hi Kelly, let us assume that the package name of your successfully created custom BSgenome for e.g. 'oryza sativa' is 'BSgenome.OryzaSativa' and that it is installed in your R environment using R CMD INSTALL <package>. First load your custom BSgenome object into your R session using library(BSgenome.OryzaSativa) Note, BSgenome.OryzaSativa will not appear in the list returned by available.genomes(). However, in case the library is loaded you should be able to immediately use it as usual in MEDIPS like library(MEDIPS) BSgenome= "BSgenome.OryzaSativa" MSet = MEDIPS.createSet(file="oryza.bam", BSgenome=BSgenome) Lukas On Wed, Dec 18, 2013 at 6:57 AM, Vining, Kelly <kelly.vining@oregonstate.edu<mailto:kelly.vining@oregonstate.edu>> wrote: ________________________________ From: Vining, Kelly Sent: Tuesday, December 17, 2013 10:58 AM To: 'Lukas Chavez' Cc: bioconductor@r-project.org<mailto:bioconductor@r-project.org> Subject: RE: [BioC] Question about MEDIPS extend parameter Hello BioC group, have created a BSgenome object for my genome of interest, and it is in my current working directory. I now want to use it with MEDIPS. How do I make it appear under >available.genomes()? Is it necessary for my custom genome to appear in this list for me to be able to use it with MEDIPS? Or is there a different method for accessing this object? Thanks much, --Kelly V. [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor@r-project.org<mailto:bioconductor@r-project.org> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor [[alternative HTML version deleted]]
BSgenome BSgenome MEDIPS BSgenome BSgenome MEDIPS • 1.5k views
ADD COMMENT
0
Entering edit mode
Lukas Chavez ▴ 570
@lukas-chavez-5781
Last seen 6.7 years ago
USA/La Jolla/UCSD
Hi Kelly, no, the suggested code will not work. Yes, you have to provide parameters for each bam file that you are going to import. In case these parameters are the same for each of your bam files, this procedure appears to be redundant. If you want to write more efficient code for such cases you might want to try something like: bam.files = "samples.txt" #contains path/file.bam per row for all bam files that belong to the same group, e.g. biological replicates bam.files = read.table(bam.files, stringsAsFactors=F) MSets_groupA = NULL for(i in 1:nrow(bam.files)){ MSets_groupA = c(MSets_groupA, MEDIPS.createSet(file=bam.files[i,1], extend=extend, window_size=window_size, BSgenome=BSgenome, uniq=uniq, chr.select=chr.select, paired=paired, sample_name=bam.files[i,1])) gc() } Lukas On Fri, Dec 20, 2013 at 12:34 PM, Vining, Kelly < Kelly.Vining@oregonstate.edu> wrote: > Hi Lukas, > > I have a question about the MEDIPS.createSet function with biological > replicates. In the vignette, a MEDIPS.createSet command is issued for the > first replicate of a set, and then other replicates are appended to make a > list of MEDIPS SETs. Does that mean that one “set” equals one data set from > one individual, so that I have to have a separate MEDIPS.createSet call > for each biological replicate? This seems inefficient, because the > BSgenome, uniq, extend etc. parameters must be repeated for each rep even > though all of those parameters are the same across all replicates. > > > > Can I simply do something like this? > > > > Rep1_MeDIP = system.file(“extdata”, rep1.bam) > > Rep2_MeDIP = system.file(“extdata”, rep2.bam) > > Rep3_MeDIP = system.file(“extdata”, rep3.bam) > > AllReps = MEDIPS.createSet(c(Rep1_MEDIP, Rep2_MEDIP, Rep3_MEDIP, > BSgenome=BSgenome) > > > > Thanks, > > --Kelly V. > > > > *From:* Lukas Chavez [mailto:lukas.chavez.mailings@googlemail.com] > *Sent:* Wednesday, December 18, 2013 12:42 PM > *To:* Vining, Kelly > *Cc:* bioconductor@r-project.org > *Subject:* Re: [BioC] using custom BSgenome with MEDIPS > > > > > Hi Kelly, > > let us assume that the package name of your successfully created custom > BSgenome for e.g. 'oryza sativa' is 'BSgenome.OryzaSativa' and that it is > installed in your R environment using R CMD INSTALL <package>. > > First load your custom BSgenome object into your R session using > > library(BSgenome.OryzaSativa) > > Note, BSgenome.OryzaSativa will not appear in the list returned by > available.genomes(). However, in case the library is loaded you should be > able to immediately use it as usual in MEDIPS like > > library(MEDIPS) > BSgenome= "BSgenome.OryzaSativa" > > MSet = MEDIPS.createSet(file="oryza.bam", BSgenome=BSgenome) > > Lukas > > > > > > On Wed, Dec 18, 2013 at 6:57 AM, Vining, Kelly < > Kelly.Vining@oregonstate.edu> wrote: > > > ________________________________ > From: Vining, Kelly > Sent: Tuesday, December 17, 2013 10:58 AM > To: 'Lukas Chavez' > Cc: bioconductor@r-project.org > Subject: RE: [BioC] Question about MEDIPS extend parameter > > Hello BioC group, > have created a BSgenome object for my genome of interest, and it is in my > current working directory. I now want to use it with MEDIPS. How do I make > it appear under > >available.genomes()? Is it necessary for my custom genome to appear in > this list for me to be able to use it with MEDIPS? Or is there a different > method for accessing this object? > > Thanks much, > --Kelly V. > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
Vining, Kelly ▴ 220
@vining-kelly-5029
Last seen 10.2 years ago
A follow-up question about an error message with MEDIPS.createSet command: when I load my reference genome, the create a MEDIPS set with one of my .bam files, I get the following error message: > library(BSgenome.Ptrichocarpa.Phytozome.v3) > budFall2_MEDIP = MEDIPS.createSet(file="accepted_hits_F2.bam", BSgenome=BSgenome, extend=300, uniq=TRUE, shift=0, window_size=1000) Reading bam alignment accepted_hits_F2.bam Total number of imported short reads: 46734466 Extending reads... Creating GRange Object... Extract unique regions... Number of unique short reads: 36603869 Error in as.environment(pos) : no item called "paste("package:", BSgenome, sep = "")" on the search list In addition: Warning message: In ls(paste("package:", BSgenome, sep = "")) : ?paste("package:", BSgenome, sep = "")? converted to character string I don't know how to interpret this. Is this error generated from GenomicRanges? Does it indicate that I've done something incorrectly, or is it safe to ignore it? Thanks again, --Kelly V. ________________________________________ From: bioconductor-bounces@r-project.org [bioconductor- bounces@r-project.org] on behalf of Vining, Kelly [Kelly.Vining@oregonstate.edu] Sent: Friday, December 20, 2013 12:34 PM To: 'Lukas Chavez' Cc: bioconductor at r-project.org Subject: [BioC] separate MEDIPS.createSet required for each replicate? RE: using custom BSgenome with MEDIPS Hi Lukas, I have a question about the MEDIPS.createSet function with biological replicates. In the vignette, a MEDIPS.createSet command is issued for the first replicate of a set, and then other replicates are appended to make a list of MEDIPS SETs. Does that mean that one "set" equals one data set from one individual, so that I have to have a separate MEDIPS.createSet call for each biological replicate? This seems inefficient, because the BSgenome, uniq, extend etc. parameters must be repeated for each rep even though all of those parameters are the same across all replicates. Can I simply do something like this? Rep1_MeDIP = system.file("extdata", rep1.bam) Rep2_MeDIP = system.file("extdata", rep2.bam) Rep3_MeDIP = system.file("extdata", rep3.bam) AllReps = MEDIPS.createSet(c(Rep1_MEDIP, Rep2_MEDIP, Rep3_MEDIP, BSgenome=BSgenome) Thanks, --Kelly V. From: Lukas Chavez [mailto:lukas.chavez.mailings@googlemail.com] Sent: Wednesday, December 18, 2013 12:42 PM To: Vining, Kelly Cc: bioconductor at r-project.org Subject: Re: [BioC] using custom BSgenome with MEDIPS Hi Kelly, let us assume that the package name of your successfully created custom BSgenome for e.g. 'oryza sativa' is 'BSgenome.OryzaSativa' and that it is installed in your R environment using R CMD INSTALL <package>. First load your custom BSgenome object into your R session using library(BSgenome.OryzaSativa) Note, BSgenome.OryzaSativa will not appear in the list returned by available.genomes(). However, in case the library is loaded you should be able to immediately use it as usual in MEDIPS like library(MEDIPS) BSgenome= "BSgenome.OryzaSativa" MSet = MEDIPS.createSet(file="oryza.bam", BSgenome=BSgenome) Lukas On Wed, Dec 18, 2013 at 6:57 AM, Vining, Kelly <kelly.vining at="" oregonstate.edu<mailto:kelly.vining="" at="" oregonstate.edu="">> wrote: ________________________________ From: Vining, Kelly Sent: Tuesday, December 17, 2013 10:58 AM To: 'Lukas Chavez' Cc: bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> Subject: RE: [BioC] Question about MEDIPS extend parameter Hello BioC group, have created a BSgenome object for my genome of interest, and it is in my current working directory. I now want to use it with MEDIPS. How do I make it appear under >available.genomes()? Is it necessary for my custom genome to appear in this list for me to be able to use it with MEDIPS? Or is there a different method for accessing this object? Thanks much, --Kelly V. [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at r-project.org<mailto:bioconductor at="" r-project.org=""> https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor [[alternative HTML version deleted]] _______________________________________________ Bioconductor mailing list Bioconductor at r-project.org https://stat.ethz.ch/mailman/listinfo/bioconductor Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT
0
Entering edit mode
Hi Kelly, No, you should not ignore the error message. I did not fully understand, if this happens for all of your bam files or only for one of your bam files? What do you have on your BSgenome variable, I cannot see this in your code? Lukas On Fri, Dec 20, 2013 at 1:00 PM, Vining, Kelly <kelly.vining@oregonstate.edu> wrote: > A follow-up question about an error message with MEDIPS.createSet command: > when I load my reference genome, the create a MEDIPS set with one of my > .bam files, I get the following error message: > > > library(BSgenome.Ptrichocarpa.Phytozome.v3) > > budFall2_MEDIP = MEDIPS.createSet(file="accepted_hits_F2.bam", > BSgenome=BSgenome, extend=300, uniq=TRUE, shift=0, window_size=1000) > Reading bam alignment accepted_hits_F2.bam > Total number of imported short reads: 46734466 > Extending reads... > Creating GRange Object... > Extract unique regions... > Number of unique short reads: 36603869 > Error in as.environment(pos) : > no item called "paste("package:", BSgenome, sep = "")" on the search list > In addition: Warning message: > In ls(paste("package:", BSgenome, sep = "")) : > âpaste("package:", BSgenome, sep = "")â converted to character string > > I don't know how to interpret this. Is this error generated from > GenomicRanges? Does it indicate that I've done something incorrectly, or is > it safe to ignore it? > > Thanks again, > --Kelly V. > ________________________________________ > From: bioconductor-bounces@r-project.org [ > bioconductor-bounces@r-project.org] on behalf of Vining, Kelly [ > Kelly.Vining@oregonstate.edu] > Sent: Friday, December 20, 2013 12:34 PM > To: 'Lukas Chavez' > Cc: bioconductor@r-project.org > Subject: [BioC] separate MEDIPS.createSet required for each replicate? RE: > using custom BSgenome with MEDIPS > > Hi Lukas, > I have a question about the MEDIPS.createSet function with biological > replicates. In the vignette, a MEDIPS.createSet command is issued for the > first replicate of a set, and then other replicates are appended to make a > list of MEDIPS SETs. Does that mean that one "set" equals one data set from > one individual, so that I have to have a separate MEDIPS.createSet call > for each biological replicate? This seems inefficient, because the > BSgenome, uniq, extend etc. parameters must be repeated for each rep even > though all of those parameters are the same across all replicates. > > Can I simply do something like this? > > Rep1_MeDIP = system.file("extdata", rep1.bam) > Rep2_MeDIP = system.file("extdata", rep2.bam) > Rep3_MeDIP = system.file("extdata", rep3.bam) > AllReps = MEDIPS.createSet(c(Rep1_MEDIP, Rep2_MEDIP, Rep3_MEDIP, > BSgenome=BSgenome) > > Thanks, > --Kelly V. > > From: Lukas Chavez [mailto:lukas.chavez.mailings@googlemail.com] > Sent: Wednesday, December 18, 2013 12:42 PM > To: Vining, Kelly > Cc: bioconductor@r-project.org > Subject: Re: [BioC] using custom BSgenome with MEDIPS > > > Hi Kelly, > let us assume that the package name of your successfully created custom > BSgenome for e.g. 'oryza sativa' is 'BSgenome.OryzaSativa' and that it is > installed in your R environment using R CMD INSTALL <package>. > > First load your custom BSgenome object into your R session using > library(BSgenome.OryzaSativa) > Note, BSgenome.OryzaSativa will not appear in the list returned by > available.genomes(). However, in case the library is loaded you should be > able to immediately use it as usual in MEDIPS like > > library(MEDIPS) > BSgenome= "BSgenome.OryzaSativa" > MSet = MEDIPS.createSet(file="oryza.bam", BSgenome=BSgenome) > Lukas > > > On Wed, Dec 18, 2013 at 6:57 AM, Vining, Kelly < > Kelly.Vining@oregonstate.edu<mailto:kelly.vining@oregonstate.edu>> wrote: > > ________________________________ > From: Vining, Kelly > Sent: Tuesday, December 17, 2013 10:58 AM > To: 'Lukas Chavez' > Cc: bioconductor@r-project.org<mailto:bioconductor@r-project.org> > Subject: RE: [BioC] Question about MEDIPS extend parameter > > Hello BioC group, > have created a BSgenome object for my genome of interest, and it is in my > current working directory. I now want to use it with MEDIPS. How do I make > it appear under > >available.genomes()? Is it necessary for my custom genome to appear in > this list for me to be able to use it with MEDIPS? Or is there a different > method for accessing this object? > > Thanks much, > --Kelly V. > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org<mailto:bioconductor@r-project.org> > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@r-project.org > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD REPLY

Login before adding your answer.

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