Last active
May 6, 2024 12:55
-
-
Save opplatek/8f64229ff219f81ba65ce35184f64222 to your computer and use it in GitHub Desktop.
Subset a BAM file by a number or fraction of mappings or reads
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Subsample BAM to $SUBSAMPLE_MAPPINGS mappings (approximately) | |
# | |
# TODO: Make subsampling by number of reads, not mappings (a single read can be mapped multiple times so the final number | |
# or "lines" will be different than the $SUBSAMPLE_READS) | |
# check out https://www.biostars.org/p/9592303/#9593989 | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment