Skip to content

Conversation

@SuiYue-2308
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@cying111 cying111 left a comment

Choose a reason for hiding this comment

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

tested on test data, looks all good to me.

hitsDF <- hitsDF %>% dplyr::select(queryHits, chr, start, end, strand) %>%
group_by(queryHits, chr, strand) %>%
summarise(start = max(start), end = min(end), .groups = "drop") %>%
reframe(.by = c(queryHits, chr, strand), start = max(start), end = min(end)) %>% ungroup() %>%
Copy link
Collaborator

Choose a reason for hiding this comment

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

no need ungroup() after reframe()

Copy link
Collaborator

@lingminhao lingminhao left a comment

Choose a reason for hiding this comment

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

reframe() gives ungrouped data frame, so ungroup() is redundant (for example above). Other than that, the change looks good to me.

It resolved the github issue #502

txScore.noFit = weighted.mean(txScore.noFit, readCount_tmp)) %>%
group_by(chr, strand, start, end) %>%
summarise(readCount = sum(readCount),
reframe(.by = c(chr, strand, start, end),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the warning really is coming from this usage only, where txScore is from multiple samples, hence, multiple rows will be produced in this step.

A quick fix would be change it to mutate, cause there is no summarising happening at this step.

All the other instances of summarise no need to change actually. I have tested on my side for this.

Thanks

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.

4 participants