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

vignette fails to build on GHA #10

Closed
bschilder opened this issue Nov 8, 2022 · 4 comments
Closed

vignette fails to build on GHA #10

bschilder opened this issue Nov 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working GitHub Actions

Comments

@bschilder
Copy link
Member

Happens across all platforms:

Quitting from lines 69-76 (echoplot.Rmd) 
Error: Error: processing vignette 'echoplot.Rmd' failed with diagnostics:
Can't combine `..1$Method` <factor<2f980>> and `..4$Method` <ordered<4e1b3>>.

Different error, but similar situation to this issue: RajLabMSSM/echolocatoR#129

@bschilder bschilder added the bug Something isn't working label Nov 8, 2022
@bschilder bschilder self-assigned this Nov 8, 2022
@bschilder bschilder moved this from Todo to In Progress in 🦇🦇 echoverse 🦇🦇 Nov 8, 2022
@bschilder
Copy link
Member Author

bschilder commented Nov 8, 2022

Related:
https://stackoverflow.com/questions/66244056/error-cant-combine-1a-double-and-2a-factoree569

Seems this might be a version difference in how rows of different types are being bound by default. Unsure which package/function is causing this tho. Running update.packages(ask=F) to try and replicate this.

@bschilder
Copy link
Member Author

Running update.packages(ask=F) to try and replicate this.

Now able to replicate the issue with: devtools::build_vignettes()

@bschilder
Copy link
Member Author

bschilder commented Nov 8, 2022

Noticing other warnings:

Warning messages:
1: `aes_string()` was deprecated in ggplot2 3.0.0.
ℹ Please use tidy evaluation ideoms with `aes()`
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated. 
2: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
ℹ Please use `linewidth` instead.
This warning is displayed once every 8 hours.
Call `lifecycle::last_lifecycle_warnings()` to see where this warning was generated.

I think these warnings and the original error might be related to the integration of tidy with ggplot2:
https://cmdlinetips.com/2018/07/ggplot2-version-3-0-0-brings-tidy-evaluation-to-ggplot/

aes_string() was deprecated in ggplot2 3.0.0.

This makes zero sense to me why they're deprecating this. The new method they suggest to replace it with is fare more verbose and complicated. Will stick with the old method for now since it will be a long time before they remove aes_string.

Using size aesthetic for lines was deprecated in ggplot2 3.4.0.

I think this is happening within add_multitrack_lines with geom_vline.

Can't combine ..1$Method <factor<2f980>> and ..4$Method <ordered<4e1b3>>.

Occurs within the add_snp_labels subfunction.

Specifically, when the initial snp_plot is created, echodata::melt_finemapping_results does not order the "Method" factor levels in the same way echoplot does. Fixed by making echodata::melt_finemapping_results do this in a consistent way.

Found another issue within construct_snp_labels along the way.

if(remove_duplicates){
        labelSNPs <- labelSNPs |>
            dplyr::group_by(dplyr::vars(grouping_vars)) |>
            dplyr::arrange(rowID) |>
            dplyr::slice(dplyr::n())
    }

to

if(isTRUE(remove_duplicates)){
    labelSNPs$rowID <- seq_len(nrow(labelSNPs))
    # labelSNPs[,by=as.list(grouping_vars)]
    labelSNPs <- labelSNPs |>
        dplyr::group_by_at(.vars = grouping_vars) |> 
        dplyr::arrange(rowID) |>
        dplyr::slice_head(n = 1) |>
        data.table::data.table()
    labelSNPs$rowID <- NULL
}

@bschilder
Copy link
Member Author

Addressing these things + this #11 fixed this issue ! Vignette runs all the way through now.

Repository owner moved this from In Progress to Done in 🦇🦇 echoverse 🦇🦇 Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GitHub Actions
Projects
Development

No branches or pull requests

1 participant