diff get_gff_part.R @ 0:ea6a3059a6af draft

Uploaded
author petr-novak
date Mon, 18 Oct 2021 11:01:20 +0000
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/get_gff_part.R	Mon Oct 18 11:01:20 2021 +0000
@@ -0,0 +1,9 @@
+#!/usr/bin/env Rscript
+suppressPackageStartupMessages(library(rtracklayer))
+g = import(commandArgs(T)[1])
+gd = mcols(g)
+col_name=commandArgs(T)[2]
+col_value=commandArgs(T)[3]
+inc = gd[,col_name] %in% col_value
+g_part = sort(sortSeqlevels(g[inc]))
+export(g_part, format = 'gff3', commandArgs(T)[4])