<commit_before>*******************
Saved Cohorts
*******************

Cohorts are a way of creating custom groupings of the samples and/or cases that you are 
interested in analyzing further.  You may frequently re-use a cohort in multiple analyses.  Creating a "saved cohort" allows you to do this.  If you have any existing saved cohorts, they will appear here for you to view, edit and share (see below for details).

Creating and saving a cohort
############################

To create a cohort from Your Dashboard, if you do not have a cohort created, click on the "Create Cohort" link in the 
"Saved Cohorts" panel at the bottom of the page. This will take you to the cohort creation page.

If you already have saved cohorts, they will be listed in the "Saved Cohorts" panel.  Click on the "Saved Cohorts" link in that panel and this will take you to a page that displays the details of your saved cohorts.  Alternatively, to go directly to a given cohort, click on its name and you will be taken to the cohort details page of that cohort.

To create a new saved cohort, use the "Create Cohort" link.

Cohort Creation Page
====================

Using the provided list of filters on the left hand side, you can select the attributes and features
that you are interested in either frm ISB-CGC data or the User Data tab.  Note that the TCGA project is selected by default as this is the dataset that the majority of researchers are familiar with.  TCGA data is the first program to be displayed next, to it is CCLE and TARGET data tabs. You are able to create a cohort with multiple program filters.  CCLE (The Cancer Cell Line Encyclopedia) data - is open access data set that can be used to view sequence data with the IGV viewer without having dbGaP permissions.

By clicking on a feature, the field will expand and provide you with additional filtering options.
For example, when you click on "Vital Status", it expands and provides a list containing "Alive", "Dead", and
"NA" as options you may choose from. 
Selecting one or more of these will cause the filter(s) to appear in the Selected Filters
panel and visualizations on the page
will be updated to reflect that the current cohort has been filtered according to Vital Status.
The numbers beside the selectable
filter values reflect the number of samples that have that attribute based on all other filters that
have been selected.

Individual selections in a filter are "ORed" together, meaning if any of the selected conditions are met they will be in the filter.  Filters are "ANDed" together, meaning that selecting two filters means that the cases and samples are created based on both filters being executed.  There may be cases where you have 0 cases and samples, because the combination of filters you have chosen are ALL not present (AND function).


Cohort Filters
--------------
The panel in the center of the screen, with four tabs called "TCGA DATA", "CCLE DATA", "TARGET DATA", and "USER DATA" will allow to create a cohort between data programs in the system and data that you have uploaded. The  TCGA, CCLE, and TARGET DATA tab has three tabs called "CASE", "DATA TYPE", and "MOLECULAR"  which allow you to apply filters to the cohorts your are creating using ISB-CGC hosted data. For the USER DATA tab, there is one tab called "PROJECTS & STUDIES" which allow you to filter by the projects or studies you have uploaded to the system. Below are the details of each tab.

**Please Note:** Selecting the program filter will add all samples pertaining to program. Also there is a mouse over feature that will display the disease long name if it's part of the TCGA dataset.


   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | TCGA Cases Tab        | TCGA Data Type Tab           | CCLE Cases Tab      | CCLE Data Type Tab          | TARGET Cases Tab      | TARGET Data Type Tab        |
   +=======================+==============================+=====================+=============================+=======================+=============================+
   |   Program             | Pathology Image              | Program             | mRNA Gene Quantification    | Program               | mRNA Gene Quantification    |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Project Short Name    | Somatic Mutation             | Project Short Name  | Copy Number Segment Masked  | Project Short Name    |miRNA Isoform Quantification |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Disease Code          | Copy Number Segment Masked   |   Disease Code      |  DNA Methylation Beta       | Disease Code          | miRNA Gene Quantification   |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Vital Status          | mRNA Gene Quantification     | Sample Type         | miRNA Gene Quantification   | Gender                | Aligned Reads               |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Gender                | DNA Variation VCF            | Gender              | miRNA Isoform               | Race                  | miRNA Isoform               |
   |                       |                              |                     | Quantification              |                       | Quantification              |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Age At Diagnosis      | Aligned Reads                | Site Primary        | Biospecimen                 | Ethnicity             |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Sample Type           | Protein Quantification       | Histology           | Clinical                    | WBC At Diagnosis      |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Tumor Tissue Site     |miRNA Isoform Quantification  | Hist SubType        | Somatic Mutation            | Year Of Diagnosis     |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Histological Type     |miRNA Gene Quantification     |                     |                             | Event Free Survival   |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Pathologic Stage      |mRNA Isoform Quantification   |                     |                             | Days to Birth         |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Tumor Status          | Genotypes                    |                     |                             | Age At Diagnosis      |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | New Tumor After       | DNA Methylation Beta         |                     |                             | Vital Status          |                             |
   | Inital Treatment      |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Histological Grade    |                              |                     |                             | Overall Survival      |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | BMI (Body Mass Index) |                              |                     |                             | Days to Death         |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | HPV Status            |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Residual Tumor        |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | Tobacco Smoking       |                              |                     |                             |                       |                             |
   | History               |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | ICD-10                |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | ICD-10 Site           |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+
   | ICD-10 Site Histology |                              |                     |                             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------------+-----------------------+-----------------------------+ 

