CambridgeCentreForProteomics / camprotR

https://cambridgecentreforproteomics.github.io/camprotR/
MIT License
4 stars 0 forks source link

Fix `estimate_incorporation()` #34

Closed csdaw closed 2 years ago

csdaw commented 2 years ago

This PR rewrites estimate_incorporation() (and adds tests for it) so that it:

  1. Actually works
  2. Can take file paths or data frames as inputs
  3. Outputs a list of 3 plots and a data frame (default) or saves 3 plots and a text file to a specified output directory.

Example (save outputs in a list):

ls <- estimate_incorporation(
  psm_input = psm_silac_p4,
  peptide_input = pep_silac_p4,
  crap_fasta = system.file("extdata/cRAP_20190401.fasta.gz", package = "camprotR"),
  mix = 1
)

Example (save outputs to files in a directory of choice):

estimate_incorporation(
  psm_input = psm_silac_p4,
  peptide_input = pep_silac_p4,
  crap_fasta = system.file("extdata/cRAP_20190401.fasta.gz", package = "camprotR"),
  mix = 1,
  outdir = "output"
)

To use on the command line:

Rscript -e 'estimate_incorporation(psm_silac_p4, pep_silac_p4, "path/to/crap.fasta", 1, "output")'