Code Monkey home page Code Monkey logo

subsamplefastq's Introduction

DOI

README

A simple and straight forward program that randomly sub samples a fastq file. Written in C++.

Uses a Fischer-Yates Shuffle to determine which reads it should sample from prior to reading through any files.

Uses the kseq.h header file by hl3 (http://lh3lh3.users.sourceforge.net/parsefastq.shtml).

This program randomly sub samples a fastq file: Files need to be in the fastq file and can be gzip compressed

Compile with make. 

Usage ./RandomSubFq [optionsp <file1> .. <filen>
  -t can be set with the total number of fastq records in the file (prefered as it keeps from looping over the file twice)
  -w needs to be set to the total number of records you want from the file (must be less than total records)
  -o sets a specific prefix to output files
  -s sets the seed 

If you pass more than one file to this program at a time it will pull the same records from each file. This is intended behavior for paired end reads.

This program assumes all files provided are of the same size and that paired end reads are in the same order.

subsamplefastq's People

Contributors

dylanbstorey avatar dylanstorey avatar

Stargazers

Matt Ralston avatar

Forkers

golharam

subsamplefastq's Issues

Comparison to Heng's "seqtk sample" ?

I only recently became aware of

% seqtk sample

Usage:   seqtk sample [-2] [-s seed=11] <in.fa> <frac>|<number>
Options: -s INT       RNG seed [11]
         -2           2-pass mode: twice as slow but with much reduced memory

If you want to do paired files, you just use the same RNG seed for R1 and R2 and you'll get the corresponding pairs.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.