Mercurial > repos > ebi-gxa > gtf2gene_list
annotate gtf2gene.R @ 0:040d4b3a19d5 draft
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
author | ebi-gxa |
---|---|
date | Wed, 03 Apr 2019 12:05:26 -0400 |
parents | |
children |
rev | line source |
---|---|
0
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
1 #!/usr/bin/env Rscript |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
2 |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
3 suppressPackageStartupMessages(require(rtracklayer)) |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
4 args <- commandArgs(TRUE) |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
5 |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
6 annotation <- elementMetadata(import( args[1] )) |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
7 genes <- unique(annotation[['gene_id']]) |
040d4b3a19d5
planemo upload for repository https://github.com/ebi-gene-expression-group/container-galaxy-sc-tertiary/tree/develop/tools/util/.shed.yml commit 9bf9a6e46a330890be932f60d1d996dd166426c4
ebi-gxa
parents:
diff
changeset
|
8 writeLines(genes[ ! is.na(genes)], con = 'genes.txt') |