Skip to content

Instantly share code, notes, and snippets.

View rob-p's full-sized avatar
🎯
Focusing

Rob Patro rob-p

🎯
Focusing
View GitHub Profile
@rob-p
rob-p / test_decomp.sh
Created October 26, 2024 14:44
parallel decompression speed test
#!/bin/bash
#
# This is a rather minimal example Argbash potential
# Example taken from http://argbash.readthedocs.io/en/stable/example.html
#
# ARG_OPTIONAL_BOOLEAN([delete-tmp],[],[delete output directory])
# ARG_POSITIONAL_SINGLE([num-threads],[number of threads to run with],[])
# ARG_POSITIONAL_SINGLE([input],[input file list],[])
# ARG_HELP([Test how long it takes to decompress many files in parallel])
# ARGBASH_GO()
@rob-p
rob-p / record_search.rs
Created January 4, 2025 03:03
use memchr
fn create_record(line: &str) -> Record {
let finder = memchr::memmem::Finder::new("bc");
let mut iter = line.split('\t').peekable();
let name = iter.peek().unwrap().to_string();
let count = iter
.filter(|s| finder.find(s[1..4].as_bytes()).is_some())
.count();
Record::new(name, count)
}
#ifndef STREAMING_QUERY_HPP
#define STREAMING_QUERY_HPP
#include "../external/pthash/external/essentials/include/essentials.hpp"
#include "../include/dictionary.hpp"
#include "../include/query/streaming_query_canonical_parsing.hpp"
#include "../include/util.hpp"
#include <sstream>
namespace piscem {
@rob-p
rob-p / sra_stats_9_1_25.csv
Created September 1, 2025 14:55
sra growth
date bases open_access_bases bytes open_access_bytes
06/05/2007 20304190150 20304190150 50496285115 50496285115
04/04/2008 39591836573 39591836573 98175829054 98175829054
04/05/2008 41196134195 41196134195 102158063571 102158063571
04/09/2008 41645296177 41645296177 103295608811 103295608811
04/15/2008 41771058665 41771058665 103601716949 103601716949
04/17/2008 57166980893 57166980893 136281532630 136281532630
04/18/2008 59666402505 59666402505 142020536150 142020536150
04/19/2008 59832989101 59832989101 142367865452 142367865452
04/21/2008 61634022162 61634022162 146270545189 146270545189