Molecular Tab
^^^^^^^^^^^^^

    * Gene Mutation Status (creating a cohort based on the presence of a mutation (of various types) in a gene)
    
Programs & Projects Tab
^^^^^^^^^^^^^^^^^^^^^^^^
    * User Program
    * User Project



Save As New Cohort Button
^^^^^^^^^^^^^^^^^^^^^^^^^

Push this button if you wish to save the cohort based on the filters you have set.  You will be asked for a cohort name and the selected filters will be displayed.  Enter the name (any text) and push the "Create Cohort" button. 

**NOTE:** When working with multiple programs you will see a yellow notification box stating, "Your cohort contains samples from multiple programs. Please note that filters will only apply to samples from the program indicated by the tab they were chosen on - they will not apply to samples from other programs in this cohort." 

Selected Filters Panel
^^^^^^^^^^^^^^^^^^^^^^

This is where selected filters are shown for each program so there is an easy way to see what filters have been selected.  You have to tooggle between program tabs to see the filters selected for each program.

If you have not saved the cohort yet, clicking on “Clear All” will remove all selected filters for that program.  Also, if you have not saved the cohort yet, selecting an X beside a single filter will remove that filter.  If you have saved the cohort, the X is not present as this function is disabled in saved cohorts (to add back to an existing cohort, you can use set operations - see below).

Details Panel
^^^^^^^^^^^^^

This panel shows the Total Number of Samples and Total Number of Cases in a cohort that is actively being created with the filters that have been selected.  If there is a small "timer" icon, the calculation is taking place - the results should appear soon.

Clinical Features Panel
^^^^^^^^^^^^^^^^^^^^^^^

This panel shows a list of images (called "treemaps") that give a high level breakdown of the selected samples for a 
handful of features for the selected program:

   +------------------------------+------------------------------+---------------------------------+
   | TCGA Clinical Features Panel | CCLE Clinical Features Panel | TARGET Clinical Features Panel  |
   +==============================+==============================+=================================+
   | Disease Type                 | Disease Type                 | Disease Type                    |
   +------------------------------+------------------------------+---------------------------------+
   | Vital Status                 | Gender                       | Vital Status                    |
   +------------------------------+------------------------------+---------------------------------+
   | Sample Type                  | Site Primary                 | Gender                          |<commit_msg>updated table removed ccle data type <commit_after>*******************
Saved Cohorts
*******************

Cohorts are a way of creating custom groupings of the samples and/or cases that you are 
interested in analyzing further.  You may frequently re-use a cohort in multiple analyses.  Creating a "saved cohort" allows you to do this.  If you have any existing saved cohorts, they will appear here for you to view, edit and share (see below for details).

Creating and saving a cohort
############################

To create a cohort from Your Dashboard, if you do not have a cohort created, click on the "Create Cohort" link in the 
"Saved Cohorts" panel at the bottom of the page. This will take you to the cohort creation page.

If you already have saved cohorts, they will be listed in the "Saved Cohorts" panel.  Click on the "Saved Cohorts" link in that panel and this will take you to a page that displays the details of your saved cohorts.  Alternatively, to go directly to a given cohort, click on its name and you will be taken to the cohort details page of that cohort.

To create a new saved cohort, use the "Create Cohort" link.

Cohort Creation Page
====================

Using the provided list of filters on the left hand side, you can select the attributes and features
that you are interested in either frm ISB-CGC data or the User Data tab.  Note that the TCGA project is selected by default as this is the dataset that the majority of researchers are familiar with.  TCGA data is the first program to be displayed next, to it is CCLE and TARGET data tabs. You are able to create a cohort with multiple program filters.  CCLE (The Cancer Cell Line Encyclopedia) data - is open access data set that can be used to view sequence data with the IGV viewer without having dbGaP permissions.

By clicking on a feature, the field will expand and provide you with additional filtering options.
For example, when you click on "Vital Status", it expands and provides a list containing "Alive", "Dead", and
"NA" as options you may choose from. 
Selecting one or more of these will cause the filter(s) to appear in the Selected Filters
panel and visualizations on the page
will be updated to reflect that the current cohort has been filtered according to Vital Status.
The numbers beside the selectable
filter values reflect the number of samples that have that attribute based on all other filters that
have been selected.

Individual selections in a filter are "ORed" together, meaning if any of the selected conditions are met they will be in the filter.  Filters are "ANDed" together, meaning that selecting two filters means that the cases and samples are created based on both filters being executed.  There may be cases where you have 0 cases and samples, because the combination of filters you have chosen are ALL not present (AND function).


Cohort Filters
--------------
The panel in the center of the screen, with four tabs called "TCGA DATA", "CCLE DATA", "TARGET DATA", and "USER DATA" will allow to create a cohort between data programs in the system and data that you have uploaded. The  TCGA, CCLE, and TARGET DATA tab has three tabs called "CASE", "DATA TYPE", and "MOLECULAR"  which allow you to apply filters to the cohorts your are creating using ISB-CGC hosted data. For the USER DATA tab, there is one tab called "PROJECTS & STUDIES" which allow you to filter by the projects or studies you have uploaded to the system. Below are the details of each tab.

