Hot answers tagged

7 votes

How do I efficiently subset a very large line-based file?

Turns out, simply keeping track of the next candidate line (after sorting the sample line numbers) fixes the performance issue, and most of the remaining slowness seems to be due to the overhead of ...
Konrad Rudolph's user avatar
5 votes
Accepted

Split FASTQ and matching BAM into matching chunks

Hmm, it's hard to think of a super efficient way of doing this (assuming the files aren't ordered the same - if they are then this whole answer is basically redundant). And also assuming the read ids ...
Michael Hall's user avatar
5 votes

How do I efficiently subset a very large line-based file?

Perl should be fairly fast with this when using a hash set to store the list of lines. A structure like this also works for subsetting based on a field value, where the comparison would be with the ...
gringer's user avatar
  • 13.9k
4 votes

How do I efficiently subset a very large line-based file?

Some related questions appear in other sites, with potentially interesting solutions, which I report here: To sample approximately 1% of the non-empty lines: ...
bli's user avatar
  • 3,130
3 votes
Accepted

Differential expression analysis for a subset of transcripts

It's safer to import everything. You'll want all the data for normalization and dispersion estimates.
swbarnes2's user avatar
  • 1,900
2 votes

Subsetting of object existing of two samples

I think your issue is simply not assigning the newly-subset object in to a new object. Assuming rownames(subset_DR1) is indeed a list of cell names ...
Kohl Kinning's user avatar
  • 1,149
2 votes

simple data subsetting on r

Here's an approach that uses native R, using the vectorized (fast) family of apply() functions. ...
Alex Reynolds's user avatar
2 votes

I am trying to create a subset of 10k variants from 25-30 unmapped contigs of a g.vcf file including the header

After some guidance from my advisor, this command allowed me to get the output file I needed. ...
Lauren Sabo's user avatar
1 vote

Seurat: Error in FetchData.Seurat(object = object, vars = unique(x = expr.char[vars.use]), : None of the requested variables were found:

I've come across the same error which seems to be a common issue when using the subset() function with Seurat objects. Sometimes, I encountered the same error and ...
Hamid G's user avatar
  • 11
1 vote

Metagenome simulation from a concatenated FASTA file

Given that you want to simulate short-read sequencing from reference genomes, there are read simulator programs that already exist. For example, see this answer.
gringer's user avatar
  • 13.9k
1 vote

Subsetting from seurat object based on orig.ident?

If you are going to use idents like that, make sure that you have told the software what your default ident category is. This works for me, with the metadata column being called "group", and ...
swbarnes2's user avatar
  • 1,900
1 vote

How do I efficiently subset a very large line-based file?

I wrote a command-line (C++14) tool called subset which is up on Github: https://github.com/alexpreynolds/subset This should be reasonably memory efficient and ...
Alex Reynolds's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible