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

Fix minor message formatting #1395

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

erictleung
Copy link

No description provided.

The message() function doesn't add spaces between strings. So this
commit corrects the message from printing out "samples removedbecause"
to "samples removed because".
This commit fixes the message output so that there is a space between
the number of OTUs removed and the string. So this commit fixes an
example message such as "123OTUs were removed" to "123 OTUs were
removed".
The `sep` argument is used to separate strings that are being pasted
together. The pasted input here is merely a vector of strings that won't
be pasted together. So the message output currently pastes them all
together like "SAMPLE1SAMPLE2SAMPLE3". This commit replaces the sep
argument with the collapse argument, which will change this behavior to
add tabs between the sample names that are removed.
@@ -183,7 +183,8 @@ rarefy_even_depth <- function(physeq, sample.size=min(sample_sums(physeq)),
rmtaxa = taxa_names(newsub)[taxa_sums(newsub) <= 0]
if( length(rmtaxa) > 0 ){
if(verbose){
message(length(rmtaxa), "OTUs were removed because they are no longer \n",
message(length(rmtaxa),
" OTUs were removed because they are no longer \n",
Copy link
Author

@erictleung erictleung Sep 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related PR #875

I can rebase my PR if the above PR gets merged.

Copy link

@colinbrislawn colinbrislawn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Let's see if @joey711 is willing to merge

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

Successfully merging this pull request may close these issues.

2 participants