AlexsLemonade / AlexsLemonade/training-modules

Discussion: Directory structure for modules on server

Open
#246 5 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
HTML
Stars
77
Forks
35
Avg merge
1d 13h
Merged PRs (30d)
4

Description

The current directory structure for the scRNA module set looks something like this:
```
training-modules/scRNA-seq$ tree
.
├── 00-scRNA-seq_introduction.md
├── 01-normalizing_scRNA-seq.Rmd
├── 01-normalizing_scRNA-seq.nb.html
├── 02-tag-based_pre-processing_scRNA-seq.html
├── 02-tag-based_pre-processing_scRNA-seq.md
├── 03-dimension_reduction_scRNA-seq.Rmd
├── 03-dimension_reduction_scRNA-seq.nb.html
├── 04-scrnaseq_exercise.Rmd
├── README.md
├── data
│ ├── glioblastoma
│ │ └── raw
│ │ ├── unfiltered_darmanis_counts.tsv
│ │ └── unfiltered_darmanis_metadata.tsv
│ └── tabula_muris
│ ├── fastq
│ │ ├── tab_mur_10X_P4_3_L001_R1_subset.fastq.gz
│ │ └── tab_mur_10X_P4_3_L001_R2_subset.fastq.gz
│ ├── normalized
│ │ ├── scran_norm_tab_mur.tsv
│ │ └── tab_mur_metadata.tsv
│ └── qc_reports
│ ├── 10X_P4_3_qc_report.html
│ └── Bad_Example_10X_P4_2_qc_report.html
├── diagrams
├── figures
│ ├── gbm_figure.jpg
│ └── sce_structure.png
├── index
├── scripts
│ ├── gene_matrix_filter.R
│ └── read_alevin.R
└── setup
├── README.md
├── glioblastoma
└── tabula-muris
```

There isn't anything inherently wrong with this, but with using the Rstudio server, we now plan to have the raw data stored in `shared/data/` to avoid unnecessary duplication.

There are two options that I see: the first is to leave things mostly as they are, but remove the raw data and put the paths to the files directly in the notebooks. This would look something like this, using the current paths in `/shared/data`:
```
data_dir <- file.path("~", "shared-data", "training-data", "darmanis")
gene_matrix_file <- file.path(data_dir, "tximport", "count_matrix.tsv")
```
Note that this uses `~/shared-data/` for the reason that this symlink that we set up for every user is visible in the RStudio file browser without having to use "Go to folder".

The other option is to add moar symlinks within the module, so the new directory structure might look like this:
```.
├── 00-scRNA-seq_introduction.md
├── 01-normalizing_scRNA-seq.Rmd
├── 01-normalizing_scRNA-seq.nb.html
├── 02-tag-based_pre-processing_scRNA-seq.html
├── 02-tag-based_pre-processing_scRNA-seq.md
├── 03-dimension_reduction_scRNA-seq.Rmd
├── 03-dimension_reduction_scRNA-seq.nb.html
├── 04-scrnaseq_exercise.Rmd
├── README.md
├── analysis
│ └── glioblastoma
│ └── normalized
├── data
│ ├── glioblastoma -> ~/shared-data/training-data/darmanis/
│ └── tabula_muris -> ~/shared-data/training-data/tabula_muris/
```

This would more closely mirror a real project, as the data would appear to be in the module folder and could be referred to that way. It can also encourage the practice that a data folder is for reading only, and anything you write goes in a separate location (though I am not too strict about this myself, as long as there is a `raw` subfolder of some kind within `data`).

Thoughts on which of these two options is preferred, or modifications to the proposed structures?

Contributor guide

Open the contributing guide

Research direction

Start with the scRNA-seq module tree, its README.md, and the Rmd notebooks that reference the current data paths. Compare the direct shared-data paths with the proposed symlink layout, including the RStudio visibility and read-only data considerations. Done means the project has agreed on one structure and the affected module paths and documentation consistently follow it.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
documentation
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.