Last active
March 20, 2018 09:52
-
-
Save holgerbrandl/4b4755e6f314f4e7e34571d48d12b7e0 to your computer and use it in GitHub Desktop.
Filter fastq with id list
This file contains hidden or 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
//DEPS de.mpicbg.scicomp:kutils:0.7 | |
//KOTLIN_OPTS -J-Xmx10g -J-server | |
import de.mpicbg.scicomp.bioinfo.openFastq | |
import java.io.File | |
//val args = listOf("ID.txt", "../lanereps_pooled/s1_WT_A_R1_paired.fastq") | |
val filterIds = File(args[0]).readLines().map{ "@" + it} | |
openFastq(args[1]). | |
filter { filterIds.contains(it.id.split(" ")[0]) }. | |
// size | |
// first() | |
forEach { print(it.toEntryString()) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage