Possible bug in ConsensusSequence
1
0
Entering edit mode
@roblanfear-9413
Last seen 5.5 years ago

Hi there,

I have a possible bug in ConsensusSequence, specifically that the minInformation parameter does not appear to work (at least in the way I understand it should from the documentation). 

For example, in an alignment of 4 sequences, where a given site has 3 A's and one T, I would expect that setting minInformation to 0.7 should return a consensus of an 'A', but setting it to 0.8 would return a consensus of 'W'. However, no matter what I do (including whether I set ambiguity to 'TRUE' or 'FALSE', I always get a 'W' here. 

Am I doing something wrong, or misunderstanding something? Or is this a bug?

Thanks either way for an awesome package,

Rob

DECIPHER • 583 views
ADD COMMENT
0
Entering edit mode
Erik Wright ▴ 10
@erik-wright-7838
Last seen 4.0 years ago
United States
Hi Rob, Thanks for your inquiry about the DECIPHER package. The behavior you describe is expected for the 'minInformation' parameter. It controls when to switch to the 'noConsensusChar'. The parameter that I think you are describing is 'threshold', which controls the amount of sequence information to maintain in each position. Using your example, here are some variants: > ConsensusSequence(DNAStringSet(c("A", "A", "A", "T"))) A DNAStringSet instance of length 1 width seq [1] 1 W > ConsensusSequence(DNAStringSet(c("A", "A", "A", "T")), threshold=0.3) A DNAStringSet instance of length 1 width seq [1] 1 A > ConsensusSequence(DNAStringSet(c("A", "A", "A", "T")), threshold=0.3, minInformation=0.8) A DNAStringSet instance of length 1 width seq [1] 1 + > ConsensusSequence(DNAStringSet(c("A", "A", "A", "T")), threshold=0.3, minInformation=0.8, noConsensusChar="N") A DNAStringSet instance of length 1 width seq [1] 1 N The first case is your example of three "A"s and a "T". The second case is what I think you want to do - get an "A" by dropping the "T". Then only 75% of the sequence information is maintained, so setting minInformation to 0.8 will trigger the 'noConsensusChar' (by default, "+"). This can be changed to an "N" as in the fourth example. I hope that helps answer your question. Erik On May 5, 2016, at 9:40 PM, rob.lanfear [bioc] <noreply@bioconductor.org<mailto:noreply@bioconductor.org>> wrote: Activity on a post you are following on support.bioconductor.org<https: support.bioconductor.org=""/> User rob.lanfear<https: support.bioconductor.org="" u="" 9413=""/> wrote Question: Possible bug in ConsensusSequence<https: support.bioconductor.org="" p="" 82355=""/>: Hi there, I have a possible bug in ConsensusSequence, specifically that the minInformation parameter does not appear to work (at least in the way I understand it should from the documentation). For example, in an alignment of 4 sequences, where a given site has 3 A's and one T, I would expect that setting minInformation to 0.7 should return a consensus of an 'A', but setting it to 0.8 would return a consensus of 'W'. However, no matter what I do (including whether I set ambiguity to 'TRUE' or 'FALSE', I always get a 'W' here. Am I doing something wrong, or misunderstanding something? Or is this a bug? Thanks either way for an awesome package, Rob ________________________________ Post tags: DECIPHER You may reply via email or visit Possible bug in ConsensusSequence
ADD COMMENT

Login before adding your answer.

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