User: hauken_heyken

gravatar for hauken_heyken
Reputation:
60
Status:
Trusted
Location:
Last seen:
2 weeks, 6 days ago
Joined:
2 years, 2 months ago
Email:
h************@hotmail.com

Posts by hauken_heyken

<prev • 32 results • page 2 of 4 • next >
1
vote
2
answers
630
views
2
answers
Comment: C: How to filter all column using Loop
... Ah, okey, now it makes sence. Then this will work: New version is: library(data.table) b=c(1,2,3,4,5,8,10) c=c(1,2,3,4,6,7,10) e=c(1,2,10,5,12,15,10) d = as.data.table(cbind(b,c,e)) indexesToRemove = lapply(1:ncol(d),function(x) ifelse(d[,as.integer(x), with = F] >= 5,as.integer(x), NA )) ...
written 2.0 years ago by hauken_heyken60
0
votes
2
answers
630
views
2
answers
Answer: A: How to filter all column using Loop
... I dont know if I understand your question correctly, but this will work, if you want to only keep columns with rows >= 5:   library(data.table) a = c(1,2,3,4,5) b = c(4,5,6,7,8) c = c(6,7,8,9,10) e = c(1,2,3,4,4) # <--- This column will be filtered out, because non is >= 5 d = as.data ...
written 2.0 years ago by hauken_heyken60
0
votes
2
answers
630
views
2
answers
Comment: A: How to filter all column using Loop
... Do you want all positions with < 5 to be replaced by NA values ? ...
written 2.0 years ago by hauken_heyken60
0
votes
2
answers
1.3k
views
2
answers
Comment: C: How to construct a valid GRanges object from RCPP and pass back to R
... BTW: This produces an error in package creation with devtools, do you know how to fix it: I put this in an cpp file: Environment envGenomicRanges("package:GenomicRanges"); Function GRanges = envGenomicRanges["GRanges"]; Then the namespace file contains this one, and more: import(GenomicRanges) ...
written 2.0 years ago by hauken_heyken60
0
votes
1
answer
523
views
1
answers
Comment: C: Accessing GRangesList rows in Rcpp
... This will work, and make it a lot easier, and more like how C++ should be, since I'm polluting my code with a lot of R API right now, which makes it slower I think. Thank you, I will accept your answer. Another point you make that is important, is that if you vectorize R code efficiently, then it ...
written 2.0 years ago by hauken_heyken60
0
votes
1
answer
523
views
1
answers
Comment: C: Accessing GRangesList rows in Rcpp
... I'm thinking about the simple vector possibility, but I still need a grouped vector by transcripts, makes it harder.. i.g if grangeslist have 2 transcript with two exons each, I would need to make a class or something for this, would be easier to use GRangesList API if it exists.. ...
written 2.0 years ago by hauken_heyken60
0
votes
1
answer
523
views
1
answers
Comment: C: Accessing GRangesList rows in Rcpp
... This is not my goal, it's only a part of the program, my whole program takes a GRangeslist and fastaSequences, and returns a GRangesList with all orfs of the original GRangeslist. I need this to access each GRangesList by transcript ...
written 2.0 years ago by hauken_heyken60
3
votes
1
answer
523
views
1
answer
Accessing GRangesList rows in Rcpp
... So a question that could have been asked in rcpp forum, but maybe you have already made a wrapper for it, so I ask here. I want to access the ith row of a GRangesList: #include <Rcpp.h> using namespace Rcpp; Environment envGRanges("package:GenomicRanges"); Function GRangesList = envGRang ...
grangeslist rcpp written 2.1 years ago by hauken_heyken60 • updated 2.0 years ago by Martin Morgan ♦♦ 24k
0
votes
1
answer
408
views
1
answers
Comment: C: Weaknesses with GRanges data type, or just me ?
... By looking through this post: https://support.bioconductor.org/p/62838/#62855   I found that this works, but not totaly what I want: #grl: grangesList #gr = unlist(grl) , granges object regrl = relist(u,grl) The groups are back, but they are not identical: identical(regrl,grl) [1] FALSE Th ...
written 2.1 years ago by hauken_heyken60
0
votes
1
answer
408
views
1
answers
Comment: C: Weaknesses with GRanges data type, or just me ?
... Yes, that is good, but since I need the grouping I need to do it on a GRangesList: This does not work: #grl: granges list grouped by transcript grl[grl$exon_id == 1]   Output is: GRangesList object of length 0: <0 elements> Only way I could get an output is something like this: gr ...
written 2.1 years ago by hauken_heyken60

Latest awards to hauken_heyken

Popular Question 11 months ago, created a question with more than 1,000 views. For How to construct a valid GRanges object from RCPP and pass back to R
Scholar 2.2 years ago, created an answer that has been accepted. For A: Subsetting Rle with ORF-sequence-positions by the 3 frames

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 225 users visited in the last hour