# Reviewing fits

## 1. Loading facets runs

There two ways to load fits into facets-preview. The first is "repo" mode where samples are input through a manifest file. This file contains at least three columns (and up to four). See[ manifest file requirements](https://bandla-chai.gitbook.io/facets-preview/input-requirements#1-manifest-file). Second option is "sample" mode which simply accepts one or more sample-level facets output directories.

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SHiNfabTj6zIja9cg%2Ffacets-preview-1.svg?alt=media\&token=89633ef3-fb7d-4264-86c1-f7e47bd9dfa6)

## 2. Samples manifest

The samples manifest page gives a high-level overview of the QC status of the `default` fit as well as that of the reviewed fit (if it exists).&#x20;

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SHmhALLWuJ74lAdEl%2Ffacets-preview-2.svg?alt=media\&token=32b4c220-7e1b-46d4-b185-ffb86b1734b0)

## 3. Review fits

### *3.1 Submit refits*

* Refits require the watcher to be running. See [instructions for setting up watcher](https://bandla-chai.gitbook.io/facets-preview/installation2#5-setup-refit-watcher). If there is a "red cross" it means the watcher is not running.&#x20;
* Pre-filled options for all the refit parameters are from the `default` fit (if there is no `default` fit, then options used to generate any of the fits are used). Note: the compatible facets versions can be configured in the [config file](https://bandla-chai.gitbook.io/facets-preview/installation2#4-configuration-file).
* Note: It takes a few mins to generate the refits. Simply, go to the "Samples Manifest" page and click on the sample again to reload with newly generated fits.

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SG4XM79IraWS4a1CS%2Ffacets-preview-3-refit-panel.svg?alt=media\&token=fadbe201-c041-4c89-a4fb-e1928f5444aa)

### *3.2  QC Summary*

The QC for each fit is generated by an `facets_qc.R` script in the `facets-preview` package ([https://github.com/taylor-lab/facets-preview/tree/master/facets\_qc/](https://github.com/taylor-lab/facets-preview/tree/version_2_preRelease/facets_qc/)) that is independently version tracked. The purpose is to enable faster evolution of the QC criteria. For more information on QC criteria, see [FACETS QC criteria](https://bandla-chai.gitbook.io/facets-preview/facets-qc-criteria) section.

The "QC metrics" are simply the aggregation of `facetsSuite::check_fit` metrics as well as the `facets_qc` flags. All columns are also accessible in the sample-level `facets_qc.txt` file.

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SICW02cQPT4h2U5lq%2Ffacets-preview-4-qc-panel.svg?alt=media\&token=4fd17401-d883-4810-b6b3-1ff6580d686a)

### *3.3 Close Up*

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SIYC9g9jDdajODjIx%2Ffacets-preview-5-closeup.svg?alt=media\&token=dcd4d5bf-fedf-4d35-9c39-e3accb2d5b8f)

### *3.4 Segments*

Unedited segment output of the facets algoirthm

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SLWqfcFDcGUp3ekR0%2Ffacets-preview-6a-cncf.svg?alt=media\&token=aebcda55-bcae-4680-b66b-2f6984e126c0)

### *3.5 Segments (editable)*

Same data as in 3.4 but allows editing the cncf.txt file. Useful for correcting TCN/LCN values for certain segments.

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SL_YfkWDzJWjv1oFU%2Ffacets-preview-6b-cncf_edit.svg?alt=media\&token=02051b5b-32c7-4da2-9268-4c0b3a73915f)

### *3.6 Review notes*

`facets-preview` enables annotating samples at multiple levels.

* "Acceptable fit" and "Best fit" differ only by subjective assessment of analyst in degree of confidence in the fit. Currently, no distinction is made between the two in calculating [genomic annotations](https://bandla-chai.gitbook.io/facets-preview/generate-ccfs-gene-level-calls#2-through-facets-preview). Therefore, it is up to the analyst to take this distinction in consideration in the downstream analysis.
* "Use purity run for CCF annotation". In some cases, a `hisens` run is undesirable (eg: too high fragmentation, etc) and a `purity` run is preferable for CCF calculations.
* "Use purity". In cases where purity is NA/0.3, this allows analyst to enter a purity value estimated from mutations (for example, MSI tumors are flat and therefore yield a purity of NA).
* **Note: In case of multiple manual reviews, the one that is most recent is used for genomic annotations.**

![](https://2941696751-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M0nIiyNDnoHA2x3lLle%2F-M1S7wPHyvIOKX1meMc4%2F-M1SLd-z1FM-f49lnnL6%2Ffacets-preview-7-review_panel.svg?alt=media\&token=f015aa22-e7d8-4c27-9393-4d18cbbab9db)
