matsengrp / phip-flow

A Nextflow pipeline to align, merge, and organize large PhIP-Seq datasets
MIT License
10 stars 6 forks source link

Add beer #60

Closed jgallowa07 closed 1 year ago

jgallowa07 commented 1 year ago

this PR:

jgallowa07 commented 1 year ago

Great point, I agree. I should be able to get to this tomorrow or Thursday.

jgallowa07 commented 1 year ago

Alright, @sminot, I've merged the three edgeR "assay's" i.e. edgeR_pval, edgeR_logfc, and edgeR_hits back into the xarray object that is passed back to the DSOUT workflow so now all the edge R results get written alongside the rest of the outputs (i.e. tall, wide, pickle). So when I run:

nextflow run main.nf \
  --sample_table data/pan-cov-example-with-beads-no-lib/sample_table.csv \
  --peptide_table data/pan-cov-example-with-beads-no-lib/peptide_table.csv \
  -profile docker -with-report $(date -I)-beer.html \
  --output_tall_csv true \
  --output_wide_csv true \
  --run_edgeR_save_rds true \
  --results $(date -I)-test -resume

I get the following wide results

(base) ubuntu phippery/phip-flow ‹add_beer*› » tree 2023-06-05-test/wide_data 
2023-06-05-test/wide_data
├── data_counts.csv
├── data_cpm.csv
├── data_edgeR_hits.csv
├── data_edgeR_logfc.csv
├── data_edgeR_logpval.csv
├── data_peptide_annotation_table.csv
├── data_sample_annotation_table.csv
└── data_size_factors.csv

0 directories, 8 files

How does this look?

jgallowa07 commented 1 year ago

I still think it's worth throwing a useful error/warning if the dataset has less than 2 "beads_only" control. What are your thoughts? I'm not sure what the best way to do this is tbh.

sminot commented 1 year ago

I still think it's worth throwing a useful error/warning if the dataset has less than 2 "beads_only" control. What are your thoughts? I'm not sure what the best way to do this is tbh.

I find it best to do this in the sample table validation step: see e9ba394

sminot commented 1 year ago

Is it weird that we're running edgeR by loading the beer library?