Comments (8)
I guess you refer to CompoundDb-methods.R file? Following Bioconductor's design guide classes should be put into a AllClasses.R, functions for a class into -functions.R and its methods into a -methods.R. I was a little lazy here, so I put the class along with its functions into CompoundDb.R. I did start to put methods into Compd-methods.R to keep them separately from the functions and to avoid getting a very large CompDb.R file.
Re duplication of methods and functions. Yes I tend to define all the functionality in internal functions and to keep the methods simple, just calling the internal functions. Package-internally I would then only call the functions. Function calls are slightly faster than method calls. Also I try to avoid having large functions, but split as much of the functionality into smaller chunks and put that into functions. That makes it easier to maintain and keep it bug-free (also you can define the unit tests for each small function, so shield better against unexpected behavior).
Generally, to don't get lost in code, you should only look at the exported functions first.
Generally I do try to use functions instead of methods (see also lgatto/MSnbase#111), but sometimes it's worth defining a method to better integrate with existing methods. The dbconn
is one example. All annotation resources supporting the AnnotationDbi
interface define it, so Bioconductor people know they can call dbconn
to get the database interface.
What do you mean with
dbconn seems to need @nord ?
from compounddb.
I mean @noRD
to keep it out of the list of functions...
My point was not about the code. But about the list of functions in the index.
It's the duplication of the functions in that list that I would like to avoid. It is confusing and gets long very fast.
I don't know if there is also a way to have more descriptive titles in the list.
from compounddb.
XCMS is suffering heavy from this:
from compounddb.
and poor @ nord that we mentioned/linked here :)
Yes, it's ugly and a big issue - especially in xcms. I'll have a look what I can do... do you have an idea to get rid of this?
from compounddb.
AFAIK each function/methods needs to be documented/have an \alias{}
in an man page. So, using @noRd
doesn't really help. Not adding an alias
helps - but then R CMD check
complains that the method is not documented.
from compounddb.
OK, removed the alias for dbconn
and that worked. But I can not remove the alias
for show
.
from compounddb.
I tried yesterday playing around with the usual tricks:
@keywords internal
. (no use since it will apply to all grouped functions)@noRD
,@rdname
and@describeIn
- Removing alias for the methods
Removing the aliases work except that I don't think I figured why but dbconn-method
only disappeared when I did @noRD
on it.
I checked now again and check
is not happy if I just do that. :(
I cannot find a combination of settings to fix this. really annoying... Google also failed me.
from compounddb.
Perhaps "Documenting classes, generics and methods" in https://cran.r-project.org/web/packages/roxygen2/vignettes/rd.html have some hint I am unable to decipher.
More that seems related: https://stackoverflow.com/questions/7356120/how-to-properly-document-s4-methods-using-roxygen2
from compounddb.
Related Issues (20)
- Create an IonDb with all theoretical adducts for a CompoundDb
- Function to combine/concatenate CompDb databases
- Add an insertCompound function HOT 1
- Availability of functions to create empty CompDB and insert and delete compounds HOT 2
- Seeking suggestions for database development (HMDB version 5) HOT 2
- Pass skipErrors to read.SDFset through compound_tbl_sdf? HOT 4
- Replace mass2mz and mz2mass with the ones from MetaboCoreUtils
- Rename table "compound" into "ms_compound"
- Implement a StandardsDb that extends CompoundDb HOT 11
- Update the MsBackendCompDb HOT 1
- insertIon method HOT 4
- non integer msLevel values HOT 3
- Add possibility to delete (inserted or existing) ions or MS/MS spectra
- Prepare for Bioconductor submission HOT 3
- Arbitrary columns in insertIon
- Transfer of CompoundDb
- Support import from MoNa MSP files HOT 1
- custom Db - spectra and ion Db questions HOT 2
- Issue with GitHub install of CompoundDb HOT 3
- mass2mz method for CompDb HOT 6
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 compounddb.