**Please Note:** Selecting the program filter will add all samples pertaining to program. Also there is a mouse over feature that will display the disease long name if it's part of the TCGA dataset.


          
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | TCGA Cases Tab        | TCGA Data Type Tab           | CCLE Cases Tab      | TARGET Cases Tab      | TARGET Data Type Tab        |
   +=======================+==============================+=====================+=======================+=============================+
   |   Program             | Pathology Image              | Program             | Program               | mRNA Gene Quantification    |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Project Short Name    | Somatic Mutation             | Project Short Name  | Project Short Name    |miRNA Isoform Quantification |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Disease Code          | Copy Number Segment Masked   |   Disease Code      | Disease Code          | miRNA Gene Quantification   |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   |Sample Type            | mRNA Gene Quantification     | Sample Type         | Gender                | Aligned Reads               |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Tumor Tissue Type     | DNA Variation VCF            | Gender              | Race                  | miRNA Isoform               |
   |                       |                              |                     |                       | Quantification              |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Gender                | Aligned Reads                | Site Primary        | Ethnicity             |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Race                  | Protein Quantification       | Histology           | WBC At Diagnosis      |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Ethnicity             |miRNA Isoform Quantification  | Histological        | Year Of Diagnosis     |                             |
   |                       |                              | SubType             |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Year of Diagnosis     |miRNA Gene Quantification     |                     | Event Free Survival   |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Residual Tumor        |mRNA Isoform Quantification   |                     | Days to Birth         |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Neoplasm Histologic   |                              |                     |                       |                             |
   | Grade                 | Genotypes                    |                     | Age At Diagnosis      |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Vital Status          | DNA Methylation Beta         |                     | Vital Status          |                             |
   |                       |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Person Neoplasm       |                              |                     | Overall Survival      |                             |
   | Cancer Status         |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Menopause Status      |                              |                     | Days to Death         |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Histological SubType  |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | BMI (Body Mass Index) |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Tobacco Smoking       |                              |                     |                       |                             |
   | History               |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Pathlogic Stage       |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | HPV Status            |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Age At Initial        |                              |                     |                       |                             |
   | Pathlogic Diagnosis   |                              |                     |                       |                             | 
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Days to Last Known    |                              |                     |                       |                             |
   | Alive                 |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   | Preservation Method   |                              |                     |                       |                             |
   +-----------------------+------------------------------+---------------------+-----------------------+-----------------------------+
   
   
Molecular Tab
^^^^^^^^^^^^^

    * Gene Mutation Status (creating a cohort based on the presence of a mutation (of various types) in a gene)
    
Programs & Projects Tab
^^^^^^^^^^^^^^^^^^^^^^^^
    * User Program
    * User Project



Save As New Cohort Button
^^^^^^^^^^^^^^^^^^^^^^^^^

Push this button if you wish to save the cohort based on the filters you have set.  You will be asked for a cohort name and the selected filters will be displayed.  Enter the name (any text) and push the "Create Cohort" button. 

**NOTE:** When working with multiple programs you will see a yellow notification box stating, "Your cohort contains samples from multiple programs. Please note that filters will only apply to samples from the program indicated by the tab they were chosen on - they will not apply to samples from other programs in this cohort." 

Selected Filters Panel
^^^^^^^^^^^^^^^^^^^^^^

This is where selected filters are shown for each program so there is an easy way to see what filters have been selected.  You have to tooggle between program tabs to see the filters selected for each program.

If you have not saved the cohort yet, clicking on “Clear All” will remove all selected filters for that program.  Also, if you have not saved the cohort yet, selecting an X beside a single filter will remove that filter.  If you have saved the cohort, the X is not present as this function is disabled in saved cohorts (to add back to an existing cohort, you can use set operations - see below).

Details Panel
^^^^^^^^^^^^^

This panel shows the Total Number of Samples and Total Number of Cases in a cohort that is actively being created with the filters that have been selected.  If there is a small "timer" icon, the calculation is taking place - the results should appear soon.

Clinical Features Panel
^^^^^^^^^^^^^^^^^^^^^^^

This panel shows a list of images (called "treemaps") that give a high level breakdown of the selected samples for a 
handful of features for the selected program:

   +------------------------------+------------------------------+---------------------------------+
   | TCGA Clinical Features Panel | CCLE Clinical Features Panel | TARGET Clinical Features Panel  |
   +==============================+==============================+=================================+
   | Disease Code                 | Disease Code                 | Disease Code                    |
   +------------------------------+------------------------------+---------------------------------+
   | Vital Status                 | Gender                       | Vital Status                    |
   +------------------------------+------------------------------+---------------------------------+
   | Sample Type                  | Site Primary                 | Gender                          |
{'fraction_non_alphanumeric': 0.30877854449740344, 'fraction_numerical': 0.00028455573735505443, 'mean_word_length': 0.8300462149319794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 178, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '124612', 'n_tokens_mistral': 5089, 'n_tokens_neox': 4411, 'n_words': 2276}