collect-columns-檢索一組表中每一個表的列,將它們放在單個輸出表中。-Leiden University Medical Center Installation Usage

collect-columns-檢索一組表中每一個表的列,將它們放在單個輸出表中。-Leiden University Medical Center

發佈:2020-12-23 14:17:41.864133

做者:Leiden University Medical Center

做者郵箱:sasc@lumc.nl

首頁:https://github.com/biowdl/collect-columns

文檔:None

下載連接

collect-columns

This tool retrieves a column from each in a set of tables and compiles into a single table. Optionally, additional attributes from the associated GTF/GFF file may be added to the output tables.git

Installation

Install from PyPI: pip install collect-columnsgithub

Install from github: * Clone the repository: git clone https://github.com/biowdl/collect-columns.git * Enter the repository: cd collect-columns * Install using pip: pip install .less

Usage

collect-columns output_path input_files...

It assumes that all input count tables are in the same format. By default the format is assumed to be headerless and tab separated, with the first column being the feature identifiers and the second the values of interest. The output table will use the same separator as the input tables and contain a header. The feature column will contain the feature identifiers, the value columns will be named after the input files or according to the names given through the -n option, which takes a list of names as argument.ide

Please note that if multiple rows with the same feature identifier exist in an input table, then these values will overwrite each other in the output table by default. See also the -S flag.this

In order to use a different input format the following options can be given:spa

| option | arguments | definition | |:-:|:-:|:-| | -f | a number | The index of the column containing the feature identifiers. | | -c | a number | The index of the column containing the values/counts. | | -s | a character | The separator.| | -H | | Indicates that the table has a header. | | -S | | Indicates that values should be added up if multiple rows exist with the same feature id. The values will become floats if this flag is set. By default only the last value will be taken and a warning will be give. |.net

To add additional attributes from a GTF/GFF, the following options can be given:rest

| option | arguments | definition | |:-:|:-:|:-| | -a | a list of words | The attributes to be added to the output table. | | -g | a path | The gtf file from which the attributes will be retrieved. | | -F | a word | The attribute used to map rows in the input tables to gtf record. Defaults to gene_id. |code

Examples

HTSeq-count

Using the output from HTSeq-count as input the following command:orm

collect-columns all.tsv s1.tsv s2.tsv

will result in a table like:

| feature | s1.tsv | s2.tsv | |:-------:|:------:|:------:| | MSTRG.1 | 10 | 11 | | MSTRG.2 | 60 | 12 | | ... | ... | ... |

Stringtie

Using stringtie abundance output as input, the following command:

collect-columns all.FPKM s1.abundance s2.abundance \
    -c 7 \
    -H \
    -a ref_gene_id gene_name \
    -g merged.gtf \
    -n sample1 sample2 \
    -S # Stringtie may at times return multiple rows for one gene, these values can simply be summed up.

will result in a table like:

| feature | refgeneid | genename | sample1 | sample2 | |:-------:|:-----------:|:---------:|:-------------:|:-----------:| | MSTRG.1 | g1 | gene1 | 185151.953125 | 151.964231 | | MSTRG.2 | g2 | gene_2 | 100160.070312 | 1160.030213 | | ... | ... | ... | ... | ... |

Copy from pypi.org

查詢時間:11.053ms
渲染時間:11.184ms

本文同步分享在 博客「zhenruyan」(other)。
若有侵權,請聯繫 support@oschina.cn 刪除。
本文參與「OSC源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。

相關文章
相關標籤/搜索