绘制基因组轨迹数据
gtracks的Python项目详细描述
GTRACK公司
从bigWig文件绘制基因组轨迹数据。由pyGenomeTracks驱动。在
安装
pip3 install gtracks
或者
^{pr2}$示例
包括一个bigwig文件示例,其中包含来自胰岛素区域的ATAC seq数据。 您可以生成这样的测试图:
gtracks INS-IGF2 test.png
你可以通过提供更多信息,在其他基因组区域绘制自己的轨迹 位置论元:一个区域或基因名以及一个或多个大人物的路径 文件夹。绘图的文件类型将由 输出文件扩展名。在
gtracks chr11:2150341-2182439 track1.bw track2.bw output.pdf gtracks INS track1.bw track2.bw output.svg
修改基因注释轨迹
默认情况下使用GRCh37/hg19基因注释,但您可以绘制GRCh38/hg38
通过添加--genes GRCh38
或{--genes <path/to/genes.bed.gz>
。在
您可能需要在“基因”轨迹中添加更多行。你可以用
--genes-height
和{
gtracks INS test-genes.png --genes-height 6 --gene-rows 6
更改调色板
可以使用--color-palette
选项更改bigWig轨迹的调色板。在
gtracks INS track1.bw track2.bw track3.bw output.pdf --color-palette "#color1""#color2""#color3"
设置y轴高度
默认情况下,轨迹具有不同的y轴高度,具体取决于信号高度。
可以使用--max
选项为所有轨迹设置统一的y轴高度。在
gtracks INS track1.bw track2.bw track3.bw output.pdf --max 400
有关更多命令行选项,请参阅下面的“用法”页。在
环境变量
如果你想用你自己的大人物文件,但又不想写出来
每次运行gtracks
时,可以使用
环境变量GTRACKS_TRACKS
。在
export GTRACKS_TRACKS=track1.bw,track2.bw,track3.bw
gtracks output.pdf
也可以使用更改默认基因注释文件和调色板
环境变量GTRACKS_GENES_PATH
和GTRACKS_COLOR_PALETTE
。在
export GTRACKS_GENES_PATH=path/to/genes.bed.gz
export GTRACKS_COLOR_PALETTE="#color1,#color2,#color3"
gtracks output.pdf
使用
usage: gtracks [-h] [--genes <{path/to/genes.bed.gz,GRCh37,GRCh38,hg19,hg38}>]
[--color-palette <#color> [<#color> ...]] [--max <float>]
[--tmp-dir <temp/file/dir>] [--width <int>]
[--genes-height <int>] [--gene-rows <int>]
<{chr:start-end,GENE}> [<track.bw> [<track.bw> ...]]
<path/to/output.{pdf,png,svg}>
Plot bigWig signal tracks and gene annotations in a genomic region
positional arguments:
<{chr:start-end,GENE}>
coordinates or gene name to plot
<track.bw> bigWig files containing tracks
<path/to/output.{pdf,png,svg}>
path to output file
optional arguments:
-h, --help show this help message and exit
--genes <{path/to/genes.bed.gz,GRCh37,GRCh38,hg19,hg38}>
compressed 6-column BED file or 12-column BED12 file
containing gene annotations. Alternatively, providing
a genome identifier will use one of the included gene
tracks. (default: GRCh37)
--color-palette <#color> [<#color> ...]
color pallete for tracks
--max <float> max value of y-axis
--tmp-dir <temp/file/dir>
directory for temporary files
--width <int> width of plot in cm (default: 40)
--genes-height <int> height of genes track (default: 2)
--gene-rows <int> number of gene rows (default: 1)
- 项目
标签: