Comments (14)
I think leaving the "uniques" class as a named integer vector might be fine?
However, a class for the object returned by derepFastq (list of uniques,
quals, map) could be useful. Class "derep"?
And dada return should have a class. Class "dada".
On Tue, Jun 16, 2015 at 10:57 AM, Paul J. McMurdie <[email protected]
wrote:
Please comment your preferences on the class names O:-)... I was thinking
"uniques" and "dada" would work.This solves at least two problems:
- Make sure user understands what their uniques list or dada list is,
control some aspects about what to do with it- When these objects get printed to screen, it currently "explodes"
the console because there's so much good stuff in there. Need to summarize
that good stuff in a useful way—
Reply to this email directly or view it on GitHub
#20.
from dada2.
Sounds good. The list returned by derepFastq
is what I meant. "derep" is fine with me. I agree, no reason to define a class for the "uniques" vector at the moment.
from dada2.
dada return is classed "dada", derepFastq is classed "derep"
Joey, how do we implement print.dada and print.derep?
from dada2.
Great, so I assume this means these have formal class definitions now?
print.derep
is the old "S3" way of doing it, which BioC won't like.
We'll need to define new "print" and "show" S4 methods that extend the S4 base generics for same.
from dada2.
No just S3 style (class(return.val) <- dada).
Will BioC accept S3 classes even if it doesn't like them?
On Thu, Aug 6, 2015 at 12:33 PM, Paul J. McMurdie [email protected]
wrote:
Great, so I assume this means these have formal class definitions now?
print.derep is the old "S3" way of doing it, which BioC won't like.
We'll need to define new "print" and "show" S4 methods that extend the S4
base generics for same.—
Reply to this email directly or view it on GitHub
#20 (comment).
from dada2.
If there is a standard S4 approach, and there is in this case, then they would kick it back and ask you to change it. I can tackle this. I'll migrate whatever you have currently for printing to the S4 method.
from dada2.
I added nothing except class(dada.return) <- "dada" and
class(derepFastq.return) <- "derep"
Adding a stub print function would be great, can fill in later.
On Thu, Aug 6, 2015 at 2:06 PM, Paul J. McMurdie [email protected]
wrote:
If there is a standard S4 approach, and there is in this case, then they
would kick it back and ask you to change it. I can tackle this. I'll
migrate whatever you have currently for printing to the S4 method.—
Reply to this email directly or view it on GitHub
#20 (comment).
from dada2.
Yeah, those are not S4 classes either. No worries. I can get this up to snuff.
from dada2.
How difficult is basic inspection and use of S4 classes going to be?
One of the nice things about these objects is that they are a simple
inspectable list. S4 classes seem to be more unwieldy generally.
On Thu, Aug 6, 2015 at 2:14 PM, Paul J. McMurdie [email protected]
wrote:
Yeah, those are not S4 classes either. No worries. I can get this up to
snuff.—
Reply to this email directly or view it on GitHub
#20 (comment).
from dada2.
inspection?
function
str
is a workaround
otherwise you need to know the slots....
On Thu, Aug 6, 2015 at 4:34 PM, benjjneb [email protected] wrote:
How difficult is basic inspection and use of S4 classes going to be?
One of the nice things about these objects is that they are a simple
inspectable list. S4 classes seem to be more unwieldy generally.On Thu, Aug 6, 2015 at 2:14 PM, Paul J. McMurdie <[email protected]
wrote:
Yeah, those are not S4 classes either. No worries. I can get this up to
snuff.—
Reply to this email directly or view it on GitHub
#20 (comment).—
Reply to this email directly or view it on GitHub
#20 (comment).
Susan Holmes
Professor, Statistics and BioX
John Henry Fellow in Undergraduate Education
Sequoia Hall,
390 Serra Mall
Stanford, CA 94305
http://www-stat.stanford.edu/~susan/
from dada2.
I would rather not add S4 structure if we don't have to.
The only things we want from classing these returns is (1) being able to
pass them to dada2 functions, and (2) being able to have a generic print
function that doesn't spam the user to death.
On Thu, Aug 6, 2015 at 4:44 PM, spholmes [email protected] wrote:
inspection?
function
str
is a workaround
otherwise you need to know the slots....On Thu, Aug 6, 2015 at 4:34 PM, benjjneb [email protected] wrote:
How difficult is basic inspection and use of S4 classes going to be?
One of the nice things about these objects is that they are a simple
inspectable list. S4 classes seem to be more unwieldy generally.On Thu, Aug 6, 2015 at 2:14 PM, Paul J. McMurdie <
[email protected]wrote:
Yeah, those are not S4 classes either. No worries. I can get this up to
snuff.—
Reply to this email directly or view it on GitHub
#20 (comment).—
Reply to this email directly or view it on GitHub
#20 (comment).Susan Holmes
Professor, Statistics and BioX
John Henry Fellow in Undergraduate Education
Sequoia Hall,
390 Serra Mall
Stanford, CA 94305
http://www-stat.stanford.edu/~susan/—
Reply to this email directly or view it on GitHub
#20 (comment).
from dada2.
I agree, let's avoid killing users via accidental spam.
It's straightforward to extend the "list" class as a new S4 object. Since downstream functions interact with the typical $
operator, I don't think it would require any other code changes.
I agree that converting each top-level list element to a formal slot feels like overkill in this case, and I'll try to do what I just proposed as a simple lightweight workaround.
from dada2.
@benjjneb The "S4-migrate" branch linked above shows this very light-weight S4 method. I also narrowed the namespace to @importFrom pacakge method
in all cases except ggplot2.
To focus on the show method, look at the show-methods.R
file, and also the allClasses.R
file.
The derepFastq
and dada
functions were trivially modified to return the respective S4 object (which is really just a list, but don't tell BioC ;-) )
from dada2.
p.s. let me know if you like this and I'll merge into the master (or you can). Feel free to modify the show method further. I didn't really do anything to summarize the "dada"
object yet. The "derep"
object has a pretty nice summary though.
from dada2.
Related Issues (20)
- error regarding addSpecies and assignSpecies command in DADA2 HOT 3
- Are these error plots okay? HOT 2
- Denoising amplicons from multilocus PCRs
- indels at ends of DNA sequence HOT 2
- DADA2-formatted reference database for SILVA 138.2 HOT 3
- Issue regarding merging data HOT 5
- A theoretically better approach to filtering, trimming & merging?
- Per Ben's request: Please improve "Assign Taxonomy" Tutorial Language
- Error "Can't stage file https://files.plutof.ut.ee:" Download of DADA2 ITS fungi-all fail HOT 2
- quality score plot DADA2 HOT 3
- Weird error plots on merged reads HOT 2
- Error Estimation Issues HOT 5
- `fastp` before `dada2` HOT 4
- Merging two datasets trimmed with different criteria HOT 4
- Leptospira species targeting secY gene (instead of 16S) using AmpSeq method? HOT 10
- Combining ASV data of same samples from two different run HOT 5
- Low diversity in the beginning of the sequence & DADA2 impacts HOT 3
- High number of bimeras/ messy error plots? HOT 2
- Should you trim samples individually or together? HOT 4
- Problem with Taxonomy Assignment DADA2 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dada2.