diff bin/fastq-interleave @ 0:06f8460885ff

migrate from GitHub
author yutaka-saito
date Sun, 19 Apr 2015 20:51:13 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/fastq-interleave	Sun Apr 19 20:51:13 2015 +0900
@@ -0,0 +1,12 @@
+#! /bin/bash
+
+# Reads 2 fastq files, and writes them interleaved.
+# Assumes 1 fastq per 4 lines, i.e. no line wrapping.
+
+paste <(cat "$1" | paste - - - -) <(cat "$2" | paste - - - -) | tr '\t' '\n'
+
+# Is this better?
+#paste <(zcat -f "$1"|paste - - - -) <(zcat -f "$2"|paste - - - -)|tr '\t' '\n'
+
+# This does not interpret "-" as stdin:
+#paste <(paste - - - - < "$1") <(paste - - - - < "$2") | tr '\t' '\n'