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

sliding_window script requires different headers than between_group output file generates #52

Open
passdan opened this issue May 24, 2021 · 4 comments

Comments

@passdan
Copy link

passdan commented May 24, 2021

Hi!
Have been running SNPgenie for a while and now testing the sliding_window script however have come across a few issues. See attached the file I'm attempting to use for testing, with the following command:
Rscript SNPGenie_sliding_windows.R between_group_codon_results.txt N S 40 1 1000 50 NONE 6 > btw_test.txt
between_group_codon_results.txt

The first two issues are labeling bugs, the third I can't work out but I'm wondering if it just doesn't like the between_group output file? I'd be interested to know if you can reproduce this, and what could be going on? Thanks!

1: Unknown or uninitialised column: codon_num.

This occurs because the column in the file outputted by between_group_ testing is named just 'codon'. Renaming the column in the output file passes this.

Error: Problem with `filter()` input `..1`.
ℹ Input `..1` is `num_defined_seqs >= MIN_DEFINED_CODONS`.
✖ object 'num_defined_seqs' not found

Again, column name issue. I changed the line to match on heading, but not a proper fix

#codon_data_filtered <- filter(codon_data, num_defined_seqs >= MIN_DEFINED_CODONS)
codon_data_filtered <- filter(codon_data, num_defined_codons_g1 >= MIN_DEFINED_CODONS)
  1. Here I can't identify the issue.
Error: Assigned data `*vtmp*` must be compatible with existing data.
ℹ Error occurred for column `sw_start`.
✖ Can't convert <character> to <double>.
Backtrace:
     █
  1. ├─base::`[<-`(...)
  2. ├─tibble:::`[<-.tbl_df`(...)
  3. │ └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
  4. │   └─tibble:::tbl_subassign_row(x, i, value, value_arg)
  5. │     ├─base::withCallingHandlers(...)
  6. │     └─vctrs::`vec_slice<-`(`*tmp*`, i, value = value[[j]])
  7. │       └─(function () ...
  8. │         └─vctrs::vec_default_cast(...)
  9. │           └─vctrs::stop_incompatible_cast(...)
 10. │             └─vctrs::stop_incompatible_type(...)
 11. │               └─vctrs:::stop_incompatible(...)
 12. │                 └─vctrs:::stop_vctrs(...)
 13. │                   └─rlang::abort(message, class = c(class, "vctrs_error"), ...)
 14. │                     └─rlang:::signal_abort(cnd)
 15. │                       └─base::signalCondition(cnd)
 16. └─(function (cnd) ...
Execution halted
@singing-scientist
Copy link
Contributor

Greetings @passdan ! Apologies, as this script is brand new and not yet tested on the between-group output. I would be very happy to fix the bugs and update both the script and documentation — would you be willing to provide an example output file? Let me know!

Chase

@passdan
Copy link
Author

passdan commented May 25, 2021

Hi Chase

Thanks! Yep, I can see it's still all under development but works great so far!

There's a between_group_codon_result.txt file attached above but I think it's got hidden. Attaching here:

between_group_codon_results.txt

Regards,
Dan

@singing-scientist
Copy link
Contributor

Thanks again for your patience and for testing this out on the between group results! I have substantially updated the sliding window script for use with all three codon result types — pooled, within-group, and between-group. I tried to anticipate a few problems and added some extra checks and errors or warnings. Please re-download and let me know if it works for you.

Yours,
Chase

@passdan
Copy link
Author

passdan commented May 28, 2021

Thanks for this Chase, I'll have some tests as soon as possible and see how it all goes!

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

2 participants