Skip to content

Commit

Permalink
bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
junjunlab committed Mar 6, 2023
1 parent 907e53d commit f3c31a7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions R/GenericMethods.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
globalVariables(c("cdslen", "end", "start", 'tga', "tlen", "."))
globalVariables(c("cdslen", "end", "start", 'tga', "tlen", ".","gid"))

# ==============================================================================
# setGeneric
Expand Down Expand Up @@ -236,7 +236,8 @@ setMethod("filterRepTrans",
}

# return data.frame
tranLength <- data.frame(gid = unique(tg$gene_id),
tranLength <- data.frame(gname = unique(tg$gene_name),
gid = unique(tg$gene_id),
tid = tida[x],
tlen = sum(tmp$width),
cdslen = cdslen)
Expand Down Expand Up @@ -344,13 +345,16 @@ setMethod("getLongName",
if("5UTR" %in% ginfo.s$type | "five_prime_utr" %in% ginfo.s$type){
cds.sp <- cds.len + cds.st - 1
}else{
cds.sp <- cds.len + cds.st
if("CDS" %in% ginfo.s$type){
cds.sp <- cds.len + cds.st - 1
}else{
cds.sp <- cds.len + cds.st
}
}


# name
tname <- paste(gname,tid,cds.st,cds.sp,tlen,sep = sep)
res <- data.frame(gid = gname,tid = tid,tname = tname)
tname <- paste(gname,gid,tid,cds.st,cds.sp,tlen,sep = sep)
res <- data.frame(gname = gname,gid = gid,tid = tid,tname = tname)
return(res)
}) -> resName
# }) %>% do.call("rbind",.) %>% data.frame() -> resName
Expand Down

0 comments on commit f3c31a7

Please sign in to comment.