{"id":26675372,"url":"https://github.com/krasnitzlab/scgv","last_synced_at":"2025-04-12T08:11:50.284Z","repository":{"id":75279533,"uuid":"76399432","full_name":"KrasnitzLab/SCGV","owner":"KrasnitzLab","description":"SCGV is an interactive graphical tool for single-cell genomics data, with emphasis on single-cell genomics of cancer","archived":false,"fork":false,"pushed_at":"2022-03-23T16:45:59.000Z","size":218951,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T08:11:35.355Z","etag":null,"topics":["genomics","genomics-visualization","single-cell","single-cell-genomics"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KrasnitzLab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-13T21:22:09.000Z","updated_at":"2022-03-23T16:46:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"df01811a-1440-4d32-b2e5-87c37231addd","html_url":"https://github.com/KrasnitzLab/SCGV","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KrasnitzLab%2FSCGV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KrasnitzLab%2FSCGV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KrasnitzLab%2FSCGV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KrasnitzLab%2FSCGV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KrasnitzLab","download_url":"https://codeload.github.com/KrasnitzLab/SCGV/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248537140,"owners_count":21120711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["genomics","genomics-visualization","single-cell","single-cell-genomics"],"created_at":"2025-03-26T03:17:50.475Z","updated_at":"2025-04-12T08:11:49.793Z","avatar_url":"https://github.com/KrasnitzLab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Single Cell Genome Viewer (SCGV)\n\n[![DOI](https://zenodo.org/badge/76399432.svg)](https://zenodo.org/badge/latestdoi/76399432)\n\nSCGV is an interactive graphical tool for single-cell genomics data, with\nemphasis on single-cell genomics of cancer. It facilitates examination, jointly\nor individually, of DNA copy number profiles of cells harvested from\nmultiple anatomic locations (sectors). In the opening view the copy-number\ndata matrix, with columns corresponding to cells and rows to genomic locations,\nis represented as a heat map with color-encoded integer DNA copy number. If a\nphylogenetic tree is available for the cells comprising the dataset, it can be\nused to order the columns of the data matrix, and clones formed by closely\nrelated cells may be identified. Alternatively, the columns\ncan be ordered by the sector of origin of the cells. Cyto-pathological\ninformation may be displayed in a separate view, including sector-specific\nslide images and pathology reports. Genomic sub-regions and\nrandom subsets of cells can be selected and zoomed into. Individual or multiple\ncopy-number profiles may be plotted as copy number against the genomic\ncoordinate, and these plots may again be zoomed into. Chromosomal regions\nselected within the profiles may be followed to UCSC genome browser to\nexamine the genomic context.\n\nShort video introduction to SCGV can be found here:\n\n[![SCGV short video tutorial](https://img.youtube.com/vi/t07HFFnl2Bs/0.jpg)](https://www.youtube.com/watch?v=t07HFFnl2Bs)\n\n## Anaconda Environment Setup\n\n### Install Anaconda\n\n* Go to anaconda web site \n[https://www.anaconda.com/distribution/](https://www.anaconda.com/distribution/)\nand download the latest anaconda installer for your operating system. SCGV uses\n*Python 3.6* or later so you need to choose the appropriate Anaconda installer.\n\n* Install anaconda into suitable place on your local machine following\ninstructions from\n[https://docs.anaconda.com/anaconda/install/](https://docs.anaconda.com/anaconda/install/)\n\n### Create Anaconda `scgv` environment\n\n* To create `scgv` environment use:\n\n    ```bash\n    conda create -n scgv\n    ```\n\n* Activate the newly created environment with:\n\n    ```bash\n    conda activate scgv\n    ```\n\n### Conda installer for SCGV\n\n* To install SCGV you can use KrasnitzLab Anaconda channel:\n\n    ```bash\n    conda install -c krasnitzlab scgv\n    ```\n\n* To run the SCGV viewer run following command:\n\n    ```bash\n    scgview\n    ```\n\n## Dataset Directory Structure\n\n* Files in the dataset should conform to the following naming convention. Each filename\nshould end with two dot-separated words. The last word is the usual file extension\nand second to last is the file type. For example:\n\n    ```bash\n    example.featuremat.txt\n    ```\n\n    is a `txt` file, that contains `featuremat` used by the viewer.\n\n* Example dataset directory is located in subdirectory\n`exampledata/example.directory` of the project main directory. The content of the\nexample dataset directory is as follows:\n\n    ```bash\n    .\n    ├── example.cells.csv\n    ├── example.clone.txt\n    ├── example.genome.txt\n    ├── example.guide.txt\n    ├── example.featuremat.txt\n    ├── example.features.txt\n    ├── example.ratio.txt\n    ├── example.seg.txt\n    ├── example.tree.txt\n    └── pathology\n        ├── 9727420.color.map.060414.png\n        ├── Area1.Benign.jpg\n        ├── Area1.Benign.txt\n        ├── Area2.PIN.with.Benign.jpg\n        ├── Area2.PIN.with.Benign.txt\n        ├── Area3.GS9.invading.SV.jpg\n        ├── Area3.GS9.invading.SV.txt\n        ├── Area4.GS9.near.Urethra.jpg\n        ├── Area4.GS9.near.Urethra.txt\n        ├── Area5.GS9.at.Capsule.jpg\n        ├── Area5.GS9.at.Capsule.txt\n        └── description.csv\n    ```\n\n* Optionally the dataset directory may contain a `pathology` subdirectory that\ncontains pathology images and notes. This subdirectory should contain a file called\n`description.csv` with the following structure:\n\n    ```csv\n    sector,pathology,image,notes\n    1,Benign prostatic tissue,Area1.Benign.jpg,Area1.Benign.txt\n    2,Pin and benign prostate,Area2.PIN.with.Benign.jpg,Area2.PIN.with.Benign.txt\n    3,Gleason 9 and invading seminal vesicle,Area3.GS9.invading.SV.jpg,Area3.GS9.invading.SV.txt\n    4,Gleason 9 near urethra,Area4.GS9.near.Urethra.jpg,Area4.GS9.near.Urethra.txt\n    5,Gleason 9 at capsule,Area5.GS9.at.Capsule.jpg,Area5.GS9.at.Capsule.txt\n    ```\n\nFirst column in `description.csv` contains the name/id of the sector as\nspecified in the `guide` file,\nthe second column is a description of the sector and the last two columns\ncontain file names of pathology image and notes.\n\n## Dataset Archive Structure\n\n* Viewer supports datasets stored as a `ZIP` archives. Files from the\narchive dataset should follow the same naming convention as for dataset\ndirectories.\n\n* Example dataset ZIP archive is found in `exampledata/example.archive.zip`\ninto project main directory. The structure of the example dataset is as follows:\n\n    ```bash\n    unzip -t example.archive.zip \n    Archive:  example.archive.zip\n        testing: pathology/               OK\n        testing: pathology/Area5.GS9.at.Capsule.jpg   OK\n        testing: pathology/Area4.GS9.near.Urethra.jpg   OK\n        testing: pathology/Area3.GS9.invading.SV.jpg   OK\n        testing: pathology/Area2.PIN.with.Benign.jpg   OK\n        testing: pathology/Area1.Benign.jpg   OK\n        testing: pathology/Area5.GS9.at.Capsule.txt   OK\n        testing: pathology/Area4.GS9.near.Urethra.txt   OK\n        testing: pathology/Area1.Benign.txt   OK\n        testing: pathology/description.csv   OK\n        testing: pathology/Area2.PIN.with.Benign.txt   OK\n        testing: pathology/Area3.GS9.invading.SV.txt   OK\n        testing: example.cells.csv        OK\n        testing: example.clone.txt        OK\n        testing: example.featuremat.txt   OK\n        testing: example.features.txt     OK\n        testing: example.genome.txt       OK\n        testing: example.guide.txt        OK\n        testing: example.ratio.txt        OK\n        testing: example.seg.txt          OK\n        testing: example.tree.txt         OK\n    No errors detected in compressed data of example.archive.zip.\n    ```\n\n## Start the Viewer\n\n* Before starting the viewer you need to activate viewer's Anaconda environment\n\n    ```bash\n    conda activate scgv\n    ```\n\n* To start the viewer use:\n\n    ```bash\n    scgview\n    ```\n\n* The startup window of SCGV should appear:\n\n|![SCGV start window](docs/figs/01-start-window-dec.png)|\n|:--:|\n|*1-open directory; 2-open archive; 3-open feature view; 4-additional tracks confguration; 5-list of selected profiles; 6-show selected profiles; 7-clears list of selected profiles; 8-heatmap legend; 9-sectors legend; 10-order view by sectors; 11-track legend selector; 12-selected track legend; 13-order view by selected track*|\n\n## Select Dataset\n\n* Use `Open Directory` (1) and `Open Archive` (2) buttons to open a data set\nfor visualization\n\n* `Open Directory` button allows you to select a directory where a dataset is located.\nOne directory may contain only one dataset.\n\n* `Open Archive` button allow you to select dataset stored as a `ZIP` archive.\n\n## Viewer Main Window\n\n* After dataset is loaded it will displayed into the main window.\n![SCGV main window](docs/figs/02-main-window.png)\n\n* From profiles instruments you can select individual cells to display their CN profile\ninto single profile viewer.\n\n* Buttons 'Feature View' and 'Order by Sector View' will display different views of the whole\ndataset\n\n* From 'Sectors' legend you can visualize single sector view and pathology view for\nany given sector.\n\n## Copy-number Profile Tools\n\n* If you right click on a single cell it will be added to list of profiles to visualize\nfrom 'Show Profiles' button.\n\n* To show the selected profiles you need to click on 'Profiles Show' button.\nSelected\nprofiles will be visualized as stacked plot of copy number against the genomic\ncoordinate:\n\n|![Sample view window](docs/figs/03-profiles-window-dec.png)|\n|:--:|\n|*1-reset view; 2-undo; 3-redo; 4-move the image; 5-zoom in; 6-save an image snapshot; 7,8-individual profiles stacked view*|\n\n* Using zoom button (5) and reset button (1) you can inspect different regions\nof the profile.\n\n![Sample view window](docs/figs/03-profiles-window-context-menu.png)\n\n* To examine the genomic content of an intra-chromosomal region,\nright-click and use the context menu to select desired genomic position or region\nin the stacked copy-number\nprofile view. This will invoke UCSC Genome Browser in a tab of your default\nweb browser\n\n## Sectors Legend\n\n* Right click on a sector in Sector legeng will open a context menu:\n\n    ![Sectors legned context menu](docs/figs/04-sectors-legend-context-menu.png)\n\n* Selecting 'Show sector view' displays single sector view for the selected\nsector\n\n    ![Single sector window](docs/figs/05-single-sector.png)\n\n* Selecting 'Show sector patology' will display pathology image and notes for\nthe selected sector\n\n    ![Single sector pathology window](docs/figs/06-single-sector-patology.png)\n\n## Configurable Tracks\n\nUsing 'Configure Tracks' (6) button you can configure tracks to be shown\non bottom of the heatmap view.\n\n* When you click 'Configure Tracks' (6) button a dialog window is shown\nallowing you to select additional tracks to be displyed\n\n    ![Configure Tracks dialog window](docs/figs/07-configure-tracks.png)\n\n* Once selected the configured tracks are shown at the bottom of the heatmap\nview and are available from 'Track legend selector' (11):\n\n    ![Tracks Combo box](docs/figs/08-configure-tracks-combo.png)\n\n* The 'Selected track legend' (12) allows you additionally explore the\nselected track using context menu:\n\n    ![Single Track view](docs/figs/09-single-track-view.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasnitzlab%2Fscgv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrasnitzlab%2Fscgv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrasnitzlab%2Fscgv/lists"}