r scripts wrapper
Project description
Python Wrappers for R scripts in bioinformatic analysis
This file will become your README and also the index of your documentation.
Install
pip install pyrwrapper
Plot Venn Diagram
faker.py venn-plot tests/venn.png \
--lists tests/list1.txt tests/list2.txt tests/list3.txt tests/list4.txt \
--tags ALL_file withpy withdot withgo \
--print-mode raw
Then you will get four files: tests/venn.png
, tests/venn.png.R
,tests/venn.png.R.e
,tests/venn.png.R.o
.
tests/venn.png
is the graph you want
tests/venn.png.R
is the R script, if you want to modify and re-run the script, it will be easy.
tests/venn.png.R.e
and tests/venn.png.R.o
is the stderr and stdout of running tests/venn.png.R
.
parameters
faker.py venn-plot
usage: faker.py venn-plot [-h] -l [LISTS [LISTS ...]] --tags [TAGS [TAGS ...]]
[--title TITLE] [-s SUB_TITLE]
[-p [PRINT_MODE [PRINT_MODE ...]]] [-r RSCRIPT]
output
venn diagram plot
positional arguments:
output figure output, the formats could be 'png','tiff','pdf'
optional arguments:
-h, --help show this help message and exit
-l [LISTS [LISTS ...]], --lists [LISTS [LISTS ...]]
lists file without title
--tags [TAGS [TAGS ...]]
tags corresponding to lists, the length of lists and tags should be the same
--title TITLE graph title
(default: Venn Diagram)
-s SUB_TITLE, --sub-title SUB_TITLE
graph subtitle
(default: )
-p [PRINT_MODE [PRINT_MODE ...]], --print-mode [PRINT_MODE [PRINT_MODE ...]]
could only be 'raw' or 'percent' or ('raw' and 'percent')
(default: ['raw', 'percent'])
-r RSCRIPT, --rscript RSCRIPT
the path of Rscript
(default: /usr/bin/env Rscript)
Plot complex heatmap
faker.py complexheatmap-plot tests/ch.pdf tests/matrix.csv tests/sample_info.csv \
-m Geneid \
--c-idx sample \
-v TEST_TPM \
--row-split-by gene_biotype \
--col-split-by condition \
--row-anno-point TV:transcript_version GV:gene_version \
--row-anno-bar CS:coding_score \
--row-anno-normal CT:classification \
--col-anno-point age \
--col-anno-bar BARAGE:age \
--col-anno-normal batch condition \
-t tests \
--sep-mi , \
--sep-ci , \
--rscript '/usr/bin/env Rscript'
Then you will get four files: tests/ch.pdf
, tests/complexheatmap.R
,tests/complexheatmap.R.e
,tests/complexheatmap.R.o
and two temporary files m.csv
, c.csv
tests/ch.pdf
is the graph you want
parameters
faker.py complexheatmap-plot
usage: faker.py complexheatmap-plot [-h] -m M_IDX --c-idx C_IDX
[--show-row-names] [--no-show-row-names]
[--show-column-names]
[--no-show-column-names] [-v VALUE_NAME]
[-w WIDTH] [--height HEIGHT]
[--row-split-by ROW_SPLIT_BY]
[--col-split-by COL_SPLIT_BY]
[--row-anno-point [ROW_ANNO_POINT [ROW_ANNO_POINT ...]]]
[--row-anno-bar [ROW_ANNO_BAR [ROW_ANNO_BAR ...]]]
[--row-anno-normal [ROW_ANNO_NORMAL [ROW_ANNO_NORMAL ...]]]
[--col-anno-point [COL_ANNO_POINT [COL_ANNO_POINT ...]]]
[--col-anno-bar [COL_ANNO_BAR [COL_ANNO_BAR ...]]]
[--col-anno-normal [COL_ANNO_NORMAL [COL_ANNO_NORMAL ...]]]
[--sep-mi SEP_MI] [--sep-ci SEP_CI]
[-t TMP] [--rscript RSCRIPT]
output matrix_in clinical_in
ComplextHeatmap plot
positional arguments:
output figure output, the formats could only be 'pdf'
matrix_in heatmap input data
clinical_in clinical input data
optional arguments:
-h, --help show this help message and exit
-m M_IDX, --m-idx M_IDX
heatmap index column name, e.g. 'geneid'
--c-idx C_IDX clinical index column name, which are used to identify the data columns in heatmap matrix
--show-row-names whether to show row names, if row number are too large, maybe not show.
(default: True)
--no-show-row-names
--show-column-names whether to show column names, if row number are too large, maybe not show.
(default: True)
--no-show-column-names
-v VALUE_NAME, --value-name VALUE_NAME
value name in the matrix, e.g. 'count', 'TPM'
(default: TPM)
-w WIDTH, --width WIDTH
width of the figure
(default: 10)
--height HEIGHT height of the figure
(default: 15)
--row-split-by ROW_SPLIT_BY
can specific split rows into different blocks by specific column in the matrix data, e.g. 'Pathway of genes'
(default: None)
--col-split-by COL_SPLIT_BY
can specific split columns into different blocks by specific column in the clinical data, e.g. 'condition'
(default: None)
--row-anno-point [ROW_ANNO_POINT [ROW_ANNO_POINT ...]]
can specific annotate row by point plot, you can also specify the name of annotation by log2fc:foldchange, e.g. 'foldchange' 'pvalue'
(default: None)
--row-anno-bar [ROW_ANNO_BAR [ROW_ANNO_BAR ...]]
can specific annotate row by bar plot,you can also specify the name of annotation by name:colname, e.g. 'flodchange' 'pvalue'
(default: None)
--row-anno-normal [ROW_ANNO_NORMAL [ROW_ANNO_NORMAL ...]]
can specific annotate row by condition,you can also specify the name of annotation by name:colname, e.g. 'biotype'
(default: None)
--col-anno-point [COL_ANNO_POINT [COL_ANNO_POINT ...]]
can specific annotate column by point plot, you can also specify the name of annotation by name:colname, e.g. 'age'
(default: None)
--col-anno-bar [COL_ANNO_BAR [COL_ANNO_BAR ...]]
can specific annotate column by bar plot, you can also specify the name of annotation by name:colname, e.g. 'age'
(default: None)
--col-anno-normal [COL_ANNO_NORMAL [COL_ANNO_NORMAL ...]]
can specific annotate column by condition, you can also specify the name of annotation by name:colname, e.g. 'gender'
(default: None)
--sep-mi SEP_MI separation in matirx file
(default: )
--sep-ci SEP_CI separation in clinical file
(default: )
-t TMP, --tmp TMP temporary direction
(default: ./)
--rscript RSCRIPT Rscript path
(default: /usr/bin/env Rscript)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pyrwrapper-0.0.1rc0.tar.gz
.
File metadata
- Download URL: pyrwrapper-0.0.1rc0.tar.gz
- Upload date:
- Size: 16.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d432e227cabe57e57b7e7be3d94143a1c6519f3df8146188974cda9de627e4f6 |
|
MD5 | 041a62a4768fb8aba9e76b108df32b34 |
|
BLAKE2b-256 | f09171a380ec025711a8cb2514cc31ddfef0b11acd845c3d212713e663c949a5 |
File details
Details for the file pyrwrapper-0.0.1rc0-py3-none-any.whl
.
File metadata
- Download URL: pyrwrapper-0.0.1rc0-py3-none-any.whl
- Upload date:
- Size: 16.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0272a40104d729a107950bccd9c5284e465ca83e06db1ba0b19272fc487f6bd |
|
MD5 | 30b04a43841a893efe15de5b34d8fca7 |
|
BLAKE2b-256 | 81d72c56d7b69c741dc52ef589b16160df6d0e0f8d8ce62a057c22681cf35377 |