为一组表中的每个表检索一列,并将它们放在单个输出表中。

collect-columns的Python项目详细描述


收集列

此工具从一组表中的每个表中检索一列,并编译为一个表。 可选地,可以将相关gtf/gff文件中的其他属性添加到输出中 桌子。

安装

从pypi安装:pip install collect-columns

从github安装:

  • 克隆存储库:git clone https://github.com/biowdl/collect-columns.git
  • 输入存储库:cd collect-columns
  • 使用pip安装:pip install .

用法

collect-columns output_path input_files...

它假设所有的输入计数表都采用相同的格式。 默认情况下,格式假定为无标题和制表符分隔,并使用 第一列是特征标识符,第二列是感兴趣的值。 输出表将使用与输入表相同的分隔符,并包含 头球。feature列将包含特征标识符、值 列将根据输入文件或给定的名称命名 通过-n选项,该选项将名称列表作为参数。

为了使用不同的输入格式,可以提供以下选项:

optionargumentsdefinition
^{}a numberThe index of the column containing the feature identifiers.
^{}a numberThe index of the column containing the values/counts.
^{}a characterThe separator.
^{}Indicates that the table has a header.

要从gtf/gff添加其他属性,可以提供以下选项:

optionargumentsdefinition
^{}a list of wordsThe attributes to be added to the output table.
^{}a pathThe gtf file from which the attributes will be retrieved.
^{}a wordThe attribute used to map rows in the input tables to gtf record. Defaults to ^{}.

示例

htseq计数

使用htseq count的输出作为输入,执行以下命令:

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

将生成如下表格:

features1.tsvs2.tsv
MSTRG.11011
MSTRG.26012
.........

纵梁

使用Stringtie丰度输出作为输入,以下命令:

collect-columns all.FPKM s1.abundance s2.abundance \
    -c 7 \
    -H \
    -a ref_gene_id gene_name \
    -g merged.gtf \
    -n sample1 sample2

将生成如下表格:

featureref_gene_idgene_namesample1sample2
MSTRG.1g_1gene_1185151.953125151.964231
MSTRG.2g_2gene_2100160.0703121160.030213
...............

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java中的else if语句返回语法错误   http如何解析从表单到REST Java/Webservice的post请求   java如何在SpringBoot中为RestTemplate编写JUnit测试   java动态检查实例是否实现接口   java在Android中使用ArrayAdaptor时,数据不会显示   根据前序遍历返回二进制树的java方法   Arquillian测试类中的java注入始终为空   用户界面Java Swing自定义控件   java使用CompletableFutures递归地从同一函数的多个调用构建列表   在Java中将“.00”添加到整数BigDecimal   卡夫卡java未知\u主题\u或\u部分错误间歇性   java为什么我的getString()方法总是返回null?   java renameTo无法重命名文件   java为什么我可以强制转换对象?可以用其他对象来完成吗?   带有回写条件的java多根记录器   关于stackoverflow错误的java帮助?   java Websphere消息队列多线程   Java图形窗口/画布未垂直显示完整的六边形网格   java Sakai未在Tomcat服务器中启动