blekhmanlab / blekhmanlab/compendium_website

Generalize processing of column headers

Open
#39 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2
Forks
1
PR merge metrics
No merged PRs in 30d

Description

We currently use the column names to identify each taxon in a user's input data. This was to accommodate the default DADA2 output, but we can generalize this to use two files instead of one (and skip the fiddly step of [associating messy taxon names with each taxonomic level](https://github.com/blekhmanlab/compendium_website/blob/projectionist/compile/projectionist/taxa-map.tsv)). Assuming this works for you, this should be a simpler way to process user data:

1. The user input table would be formatted as it is now, with read counts in each cell, except the column names would be IDs identifying amplicon sequence variants (ASVs).
* These IDs (e.g `'ASV1'`,`'tax001'`) would be **unique within the user's dataset**, but aren't associated with anything that we have.
2. A new input file would associate each column ID with its taxonomic assignment **in delimited fields** for each level: kingdom, phylum, class, order, genus.
* Each column ID should have only one entry in this table, but **more than one column may have the same taxonomic assignment**. That is, `ASV14` and `ASV922` may both be classified as *E. coli*.
* I believe the step that [consolidates reads at the family level](https://github.com/blekhmanlab/compendium_website/blob/41132a850d3f8c9edaa548805d9d5e395240c2aa/src/pages/projectionist/project.ts#L143) should still work as intended.

The new files from @rabdill this week:

* taxon-pcs.tsv – the same setup as now, but you won't have to deal with the [stringification](https://github.com/blekhmanlab/compendium_website/blob/projectionist/compile/index.ts#L657)
* usermeta.txt - same as now
* userdata.txt - taxonomic table with the new column names
* user_tax.txt - the new table listing the taxonomic classifications for each column
* user_projected.txt – coordinates for each sample in each ordination, for validation

Sending updated versions just to be sure:
* sample-pcs.tsv – projected points for all compendium samples
* scree.tsv – List of the variance explained across the first axes of each ordination

### userdata.txt format
| sample | ASV1 | ASV2 | ASV3 | ASV4 | ASV5 |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| s123 | 300 | 150 | 600 | 650 | 1300 |
| s124 | 0 | 0 | 1400 | 1300 | 300 |
| s125 | 250 | 1000 | 1700 | 50 | 0 |

### user_tax.txt format
| asvid | kingdom | phylum | class | order | family | genus |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| ASV1 | Bacteria | Bacillota | Clostridia | Eubacteriales | Lachnospiraceae | Catonella |
| ASV2 | Bacteria | Bacteroidota | Bacteroidia | Bacteroidales | Bacteroidaceae | Phocaeicola |
| ASV3 | Bacteria | Bacillota | Clostridia | Eubacteriales | Ruminococcaceae | Faecalibacterium |
| ASV4 | Bacteria | Bacillota | Clostridia | Eubacteriales | Lachnospiraceae | Catonella |

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.