diff --git a/star.wdl b/star.wdl
index 32dd0565dc2511c7c3073531c5f8e28c9ba707bf..92245ecd90fba746be99d99883b467231b85faaa 100644
--- a/star.wdl
+++ b/star.wdl
@@ -47,4 +47,19 @@ task Star {
         cpu: select_first([runThreadN, 1])
         memory: select_first([memory, 10])
     }
-}
\ No newline at end of file
+}
+
+task makeStarRGline {
+    String sample
+    String library
+    String? platform
+    String readgroup
+
+    command {
+        printf '"ID:${readgroup}" "LB:${library}" "PL:${default="ILLUMINA" platform}" "SM:${sample}"'
+    }
+
+    output {
+        String rgLine = read_string(stdout())
+    }
+}