Cell Browser scripts: Difference between revisions

From Genecats
Jump to navigationJump to search
(Adding page to Cell Browser category.)
(Adding some stubs of sections for other tools)
Line 15: Line 15:


=columnCorrection=
=columnCorrection=
=addTags=
=getTagVals=
=cbBuildMulti=
Build multiple cell browsers at once.
=colorConverter=
Covert between rgb colors to hex and hex colors to rgb. Input file should be csv or tsv. Input file is a two-column file, where column 2 contains the color values you want to convert and column 1 is typically something like cluster labels. You will need to be in an environment where you have 'webcolors' installed.
Example command:
colorConverter myCellTypeColors.tsv
=colorExporter=
Export colors from an h5ad file. Takes an input h5ad file and an output file name. Sometimes the names of the color arrays in <code>uns</code> don't match the corresponding metadata field name, e.g. celltype_label vs celltype_colors, and so the <code>-c</code> option allows you to specify a file containing the associations (column 1 is the metadata field and column 2 is the color array name).
=datasetDiffs=
Show diffs between cells-test/cells-beta/cells/
=generateColorHtml=
Generate a list of html colors to put on your hub html page.
=makeCbHub=
Make a set of trackDb stanzas for a hub from a directory of bigWig and/or bigBed files. See [] for more details and examples.
=rowsToCols=
Can transpose a matrix. The <code>-tab</code> indicates the matrix is tap-separated, but for a comma-separated matrix use <code>-fs=,</code>.
Example:
rowsToCols -tab exprMatrix.tsv exprMatrix.transposed.tsv
=updateNewsSec=


[[Category:Cell Browser]]
[[Category:Cell Browser]]

Revision as of 23:49, 24 August 2022

h5adMetaInfo

This script prints out a summary of the metadata in an h5ad file. Specifically, it prints out the unique values for each metadata column header field and the total number of unique values for each column of the metadata file.

To use this tool, you will need to be in your Scanpy environment:

h5adMetaInfo -f [number of fields to display] h5ad

rdsMetaInfo

This script is similar to the one above however it prints out a summary of the metadata for an rds file.

To use this tool, you will need to be in your Seurat environment:

rdsMetaInfo -f [number of fields to display] rds

Both scripts were developed in order to get a glance at the information stored in metadata files. These scripts save time in loading the files into either Python or R depending on the file type and extracting the data using a series of commands. Ultimately, this reduces typing the same commands over again. These scripts were inspired by Jim’s useful tool “tabInfo” which prints out a summary of the metadata in a tsv file.

columnCorrection

addTags

getTagVals

cbBuildMulti

Build multiple cell browsers at once.

colorConverter

Covert between rgb colors to hex and hex colors to rgb. Input file should be csv or tsv. Input file is a two-column file, where column 2 contains the color values you want to convert and column 1 is typically something like cluster labels. You will need to be in an environment where you have 'webcolors' installed.

Example command:

colorConverter myCellTypeColors.tsv 

colorExporter

Export colors from an h5ad file. Takes an input h5ad file and an output file name. Sometimes the names of the color arrays in uns don't match the corresponding metadata field name, e.g. celltype_label vs celltype_colors, and so the -c option allows you to specify a file containing the associations (column 1 is the metadata field and column 2 is the color array name).

datasetDiffs

Show diffs between cells-test/cells-beta/cells/

generateColorHtml

Generate a list of html colors to put on your hub html page.

makeCbHub

Make a set of trackDb stanzas for a hub from a directory of bigWig and/or bigBed files. See [] for more details and examples.

rowsToCols

Can transpose a matrix. The -tab indicates the matrix is tap-separated, but for a comma-separated matrix use -fs=,.

Example:

rowsToCols -tab exprMatrix.tsv exprMatrix.transposed.tsv

updateNewsSec