view repeat_annotation_pipeline/get_gff_part.R @ 0:5b813673edf0 draft

Uploaded
author petr-novak
date Wed, 06 Oct 2021 10:52:43 +0000
parents
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])