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)
MuSiC deconvolution
faker.py music-deconvolution \
-c cell_type \
--samples sample \
-t tests \
tests/bulk_count.csv \
tests/sc_count.csv \
tests/bulk_info.csv \
tests/sc_info.csv \
tests/music.csv
Then we will get a deconvolution results as here
parameters
usage: faker.py music-deconvolution [-h] -c CLUSTER --samples SAMPLES
[--select-ct [SELECT_CT [SELECT_CT ...]]]
[--bulk-filter BULK_FILTER]
[--sc-filter SC_FILTER]
[--bulk-count-sep BULK_COUNT_SEP]
[--sc-count-sep SC_COUNT_SEP]
[--bulk-info-sep BULK_INFO_SEP]
[--sc-info-sep SC_INFO_SEP] [-t TMP]
[-r RSCRIPT]
bulk_count sc_count bulk_info sc_info
output
Multi-subject Single Cell deconvolution (MuSiC github.com/xuranw/MuSiC)
positional arguments:
bulk_count bulk RNA-seq count data, first columns should be the gene identification(unique)
sc_count single-cell RNA-seq count data, first columns should be the gene identification(unique) same as bulk_count
bulk_info bulk RNA-seq information
sc_info single-cell RNA-seq information: samples, cell type ,etc. The first column should be the cell identification.
output will write the result out in .csv format
optional arguments:
-h, --help show this help message and exit
-c CLUSTER, --cluster CLUSTER
column name of cell type in sc_info
--samples SAMPLES column name of sample name in sc_info, (need to know the single cell source, from which sample)
--select-ct [SELECT_CT [SELECT_CT ...]]
cell types to deconvolution
(default: NULL)
--bulk-filter BULK_FILTER
bulk RNA-seq depth filter
(default: 20)
--sc-filter SC_FILTER
single-cell RNA-seq depth filter
(default: 20)
--bulk-count-sep BULK_COUNT_SEP
bulk_count file separation
(default: ,)
--sc-count-sep SC_COUNT_SEP
single-cell count file separation
(default: ,)
--bulk-info-sep BULK_INFO_SEP
bulk_info file separation
(default: ,)
--sc-info-sep SC_INFO_SEP
single-cell info file separation
(default: ,)
-t TMP, --tmp TMP temporary file direction
(default: ./)
-r RSCRIPT, --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.1rc3.tar.gz
.
File metadata
- Download URL: pyrwrapper-0.0.1rc3.tar.gz
- Upload date:
- Size: 19.6 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 | 2f61ff06d8eb4c5d0c70cff340e38ad76ac620c48bc7006142a4f71b1dc76377 |
|
MD5 | 1f372ff7e6aff631626547953d63c48f |
|
BLAKE2b-256 | 16b9a72fb431884fd1ea4fe953c9ef06a68a8dfc171932c9bb1ef547b859b7f8 |
File details
Details for the file pyrwrapper-0.0.1rc3-py3-none-any.whl
.
File metadata
- Download URL: pyrwrapper-0.0.1rc3-py3-none-any.whl
- Upload date:
- Size: 19.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 | 880a11a97a62f1c848a792342830bfd4daf5626d7ec3b5269000b4ab83623cfd |
|
MD5 | 8f2c0059fb704a88506c563ecdfdfcd5 |
|
BLAKE2b-256 | bfbff31da50127187eebbcc40b9c1d2ba3dc7eacb4a0c386e99a5aeb23ca0f23 |