Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MRcoefs/table/fulltable: eff='x' arg not effective? #47

Open
handibles opened this issue Mar 22, 2017 · 2 comments
Open

MRcoefs/table/fulltable: eff='x' arg not effective? #47

handibles opened this issue Mar 22, 2017 · 2 comments

Comments

@handibles
Copy link

Greetings to the devs.

From the documentation:

"We recommend removing features with less than the average number of effective samples in all features. In essence, setting eff = .5 when using MRcoefs, MRfulltable, or MRtable"

I've tried a number of values for the eff='x' argument, which should filter out features represented in less than 'x' samples: however the output of MRcoef etc. shows features with any number (1 and up) of effective samples.

Additionally, I've tried excising features with less than my threshold number of samples:

z.rm <- which (calculateEffectiveSamples ( mgs_object ) < 6 )
mgs_subset <- mgs_object [ -z.rm, ]

This reduces the number of features, and accordingly calculateEffectiveSamples on the respective fit shows values above my threshold - however, when I export this object via MRfulltable, I again have features (700 out of 1700) with +samples below the threshold (+samples <6).

This is reproducible (but to a lesser extent) with the lungData set also, running the code as per page 16 and then calling:
write.table(MRfulltable(lungres1, **eff=0.5**, number=2000), 'lung.tsv', sep='\t' )
This gives features with sample counts from 30 upwards, although the lungData set has 78 samples.

The only thing I can think of (other than being plain wrong) is that standardisation via ZIG is bringing some border-line abundances below 0, leaving those samples less effective?

@alopgar
Copy link

alopgar commented Apr 11, 2019

Hello.
I just ran into the same issue and saw this open post.

When I use the MRfulltable function with that eff = .5 argument, the resultin table has all my features.

But when I use this code:
ZIG <- fitZig(obj = normtest, mod = mod, control = settings, useCSSoffset = F)
efec <- calculateEffectiveSamples(ZIG)
valid = which(efec >= quantile(efec, p = 0.5, na.rm = TRUE))
The resulting output filters me around half of the samples.

Is there any clue about what could be happening?
Thanks in advance.

@jeffkimbrel
Copy link

It looks like the code is doing what you wrote above and writing to valid:

valid = which(effectiveSamples>=quantile(effectiveSamples,p=eff,na.rm=TRUE))

But then just overriding the valid filtering that is done here?:

valid = 1:length(padj)

Seems like a bug to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants