EPPIcenter / mad4hatter

https://eppicenter.github.io/mad4hatter/
5 stars 13 forks source link

fix outputs and visualizations #73

Closed manuelgug closed 1 year ago

manuelgug commented 1 year ago
  1. adds new resmarkers (resistance_markers_amplicon_v4.txt)
  2. fixes/cleans resmarkers outputs (resistance_marker_genotypes_bcftools_v4.R)
  1. fixes visualization outputs (cutadapt_summaryplots.R)
bgpalmer commented 1 year ago

Hey @manuelgug - I ran the code for the resistance markers and ran into an error

Command error: [1] "Pf3D7_13_v3-2504481-2504734" [1] "Mapping/Pf3D7_13_v3-2504481-2504734-1B.1.mpileup.txt" [1] "Pf3D7_13_v3-748254-748510" [1] "Mapping/Pf3D7_13_v3-748254-748510-1B.1.mpileup.txt" [1] "Pf3D7_14_v3-1956056-1956330" [1] "Mapping/Pf3D7_14_v3-1956056-1956330-1B.1.mpileup.txt" [1] "Pf3D7_14_v3-2481033-2481276" [1] "Mapping/Pf3D7_14_v3-2481033-2481276-1B.1.mpileup.txt" Joining withby = join_by(SampleName, name) Warning message: funs()` was deprecated in dplyr 0.8.0. ℹ Please use a list of either functions or lambdas:

Simple named list: list(mean = mean, median = median)

Auto named with tibble::lst(): tibble::lst(mean, median)

Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))

Joining with by = join_by(SampleName, name) Warning message: Using an external vector in selections was deprecated in tidyselect 1.1.0. ℹ Please use all_of() or any_of() instead.

Was:

data %>% select(colnames_to_use)

# Now:
data %>% select(all_of(colnames_to_use))

See https://tidyselect.r-lib.org/reference/faq-external-vector.html. Error: ! Column 48 must be named. Caused by error in repaired_names(): ! Names can't be empty. ✖ Empty name found at location 48. Backtrace: ▆

  1. ├─rownames_to_column(sample_altcodon, "SampleName") %>% ...
  2. ├─base::data.frame(.)
  3. └─tibble::rownames_to_column(sample_altcodon, "SampleName")
  4. └─tibble:::repaired_names(c(unique(names2(df)), var), repair_hint = FALSE)
  5. ├─tibble:::subclass_name_repair_errors(...)
  6. │ └─base::withCallingHandlers(...)
  7. └─vctrs::vec_as_names(...)
  8. └─vctrs (local) <fn>()
  9. └─vctrs:::validate_unique(names = names, arg = arg, call = call)
    1. └─vctrs:::stop_names_cannot_be_empty(names, call = call)
    2. └─vctrs:::stop_names(...)
    3. └─vctrs:::stop_vctrs(...)
    4. └─rlang::abort(message, class = c(class, "vctrs_error"), ..., call = vctrs_error_call(call)) Execution halted

Work dir: /home/bpalmer/Documents/work/8c/613f07674637a57a240489f97b06e4

Tip: you can try to figure out what's wrong by changing to the process work dir and showing the script file named .command.sh `

This was while using the docker profile. I was curious if you used a different profile when running the code and what version of tidyverse you were using

manuelgug commented 1 year ago

Hey @bgpalmer

Yeah, I built and regularly use the singularity image on my side, since I've got many restrictions on the ISG cluster and being able to just copy the *.sif file around makes my life way easier. I've run multiple data sets at this point without getting errors.

If you want to give it a try, my commands looks something like:

nextflow run main.nf --readDIR something --outDIR something_results --target v4 --refseq_fasta ~/path/to/resources/v4/ALL_refseq.fa -with-singularity ampseq_workflow.sif

Thus, tidiverse version would be the one from the Apptainer file, which is 2.0.0 .