Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Aurelien Brionne
GenomeFeatures
Commits
e988705c
Commit
e988705c
authored
May 17, 2018
by
Aurelien Brionne
Browse files
build_genome_feature gff red upgrade
parent
2b6d87c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
R/build_genome_features.R
View file @
e988705c
...
...
@@ -410,8 +410,17 @@ setMethod("build_genome_features",definition=function(txdb,features,parameters)
###################
# read the gff
gff
<-
data.table
::
fread
(
file
,
fill
=
T
,
drop
=
base
::
c
(
2
,
6
,
8
),
verbose
=
F
,
showProgress
=
F
,
col.names
=
base
::
c
(
"chr"
,
"type"
,
"start"
,
"end"
,
"strand"
,
"att"
))[
data.table
::
like
(
type
,
"RNA|transcript"
)
&
!
data.table
::
like
(
chr
,
"^#"
)]
#gff<-data.table::fread(file,fill=T,drop=base::c(2,6,8),verbose=F,showProgress=F,col.names=base::c("chr",
#"type","start","end","strand","att"))[data.table::like(type,"RNA|transcript") & !data.table::like(chr,"^#")]
gff
<-
data.table
::
fread
(
file
,
sep
=
""
,
verbose
=
F
,
showProgress
=
F
,
header
=
F
)[
data.table
::
like
(
base
::
gsub
(
"ID=.+$"
,
""
,
V1
),
"[[:space:]].+(RNA|transcript)"
),]
###################
# parse it
gff
<-
gff
[,{
tmp
=
data.table
::
data.table
(
base
::
t
(
base
::
strsplit
(
V1
,
"\t"
)[[
1
]]));
base
::
list
(
chr
=
tmp
$
V1
,
type
=
tmp
$
V3
,
start
=
tmp
$
V4
,
end
=
tmp
$
V5
,
strand
=
tmp
$
V7
,
att
=
tmp
$
V9
)
},
by
=
1
:
base
::
nrow
(
gff
)][,
base
:=
NULL
]
###################
# remove files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment