view get_gff_part.R @ 5:eca9213923b1 draft

"planemo upload commit d13521cdda334d0ce44b9a2bff047168a8bbaae0"
author petr-novak
date Fri, 22 Apr 2022 10:26:11 +0000
parents ea6a3059a6af
children
line wrap: on
line source

#!/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])