Repository 'rnaseq_pro_workflow_tools'
hg clone https://toolshed.g2.bx.psu.edu/repos/marpiech/rnaseq_pro_workflow_tools

Changeset 0:c5a812cdf478 (2016-12-09)
Next changeset 1:ddde82ae5dea (2016-12-11)
Commit message:
planemo upload
added:
countmatrixforedger.xml
plotheatmap.xml
test-data/annotation
test-data/count.matrix
test-data/data1
test-data/data2
test-data/data3
test-data/data4
test-data/done
test-data/error.log
test-data/heatmap.pdf
test-data/rerror.log
test-data/rscript.log
test-data/script.data
test-data/script.log
test-data/stats.data
tools/script.R
tools/scrsh.sh
b
diff -r 000000000000 -r c5a812cdf478 countmatrixforedger.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/countmatrixforedger.xml Fri Dec 09 10:52:35 2016 -0500
[
@@ -0,0 +1,95 @@
+<tool id="countmatrixforedger" name="countMatrixForEdger" version="1.0">
+    <description>Make a count matrix for edgeR</description>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command>
+        <![CDATA[ 
+            #for $i, $s in enumerate( $sample )#
+                echo -e ${s.sample_data}"\t"${s.sample_name}"\t"${s.sample_group} >> script.data;
+            #end for#
+
+            cat script.data > /tmp/script.data;
+            $__tool_directory__/tools/scrsh.sh script.data;
+
+            cat count.matrix > $count_matrix;
+            cat annotation > $annotation;
+            cat script.log > $log;
+            cat error.log > $error_log
+
+        ]]>
+    </command>
+    <inputs>
+        <repeat name="sample" title="">
+            <param name="sample_data" type="data" format="data" label="" help="" />
+            <param name="sample_name" type="text" label="" help="" />
+            <param name="sample_group" type="text" label="" help="" />
+        </repeat>
+    </inputs>
+    <outputs>
+<!--        <data name="output" format="data" /> -->
+        <data name="count_matrix" format="data" />
+        <data name="annotation" format="data" />
+        <data name="log" format="data" />
+        <data name="error_log" format="data" />
+    </outputs>
+    <tests>
+<!--         <test>
+            <param name="sample_0|sample_data" value="data1" />
+            <param name="sample_1|sample_data" value="data2" />
+            <param name="sample_2|sample_data" value="data3" />
+            <param name="sample_3|sample_data" value="data4" />
+            <param name="sample_0|sample_name" value="sample1" />
+            <param name="sample_1|sample_name" value="sample2" />
+            <param name="sample_2|sample_name" value="sample3" />
+            <param name="sample_3|sample_name" value="sample4" />            
+            <param name="sample_0|sample_group" value="gr1" />
+            <param name="sample_1|sample_group" value="gr1" />
+            <param name="sample_2|sample_group" value="gr2" />
+            <param name="sample_3|sample_group" value="gr2" />
+            <output name="output" file="output"/>
+
+        </test> -->
+        <test>
+            <param name="sample_0|sample_data" value="data1" />
+            <param name="sample_1|sample_data" value="data2" />
+            <param name="sample_2|sample_data" value="data3" />
+            <param name="sample_3|sample_data" value="data4" />
+            <param name="sample_0|sample_name" value="sample1" />
+            <param name="sample_1|sample_name" value="sample2" />
+            <param name="sample_2|sample_name" value="sample3" />
+            <param name="sample_3|sample_name" value="sample4" />            
+            <param name="sample_0|sample_group" value="gr1" />
+            <param name="sample_1|sample_group" value="gr1" />
+            <param name="sample_2|sample_group" value="gr2" />
+            <param name="sample_3|sample_group" value="gr2" />
+            <output name="count_matrix" file="count.matrix"/>
+            <output name="annotation" file="annotation"/>
+            <output name="log" file="script.log"/>
+            <output name="error_log" file="error.log"/>
+        </test>
+
+    </tests>
+    <help>
+        <![CDATA[ 
+
+tutaj cos bedzie
+     ]]>
+    </help>
+        <citations>
+        <citation type="bibtex">
+            @article{Berenger2014,
+              doi = {10.1186/1758-2946-6-23},
+              url = {http://dx.doi.org/10.1186/1758-2946-6-23},
+              year  = {2014},
+              publisher = {Springer Nature},
+              volume = {6},
+              number = {1},
+              pages = {23},
+              author = {Francois Berenger and Arnout Voet and Xiao Lee and Kam YJ Zhang},
+              title = {A rotation-translation invariant molecular descriptor of partial charges and its use in ligand-based virtual screening},
+              journal = {Journal of Cheminformatics}
+            }
+        </citation>
+    </citations>
+</tool>
b
diff -r 000000000000 -r c5a812cdf478 plotheatmap.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/plotheatmap.xml Fri Dec 09 10:52:35 2016 -0500
[
@@ -0,0 +1,57 @@
+<tool id="plotheatmap" name="plotheatmap" version="1.0">
+    <description>Make a count matrix for edgeR</description>
+    <stdio>
+        <exit_code range="1:" />
+    </stdio>
+    <command>
+        <![CDATA[ 
+            $__tool_directory__/tools/script.R $count_matrix $stats_matrix $log_fc $log_cpm $pvalue $fdr > $rscript_log 2> $rerror_log
+
+
+
+        ]]>
+    </command>
+    <inputs>
+        <param name="count_matrix" type="data" format="data" label=""/>
+        <param name="stats_matrix" type="data" format="data" label=""/>
+        <param name="log_fc" type="float" value="0.5" label=""/>
+        <param name="log_cpm" type="float" value="0.5" label=""/>
+        <param name="pvalue" type="float" value="0.5" label=""/>
+        <param name="fdr" type="float" value="0.5" label=""/>
+
+    </inputs>
+    <outputs>
+<!--        <data name="output" format="data" /> --> 
+       <data format="pdf" name="haetamappdf" from_work_dir="heatmap.pdf" >
+            <filter>(outftype == 'pdf')</filter>
+        </data>
+        <data name="rscript_log" format="data" />
+        <data name="rerror_log" format="data" />
+    </outputs>
+    <tests>
+
+        <test>
+            <param name="count_matrix" value="count.matrix"/>
+            <param name="stats_matrix" value="stats.data"/>
+            <param name="log_fc" value="1"/>
+            <param name="log_cpm" value="2"/>
+            <param name="pvalue" value="0.05"/>
+            <param name="fdr" value="0.1"/>
+<!--             <output name="output" file="done"/> -->
+            <output name="haetamappdf" file="heatmap.pdf" ftype="pdf" compare="sim_size" />
+            <output name="rscript_log" file="rscript.log"/>
+            <output name="rerror_log" file="rerror.log"/>
+
+        </test>
+
+    </tests>
+    <help>
+        <![CDATA[ 
+
+tutaj cos bedzie
+     ]]>
+    </help>
+    <citations>
+        
+    </citations>
+</tool>
\ No newline at end of file
b
diff -r 000000000000 -r c5a812cdf478 test-data/annotation
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/annotation Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1680 @@\n+gene_ID\tstart_coord\tend_coord\n+Cj0001\t1\t1323\n+Cj0002\t1483\t2550\n+Cj0003\t2579\t4888\n+Cj0004c\t4916\t5257\n+Cj0005c\t5260\t6498\n+Cj0006\t6703\t8010\n+Cj0007\t8144\t12634\n+Cj0008\t12644\t14395\n+Cj0009\t14398\t15843\n+Cj0010c\t15844\t16419\n+Cj0011c\t16452\t16691\n+Cj0012c\t16756\t17403\n+Cj0013\t17563\t19239\n+Cj0014c\t19251\t19775\n+Cj0015c\t19867\t21093\n+Cj0016\t21159\t21833\n+Cj0017c\t21854\t23380\n+Cj0018c\t23392\t23559\n+Cj0019c\t23665\t25443\n+Cj0020c\t25433\t26347\n+Cj0021c\t26411\t27289\n+Cj0022c\t27402\t28304\n+Cj0023\t28382\t29710\n+Cj0024\t29726\t32095\n+Cj0025c\t32134\t33519\n+Cj0026c\t33639\t34262\n+Cj0027\t34382\t36013\n+Cj0028\t36000\t37571\n+Cj0029\t37667\t38662\n+Cj0030\t44966\t46363\n+Cj0031\t46424\t50156\n+Cj0033\t50156\t51937\n+Cj0034c\t51967\t52668\n+Cj0035c\t52665\t53867\n+Cj0036\t53970\t55319\n+Cj0037c\t55343\t56386\n+Cj0038c\t56564\t57211\n+Cj0039c\t57211\t59019\n+Cj0040\t59154\t59477\n+Cj0041\t59493\t61289\n+Cj0042\t61343\t62227\n+Cj0043\t62231\t63868\n+Cj0044c\t63872\t65743\n+Cj0045c\t65744\t66466\n+Cj0053c\t68532\t69548\n+Cj0054c\t69548\t70153\n+Cj0055c\t70274\t71098\n+Cj0056c\t71155\t71571\n+Cj0057\t72005\t72859\n+Cj0058\t72844\t73443\n+Cj0059c\t73492\t74334\n+Cj0060c\t74331\t75410\n+Cj0061c\t75410\t76126\n+Cj0062c\t76083\t76439\n+Cj0063c\t76458\t77324\n+Cj0064c\t77317\t78771\n+Cj0065c\t78781\t79254\n+Cj0066c\t79257\t79736\n+Cj0067\t79827\t81056\n+Cj0068\t81044\t81940\n+Cj0069\t82019\t83050\n+Cj0070c\t83047\t83205\n+Cj0073c\t84087\t84743\n+Cj0074c\t84736\t86175\n+Cj0075c\t86172\t86912\n+Cj0076c\t87036\t88718\n+Cj0077c\t88890\t89459\n+Cj0078c\t89470\t90267\n+Cj0079c\t90264\t91070\n+Cj0080\t91147\t91416\n+Cj0081\t91417\t92979\n+Cj0082\t92979\t94103\n+Cj0085c\t94297\t94992\n+Cj0086c\t95108\t95803\n+Cj0087\t96074\t97480\n+Cj0088\t97496\t98833\n+Cj0089\t98941\t100302\n+Cj0090\t100312\t100680\n+Cj0091\t100704\t101327\n+Cj0092\t101410\t102747\n+Cj0093\t102757\t103959\n+Cj0094\t104118\t104426\n+Cj0095\t104437\t104691\n+Cj0096\t104798\t105850\n+Cj0097\t105955\t106710\n+Cj0098\t106784\t107701\n+Cj0099\t107664\t108317\n+Cj0100\t108314\t109099\n+Cj0101\t109105\t109941\n+Cj0102\t110002\t110427\n+Cj0103\t110438\t110950\n+Cj0104\t110953\t111474\n+Cj0105\t111488\t112993\n+Cj0106\t113002\t113886\n+Cj0107\t113912\t115309\n+Cj0108\t115313\t115702\n+Cj0109\t115702\t116256\n+Cj0110\t116265\t116654\n+Cj0111\t116657\t117436\n+Cj0112\t117446\t118654\n+Cj0113\t118731\t119228\n+Cj0114\t119232\t120179\n+Cj0115\t120194\t120763\n+Cj0116\t120763\t121683\n+Cj0117\t121680\t122369\n+Cj0118\t122366\t123121\n+Cj0119\t123126\t123647\n+Cj0120\t123647\t124261\n+Cj0121\t124258\t124665\n+Cj0122\t124789\t125478\n+Cj0123c\t125503\t126429\n+Cj0124c\t126426\t127412\n+Cj0125c\t127402\t127764\n+Cj0126c\t127776\t128237\n+Cj0127c\t128227\t129069\n+Cj0128c\t129078\t129800\n+Cj0129c\t129800\t132019\n+Cj0130\t132096\t132923\n+Cj0131\t133003\t134376\n+Cj0132\t134376\t135260\n+Cj0133\t135299\t135700\n+Cj0134\t135709\t136587\n+Cj0135\t136612\t136869\n+Cj0136\t136856\t139471\n+Cj0137\t139468\t139830\n+Cj0138\t139820\t140242\n+Cj0139\t140289\t142640\n+Cj0140\t142633\t143964\n+Cj0141c\t143953\t144756\n+Cj0142c\t144749\t145603\n+Cj0143c\t145616\t146506\n+Cj0144\t146705\t148684\n+Cj0145\t148819\t150600\n+Cj0146c\t150638\t151576\n+Cj0147c\t151710\t152024\n+Cj0148c\t152081\t152419\n+Cj0149c\t152419\t153666\n+Cj0150c\t153670\t154872\n+Cj0151c\t154884\t155690\n+Cj0152c\t155684\t156622\n+Cj0153c\t156615\t157298\n+Cj0154c\t157312\t158136\n+Cj0155c\t158139\t158339\n+Cj0156c\t158418\t159074\n+Cj0157c\t159076\t159483\n+Cj0158c\t159483\t159908\n+Cj0159c\t159908\t160489\n+Cj0160c\t160486\t161229\n+Cj0161c\t161232\t162194\n+Cj0162c\t162207\t162722\n+Cj0163c\t162719\t163216\n+Cj0164c\t163207\t164091\n+Cj0166\t164162\t165031\n+Cj0167c\t165017\t165580\n+Cj0168c\t165938\t166105\n+Cj0169\t166373\t167035\n+Cj0170\t167050\t167794\n+Cj0172c\t167807\t169012\n+Cj0173c\t169054\t169962\n+Cj0174c\t169946\t171562\n+Cj0175c\t171562\t172566\n+Cj0176c\t172563\t172694\n+Cj0177\t172916\t173767\n+Cj0178\t173764\t176031\n+Cj0179\t176043\t176804\n+Cj0180\t176791\t177201\n+Cj0181\t177203\t177949\n+Cj0182\t177995\t179200\n+Cj0183\t179299\t180657\n+Cj0184c\t180702\t181856\n+Cj0185c\t181866\t182075\n+Cj0186c\t182068\t182787\n+Cj0187c\t182859\t183425\n+Cj0188c\t183416\t184786\n+Cj0189c\t184770\t185468\n+Cj0190c\t185470\t186975\n+Cj0191c\t186972\t187499\n+Cj0192c\t187535\t188119\n+Cj0193c\t188119\t189453\n+Cj0194\t189596\t190168\n+Cj0195\t190168\t191553\n+Cj0196c\t191556\t192893\n+Cj0197c\t192895\t193623\n'..b'614\t1540807\t1542936\n+Cj1615\t1542911\t1543897\n+Cj1616\t1543897\t1544673\n+Cj1617\t1544670\t1545476\n+Cj1618c\t1545473\t1546390\n+Cj1619\t1546496\t1547755\n+Cj1620c\t1547741\t1548760\n+Cj1621\t1548833\t1549585\n+Cj1622\t1550235\t1551245\n+Cj1623\t1551226\t1551747\n+Cj1624c\t1551755\t1553119\n+Cj1625c\t1553134\t1554384\n+Cj1626c\t1554644\t1555060\n+Cj1627c\t1555124\t1555867\n+Cj1628\t1556025\t1556450\n+Cj1629\t1556443\t1556832\n+Cj1630\t1556829\t1557512\n+Cj1631c\t1557525\t1558394\n+Cj1632c\t1558398\t1558559\n+Cj1633\t1558654\t1559637\n+Cj1634c\t1559723\t1560811\n+Cj1635c\t1560811\t1561485\n+Cj1636c\t1561472\t1561912\n+Cj1637c\t1561899\t1562885\n+Cj1638\t1562955\t1564772\n+Cj1639\t1564854\t1565126\n+Cj1640\t1565113\t1565664\n+Cj1641\t1565648\t1566931\n+Cj1642\t1566935\t1567246\n+Cj1643\t1567243\t1568337\n+Cj1644\t1568334\t1569179\n+Cj1645\t1569190\t1571088\n+Cj1646\t1571090\t1572199\n+Cj1647\t1572200\t1572922\n+Cj1648\t1572925\t1573815\n+Cj1649\t1573815\t1574414\n+Cj1650\t1574470\t1574970\n+Cj1651c\t1575339\t1576097\n+Cj1652c\t1576099\t1576851\n+Cj1653c\t1576853\t1577311\n+Cj1654c\t1577320\t1578489\n+Cj1655c\t1578486\t1579634\n+Cj1656c\t1579777\t1579959\n+Cj1658\t1580836\t1582926\n+Cj1659\t1582923\t1583462\n+Cj1660\t1583545\t1584948\n+Cj1661\t1584935\t1586227\n+Cj1662\t1586217\t1587335\n+Cj1663\t1587332\t1587985\n+Cj1664\t1587982\t1588470\n+Cj1665\t1588431\t1588934\n+Cj1666c\t1588944\t1589381\n+Cj1667c\t1589462\t1589614\n+Cj1668c\t1589680\t1590096\n+Cj1669c\t1590752\t1591600\n+Cj1670c\t1591600\t1592262\n+Cj1671c\t1592252\t1592455\n+Cj1672c\t1592521\t1593765\n+Cj1673c\t1593765\t1594796\n+Cj1674\t1594902\t1595762\n+Cj1675\t1595774\t1596043\n+Cj1676\t1596040\t1596816\n+Cj1677\t1597008\t1600372\n+Cj1679\t1600574\t1602328\n+Cj1680c\t1602332\t1603099\n+Cj1681c\t1603139\t1603903\n+Cj1682c\t1603983\t1605251\n+Cj1684c\t1605366\t1606541\n+Cj1685c\t1606522\t1607358\n+Cj1686c\t1607360\t1609462\n+Cj1687\t1609657\t1610928\n+Cj1688c\t1610956\t1612221\n+Cj1689c\t1612221\t1612613\n+Cj1690c\t1612618\t1613061\n+Cj1691c\t1613073\t1613429\n+Cj1692c\t1613439\t1613975\n+Cj1693c\t1614054\t1614449\n+Cj1694c\t1614459\t1614644\n+Cj1695c\t1614646\t1615191\n+Cj1696c\t1615195\t1615428\n+Cj1697c\t1615428\t1615796\n+Cj1698c\t1615796\t1616047\n+Cj1699c\t1616057\t1616242\n+Cj1700c\t1616229\t1616654\n+Cj1701c\t1616657\t1617358\n+Cj1702c\t1617358\t1617783\n+Cj1703c\t1617794\t1618075\n+Cj1704c\t1618077\t1618907\n+Cj1705c\t1618909\t1619190\n+Cj1706c\t1619193\t1619807\n+Cj1707c\t1619804\t1620379\n+Cj1708c\t1620389\t1620700\n+Cj1709c\t1620899\t1621660\n+Cj1710c\t1621696\t1623690\n+Cj1711c\t1623659\t1624459\n+Cj1712\t1624541\t1625077\n+Cj1713\t1625100\t1626170\n+Cj1714\t1626167\t1626265\n+Cj1715\t1626807\t1627337\n+Cj1716c\t1627317\t1627919\n+Cj1717c\t1627921\t1629333\n+Cj1718c\t1629320\t1630396\n+Cj1719c\t1630393\t1631928\n+Cj1720\t1632248\t1632877\n+Cj1721c\t1632901\t1633545\n+Cj1722c\t1633791\t1633892\n+Cj1723c\t1633895\t1634119\n+Cj1724c\t1634296\t1634679\n+Cj1725\t1634839\t1635438\n+Cj1726c\t1635443\t1636324\n+Cj1727c\t1636407\t1637678\n+Cj1728c\t1637923\t1638078\n+Cj1729c\t1638104\t1640701\n+Cj1731c\t1640904\t1641386\n+Cjp01\t40866\t40941\n+Cjp02\t40950\t41026\n+Cjp03\t165728\t165802\n+Cjp04\t395747\t395822\n+Cjp05\t395831\t395907\n+Cjp06\t433867\t433942\n+Cjp07\t433992\t434077\n+Cjp08\t434084\t434160\n+Cjp09\t435831\t435906\n+Cjp10\t460270\t460346\n+Cjp11\t513138\t513451\n+Cjp12\t533097\t533172\n+Cjp13\t533206\t533280\n+Cjp14\t698041\t698116\n+Cjp15\t698125\t698201\n+Cjp16\t826066\t826152\n+Cjp17\t826163\t826237\n+Cjp19\t878223\t878298\n+Cjp20\t878400\t878475\n+Cjp21\t943535\t943611\n+Cjp22\t1154100\t1154174\n+Cjp23\t1215057\t1215133\n+Cjp24\t1215241\t1215316\n+Cjp25\t1287737\t1287826\n+Cjp26\t1432370\t1432467\n+Cjp27\t1549657\t1549731\n+Cjp28\t1549741\t1549829\n+Cjp29\t1549848\t1549921\n+Cjp30\t1549943\t1550030\n+Cjp32\t1590531\t1590607\n+Cjp33\t1590632\t1590709\n+Cjp34\t1626279\t1626355\n+Cjp35\t1626625\t1626700\n+Cjp36\t1626704\t1626779\n+Cjr01\t39249\t40761\n+Cjr02\t41568\t44457\n+Cjr03\t44741\t44860\n+Cjr04\t394130\t395642\n+Cjr05\t396449\t399360\n+Cjr06\t399644\t399763\n+Cjr07\t696424\t697936\n+Cjr08\t698743\t701654\n+Cjr09\t701939\t702058\n+Cjs01\t1293300\t1293658\n+Cjs02\t418412\t418516\n+Cjs03\t66646\t66744\n+Cjt01\t872889\t872974\n+Cjt02\t878095\t878171\n+Cjt03\t878608\t878683\n+Cjt04\t878691\t878766\n+Cjt05\t1590271\t1590355\n+Cjt06\t1626491\t1626578\n+Cjt1\t434265\t434339\n+Cjt2\t878480\t878556\n+Cjt3\t1590360\t1590436\n+Cjt4\t1590451\t1590527\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/count.matrix
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/count.matrix Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1681 @@\n+#\tgr1:gr1\tgr1:gr1\tgr2:gr2\tgr2:gr2\n+#Feature\tsample1\tsample2\tsample3\tsample4\n+Cj0001\t416\t407\t516\t506\n+Cj0002\t1818\t1778\t2774\t2645\n+Cj0003\t3067\t3039\t2904\t2873\n+Cj0004c\t42\t36\t60\t59\n+Cj0005c\t215\t229\t235\t216\n+Cj0006\t208\t201\t216\t228\n+Cj0007\t3190\t3015\t3058\t3067\n+Cj0008\t2059\t2058\t1783\t1815\n+Cj0009\t2369\t2426\t1803\t1772\n+Cj0010c\t261\t271\t224\t203\n+Cj0011c\t2347\t2313\t2225\t2331\n+Cj0012c\t22026\t21796\t20028\t19844\n+Cj0013\t713\t755\t578\t612\n+Cj0014c\t582\t552\t687\t700\n+Cj0015c\t942\t902\t880\t846\n+Cj0016\t266\t279\t312\t309\n+Cj0017c\t364\t386\t350\t339\n+Cj0018c\t77\t80\t34\t49\n+Cj0019c\t1128\t1168\t1338\t1279\n+Cj0020c\t769\t794\t1258\t1199\n+Cj0021c\t330\t348\t357\t358\n+Cj0022c\t67\t62\t62\t67\n+Cj0023\t1243\t1292\t1355\t1287\n+Cj0024\t1722\t1626\t1657\t1578\n+Cj0025c\t92\t93\t76\t82\n+Cj0026c\t416\t386\t306\t291\n+Cj0027\t2958\t2930\t3305\t3106\n+Cj0028\t589\t609\t568\t643\n+Cj0029\t274\t229\t229\t226\n+Cj0030\t175\t167\t214\t197\n+Cj0031\t455\t429\t443\t465\n+Cj0033\t347\t326\t315\t272\n+Cj0034c\t661\t585\t487\t509\n+Cj0035c\t76\t62\t50\t68\n+Cj0036\t724\t737\t774\t712\n+Cj0037c\t976\t1062\t1175\t1136\n+Cj0038c\t56\t53\t92\t116\n+Cj0039c\t2107\t2168\t1869\t1899\n+Cj0040\t583\t556\t712\t705\n+Cj0041\t1199\t1198\t996\t1000\n+Cj0042\t717\t736\t792\t816\n+Cj0043\t1084\t1027\t942\t973\n+Cj0044c\t990\t998\t1149\t1065\n+Cj0045c\t491\t494\t497\t485\n+Cj0053c\t556\t555\t482\t437\n+Cj0054c\t577\t489\t609\t637\n+Cj0055c\t342\t297\t496\t481\n+Cj0056c\t628\t586\t693\t679\n+Cj0057\t107\t87\t120\t113\n+Cj0058\t85\t95\t108\t123\n+Cj0059c\t456\t379\t432\t418\n+Cj0060c\t357\t338\t398\t398\n+Cj0061c\t481\t452\t417\t376\n+Cj0062c\t543\t523\t562\t568\n+Cj0063c\t672\t707\t922\t890\n+Cj0064c\t1215\t1239\t1167\t1117\n+Cj0065c\t452\t419\t239\t201\n+Cj0066c\t1053\t1091\t693\t754\n+Cj0067\t293\t296\t474\t409\n+Cj0068\t140\t111\t126\t103\n+Cj0069\t4382\t4382\t4565\t4364\n+Cj0070c\t46\t47\t45\t49\n+Cj0073c\t4150\t4181\t4789\t4752\n+Cj0074c\t16990\t16764\t13677\t13480\n+Cj0075c\t7511\t7456\t5857\t5921\n+Cj0076c\t10698\t10831\t10024\t9861\n+Cj0077c\t107\t88\t94\t96\n+Cj0078c\t279\t290\t317\t296\n+Cj0079c\t356\t369\t270\t279\n+Cj0080\t32\t37\t30\t26\n+Cj0081\t227\t264\t292\t258\n+Cj0082\t233\t197\t191\t208\n+Cj0085c\t461\t491\t530\t542\n+Cj0086c\t300\t302\t366\t336\n+Cj0087\t13092\t12857\t12609\t12257\n+Cj0088\t6614\t6636\t5357\t5250\n+Cj0089\t1546\t1572\t2069\t1999\n+Cj0090\t217\t186\t208\t221\n+Cj0091\t1058\t1021\t731\t701\n+Cj0092\t702\t719\t699\t674\n+Cj0093\t602\t656\t700\t691\n+Cj0094\t4440\t4542\t4809\t4757\n+Cj0095\t4239\t4229\t5271\t5133\n+Cj0096\t187\t197\t241\t206\n+Cj0097\t161\t180\t160\t159\n+Cj0098\t128\t151\t123\t138\n+Cj0099\t872\t887\t2327\t2232\n+Cj0100\t1185\t1086\t1375\t1366\n+Cj0101\t571\t537\t751\t702\n+Cj0102\t1935\t1958\t2539\t2472\n+Cj0103\t1098\t1205\t1281\t1266\n+Cj0104\t662\t710\t1136\t1041\n+Cj0105\t3419\t3533\t4488\t4474\n+Cj0106\t1107\t1169\t1445\t1400\n+Cj0107\t6338\t6201\t5494\t5364\n+Cj0108\t283\t286\t282\t286\n+Cj0109\t444\t459\t384\t372\n+Cj0110\t174\t167\t147\t147\n+Cj0111\t302\t330\t336\t343\n+Cj0112\t682\t676\t767\t762\n+Cj0113\t5780\t5822\t6496\t6260\n+Cj0114\t2240\t2320\t2674\t2574\n+Cj0115\t1920\t2000\t2089\t2015\n+Cj0116\t899\t858\t1513\t1597\n+Cj0117\t426\t412\t489\t495\n+Cj0118\t433\t481\t426\t411\n+Cj0119\t143\t121\t113\t136\n+Cj0120\t27\t29\t40\t45\n+Cj0121\t34\t28\t36\t36\n+Cj0122\t55\t64\t96\t87\n+Cj0123c\t97\t121\t102\t122\n+Cj0124c\t258\t262\t325\t283\n+Cj0125c\t165\t151\t155\t159\n+Cj0126c\t217\t232\t219\t234\n+Cj0127c\t696\t701\t806\t837\n+Cj0128c\t105\t82\t106\t110\n+Cj0129c\t1859\t1872\t2101\t2043\n+Cj0130\t256\t249\t255\t251\n+Cj0131\t1855\t1830\t2423\t2332\n+Cj0132\t846\t880\t928\t901\n+Cj0133\t189\t151\t255\t276\n+Cj0134\t158\t150\t137\t136\n+Cj0135\t160\t155\t201\t146\n+Cj0136\t3506\t3422\t3497\t3481\n+Cj0137\t213\t229\t239\t247\n+Cj0138\t214\t193\t175\t183\n+Cj0139\t708\t738\t889\t860\n+Cj0140\t382\t369\t222\t205\n+Cj0141c\t198\t184\t164\t160\n+Cj0142c\t330\t310\t260\t297\n+Cj0143c\t917\t949\t1025\t1011\n+Cj0144\t3419\t3409\t4208\t4102\n+Cj0145\t194\t163\t204\t195\n+Cj0146c\t618\t631\t671\t680\n+Cj0147c\t1867\t1795\t2243\t2239\n+Cj0148c\t182\t165\t217\t197\n+Cj0149c\t820\t795\t885\t923\n+Cj0150c\t895\t858\t1170\t1147\n+Cj0151c\t498\t441\t588\t567\n+Cj0152c\t1911\t1883\t2152\t2107\n+Cj0153c\t1286\t1175\t1522\t1396\n+Cj0154c\t143\t121\t139\t168\n+Cj0155c\t378\t365\t401\t369\n+Cj0156c\t109\t130\t129\t132\n+Cj0157c\t254\t274\t259\t242\n+Cj0158c\t334\t264\t223\t204\n+Cj0159c\t296\t285\t292\t258\n+Cj0160c\t154\t140\t206\t197\n+Cj0161c\t247\t213\t298\t312\n+Cj0162c\t197\t218\t259\t232\n+Cj0163c\t207\t222\t194\t189\n+Cj0164c\t301\t284\t268\t241\n+Cj0166\t191\t170\t261\t270\n+Cj0167c\t64\t'..b'\n+Cj1614\t22\t19\t16\t12\n+Cj1615\t19\t20\t21\t23\n+Cj1616\t3\t5\t5\t6\n+Cj1617\t32\t27\t36\t25\n+Cj1618c\t96\t94\t164\t135\n+Cj1619\t757\t715\t731\t693\n+Cj1620c\t159\t155\t139\t127\n+Cj1621\t740\t678\t726\t749\n+Cj1622\t180\t144\t115\t112\n+Cj1623\t449\t473\t498\t418\n+Cj1624c\t9284\t9224\t9353\t9042\n+Cj1625c\t4309\t4290\t4604\t4477\n+Cj1626c\t1145\t1141\t1002\t955\n+Cj1627c\t314\t280\t230\t237\n+Cj1628\t2\t0\t2\t0\n+Cj1629\t9\t2\t2\t1\n+Cj1630\t45\t38\t47\t46\n+Cj1631c\t876\t890\t1050\t995\n+Cj1632c\t139\t116\t124\t127\n+Cj1633\t265\t259\t258\t257\n+Cj1634c\t346\t373\t349\t381\n+Cj1635c\t219\t232\t232\t224\n+Cj1636c\t274\t297\t274\t267\n+Cj1637c\t653\t715\t1024\t976\n+Cj1638\t361\t354\t348\t359\n+Cj1639\t1637\t1594\t1888\t1772\n+Cj1640\t446\t457\t555\t545\n+Cj1641\t542\t566\t646\t622\n+Cj1642\t332\t331\t316\t313\n+Cj1643\t527\t490\t609\t590\n+Cj1644\t189\t208\t181\t201\n+Cj1645\t470\t487\t538\t474\n+Cj1646\t103\t83\t113\t124\n+Cj1647\t61\t44\t84\t85\n+Cj1648\t85\t88\t80\t80\n+Cj1649\t60\t63\t80\t94\n+Cj1650\t155\t176\t178\t192\n+Cj1651c\t378\t370\t465\t417\n+Cj1652c\t123\t117\t137\t123\n+Cj1653c\t259\t263\t205\t237\n+Cj1654c\t885\t893\t934\t927\n+Cj1655c\t965\t1022\t977\t984\n+Cj1656c\t1988\t1995\t2292\t2267\n+Cj1658\t31\t40\t30\t27\n+Cj1659\t35\t45\t48\t40\n+Cj1660\t28\t24\t35\t25\n+Cj1661\t15\t20\t15\t15\n+Cj1662\t7\t18\t14\t22\n+Cj1663\t28\t27\t17\t22\n+Cj1664\t16\t20\t13\t5\n+Cj1665\t54\t54\t56\t67\n+Cj1666c\t189\t202\t184\t154\n+Cj1667c\t0\t0\t0\t0\n+Cj1668c\t90\t57\t61\t68\n+Cj1669c\t118\t132\t99\t101\n+Cj1670c\t365\t363\t451\t434\n+Cj1671c\t274\t275\t423\t404\n+Cj1672c\t3104\t3039\t3540\t3294\n+Cj1673c\t4945\t4917\t4231\t4255\n+Cj1674\t246\t249\t243\t211\n+Cj1675\t45\t53\t46\t41\n+Cj1676\t83\t81\t95\t101\n+Cj1677\t943\t901\t911\t878\n+Cj1679\t269\t293\t263\t310\n+Cj1680c\t559\t506\t1646\t1629\n+Cj1681c\t463\t446\t367\t338\n+Cj1682c\t2874\t2645\t3685\t3618\n+Cj1684c\t180\t156\t212\t197\n+Cj1685c\t258\t243\t229\t218\n+Cj1686c\t798\t718\t756\t725\n+Cj1687\t139\t139\t188\t189\n+Cj1688c\t1473\t1439\t1095\t1055\n+Cj1689c\t1138\t1131\t1086\t1029\n+Cj1690c\t1203\t1209\t1313\t1302\n+Cj1691c\t1851\t1905\t2648\t2644\n+Cj1692c\t1925\t1890\t1528\t1498\n+Cj1693c\t722\t698\t717\t698\n+Cj1694c\t491\t484\t632\t596\n+Cj1695c\t2294\t2366\t1687\t1708\n+Cj1696c\t1249\t1262\t582\t584\n+Cj1697c\t1316\t1283\t1073\t965\n+Cj1698c\t656\t671\t514\t523\n+Cj1699c\t996\t1056\t879\t851\n+Cj1700c\t2216\t2133\t2446\t2355\n+Cj1701c\t2898\t2781\t2887\t2808\n+Cj1702c\t2100\t2123\t2141\t2141\n+Cj1703c\t1255\t1224\t1176\t1143\n+Cj1704c\t4911\t4712\t3669\t3693\n+Cj1705c\t601\t635\t769\t803\n+Cj1706c\t2484\t2455\t2694\t2618\n+Cj1707c\t2235\t2121\t2070\t2040\n+Cj1708c\t1271\t1256\t1359\t1381\n+Cj1709c\t58\t50\t58\t53\n+Cj1710c\t480\t422\t526\t539\n+Cj1711c\t212\t188\t250\t236\n+Cj1712\t137\t145\t91\t78\n+Cj1713\t42\t48\t31\t41\n+Cj1714\t6\t4\t3\t8\n+Cj1715\t83\t83\t66\t60\n+Cj1716c\t63\t62\t58\t59\n+Cj1717c\t225\t212\t211\t204\n+Cj1718c\t128\t113\t115\t118\n+Cj1719c\t170\t151\t152\t144\n+Cj1720\t786\t765\t790\t791\n+Cj1721c\t95\t104\t119\t104\n+Cj1722c\t4\t6\t6\t6\n+Cj1723c\t36\t39\t27\t38\n+Cj1724c\t365\t373\t341\t307\n+Cj1725\t629\t664\t692\t678\n+Cj1726c\t462\t417\t493\t493\n+Cj1727c\t442\t464\t503\t471\n+Cj1728c\t2\t2\t3\t6\n+Cj1729c\t4646\t4704\t5157\t4871\n+Cj1731c\t81\t77\t63\t63\n+Cjp01\t20\t21\t25\t21\n+Cjp02\t353\t362\t332\t313\n+Cjp03\t288\t330\t279\t273\n+Cjp04\t20\t21\t25\t21\n+Cjp05\t353\t362\t332\t313\n+Cjp06\t124\t120\t127\t119\n+Cjp07\t182\t174\t170\t153\n+Cjp08\t18\t21\t28\t11\n+Cjp09\t147\t177\t163\t194\n+Cjp10\t973\t978\t878\t889\n+Cjp11\t9427\t9126\t12373\t12282\n+Cjp12\t70\t53\t57\t54\n+Cjp13\t228\t249\t190\t208\n+Cjp14\t20\t21\t25\t21\n+Cjp15\t353\t362\t332\t313\n+Cjp16\t43\t40\t27\t33\n+Cjp17\t6\t4\t6\t6\n+Cjp19\t53\t55\t37\t38\n+Cjp20\t42\t40\t40\t39\n+Cjp21\t95\t96\t100\t90\n+Cjp22\t285\t278\t259\t243\n+Cjp23\t14\t13\t15\t7\n+Cjp24\t17\t14\t19\t13\n+Cjp25\t105\t92\t110\t108\n+Cjp26\t256\t268\t239\t248\n+Cjp27\t15\t13\t9\t7\n+Cjp28\t74\t103\t83\t75\n+Cjp29\t28\t18\t43\t37\n+Cjp30\t32\t40\t31\t38\n+Cjp32\t162\t170\t160\t166\n+Cjp33\t60\t52\t47\t46\n+Cjp34\t176\t161\t132\t138\n+Cjp35\t38\t37\t25\t33\n+Cjp36\t17\t15\t20\t9\n+Cjr01\t32453\t31605\t31153\t31081\n+Cjr02\t199051\t195254\t206408\t204396\n+Cjr03\t1584\t1599\t1782\t1708\n+Cjr04\t32453\t31605\t31153\t31081\n+Cjr05\t199060\t195263\t206415\t204401\n+Cjr06\t1086\t1085\t1305\t1238\n+Cjr07\t32453\t31605\t31153\t31081\n+Cjr08\t199060\t195263\t206415\t204401\n+Cjr09\t1056\t1056\t1274\t1210\n+Cjs01\t12294\t11902\t14430\t14462\n+Cjs02\t15\t19\t23\t28\n+Cjs03\t2680\t2690\t3212\t3083\n+Cjt01\t77\t84\t95\t85\n+Cjt02\t70\t70\t66\t68\n+Cjt03\t50\t55\t36\t37\n+Cjt04\t32\t40\t40\t39\n+Cjt05\t270\t252\t237\t233\n+Cjt06\t36\t35\t46\t36\n+Cjt1\t47\t55\t66\t78\n+Cjt2\t77\t74\t72\t73\n+Cjt3\t73\t85\t65\t54\n+Cjt4\t85\t78\t77\t63\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/data1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/data1 Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1681 @@\n+gene_ID                  start_coord       end_coord     average_cov          #reads            RPKM\n+\n+Cj0001                             1            1323            11.6             416             157\n+Cj0002                          1483            2550            63.0            1818             851\n+Cj0003                          2579            4888            49.1            3067             663\n+Cj0004c                         4916            5257             4.5              42              61\n+Cj0005c                         5260            6498             6.4             215              87\n+Cj0006                          6703            8010             5.9             208              79\n+Cj0007                          8144           12634            26.3            3190             355\n+Cj0008                         12644           14395            43.5            2059             587\n+Cj0009                         14398           15843            60.6            2369             819\n+Cj0010c                        15844           16419            16.8             261             226\n+Cj0011c                        16452           16691           361.8            2347            4887\n+Cj0012c                        16756           17403          1257.7           22026           16986\n+Cj0013                         17563           19239            15.7             713             212\n+Cj0014c                        19251           19775            41.0             582             554\n+Cj0015c                        19867           21093            28.4             942             384\n+Cj0016                         21159           21833            14.6             266             197\n+Cj0017c                        21854           23380             8.8             364             119\n+Cj0018c                        23392           23559            16.9              77             229\n+Cj0019c                        23665           25443            23.5            1128             317\n+Cj0020c                        25433           26347            31.1             769             420\n+Cj0021c                        26411           27289            13.9             330             188\n+Cj0022c                        27402           28304             2.8              67               0\n+Cj0023                         28382           29710            34.6            1243             467\n+Cj0024                         29726           32095            26.9            1722             363\n+Cj0025c                        32134           33519             2.5              92               0\n+Cj0026c                        33639           34262            24.7             416             333\n+Cj0027                         34382           36013            67.1            2958             906\n+Cj0028                         36000           37571            13.9             589             187\n+Cj0029                         37667           38662            10.2             274             137\n+Cjr01                          39249           40761           793.6           32453           10719\n+Cjp01                          40866           40941             9.9              20             132\n+Cjp02                          40950           41026           169.8             353            2291\n+Cjr02                          41568           44457          2548.4          199051           34419\n+Cjr03                          44741           44860           488.6            1584            6596\n+Cj0030                         44966           46363             4.6             175              63\n+Cj0031                         46424           50156             4.5             455              61\n+Cj0033                         50156           51937             7.2             347              97\n+Cj0034c                        51967           52668            34.8             661             471\n'..b'2294            2100\n+Cj1696c                      1615195         1615428           197.5            1249            2667\n+Cj1697c                      1615428         1615796           132.0            1316            1782\n+Cj1698c                      1615796         1616047            96.4             656            1301\n+Cj1699c                      1616057         1616242           198.2             996            2676\n+Cj1700c                      1616229         1616654           192.4            2216            2600\n+Cj1701c                      1616657         1617358           152.7            2898            2063\n+Cj1702c                      1617358         1617783           182.4            2100            2463\n+Cj1703c                      1617794         1618075           164.7            1255            2224\n+Cj1704c                      1618077         1618907           218.7            4911            2953\n+Cj1705c                      1618909         1619190            78.9             601            1065\n+Cj1706c                      1619193         1619807           149.5            2484            2018\n+Cj1707c                      1619804         1620379           143.6            2235            1939\n+Cj1708c                      1620389         1620700           150.8            1271            2036\n+Cj1709c                      1620899         1621660             2.8              58               0\n+Cj1710c                      1621696         1623690             8.9             480             120\n+Cj1711c                      1623659         1624459             9.8             212             132\n+Cj1712                       1624541         1625077             9.4             137             127\n+Cj1713                       1625100         1626170             1.4              42               0\n+Cj1714                       1626167         1626265             2.1               6               0\n+Cjp34                        1626279         1626355            84.7             176            1142\n+Cjt06                        1626491         1626578            15.1              36             204\n+Cjp35                        1626625         1626700            18.4              38             250\n+Cjp36                        1626704         1626779             8.3              17             112\n+Cj1715                       1626807         1627337             5.8              83              78\n+Cj1716c                      1627317         1627919             3.9              63              52\n+Cj1717c                      1627921         1629333             5.9             225              80\n+Cj1718c                      1629320         1630396             4.4             128              59\n+Cj1719c                      1630393         1631928             4.1             170              55\n+Cj1720                       1632248         1632877            46.2             786             623\n+Cj1721c                      1632901         1633545             5.5              95              74\n+Cj1722c                      1633791         1633892             1.5               4               0\n+Cj1723c                      1633895         1634119             5.9              36              80\n+Cj1724c                      1634296         1634679            35.2             365             475\n+Cj1725                       1634839         1635438            38.8             629             524\n+Cj1726c                      1635443         1636324            19.4             462             262\n+Cj1727c                      1636407         1637678            12.9             442             174\n+Cj1728c                      1637923         1638078             0.5               2               0\n+Cj1729c                      1638104         1640701            66.2            4646             894\n+Cj1731c                      1640904         1641386             6.2              81              84\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/data2
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/data2 Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1681 @@\n+gene_ID                  start_coord       end_coord     average_cov          #reads            RPKM\n+\n+Cj0001                             1            1323            11.4             407             154\n+Cj0002                          1483            2550            61.6            1778             835\n+Cj0003                          2579            4888            48.7            3039             660\n+Cj0004c                         4916            5257             3.9              36              53\n+Cj0005c                         5260            6498             6.8             229              93\n+Cj0006                          6703            8010             5.7             201              77\n+Cj0007                          8144           12634            24.8            3015             337\n+Cj0008                         12644           14395            43.5            2058             589\n+Cj0009                         14398           15843            62.1            2426             842\n+Cj0010c                        15844           16419            17.4             271             236\n+Cj0011c                        16452           16691           356.6            2313            4834\n+Cj0012c                        16756           17403          1244.6           21796           16872\n+Cj0013                         17563           19239            16.6             755             226\n+Cj0014c                        19251           19775            38.9             552             527\n+Cj0015c                        19867           21093            27.2             902             369\n+Cj0016                         21159           21833            15.3             279             207\n+Cj0017c                        21854           23380             9.4             386             127\n+Cj0018c                        23392           23559            17.7              80             239\n+Cj0019c                        23665           25443            24.3            1168             329\n+Cj0020c                        25433           26347            32.1             794             435\n+Cj0021c                        26411           27289            14.6             348             199\n+Cj0022c                        27402           28304             2.6              62               0\n+Cj0023                         28382           29710            36.0            1292             488\n+Cj0024                         29726           32095            25.4            1626             344\n+Cj0025c                        32134           33519             2.5              93               0\n+Cj0026c                        33639           34262            22.9             386             310\n+Cj0027                         34382           36013            66.4            2930             901\n+Cj0028                         36000           37571            14.3             609             194\n+Cj0029                         37667           38662             8.5             229             115\n+Cjr01                          39249           40761           772.9           31605           10478\n+Cjp01                          40866           40941            10.1              21             139\n+Cjp02                          40950           41026           174.0             362            2358\n+Cjr02                          41568           44457          2499.8          195254           33890\n+Cjr03                          44741           44860           493.0            1599            6684\n+Cj0030                         44966           46363             4.4             167              60\n+Cj0031                         46424           50156             4.2             429              58\n+Cj0033                         50156           51937             6.8             326              92\n+Cj0034c                        51967           52668            30.8             585             418\n'..b'2366            2174\n+Cj1696c                      1615195         1615428           199.5            1262            2705\n+Cj1697c                      1615428         1615796           128.7            1283            1744\n+Cj1698c                      1615796         1616047            98.6             671            1336\n+Cj1699c                      1616057         1616242           210.0            1056            2848\n+Cj1700c                      1616229         1616654           185.2            2133            2512\n+Cj1701c                      1616657         1617358           146.6            2781            1987\n+Cj1702c                      1617358         1617783           184.4            2123            2500\n+Cj1703c                      1617794         1618075           160.6            1224            2177\n+Cj1704c                      1618077         1618907           209.8            4712            2844\n+Cj1705c                      1618909         1619190            83.3             635            1130\n+Cj1706c                      1619193         1619807           147.7            2455            2002\n+Cj1707c                      1619804         1620379           136.2            2121            1847\n+Cj1708c                      1620389         1620700           148.9            1256            2019\n+Cj1709c                      1620899         1621660             2.4              50               0\n+Cj1710c                      1621696         1623690             7.8             422             106\n+Cj1711c                      1623659         1624459             8.7             188             118\n+Cj1712                       1624541         1625077            10.0             145             135\n+Cj1713                       1625100         1626170             1.6              48               0\n+Cj1714                       1626167         1626265             1.7               4               0\n+Cjp34                        1626279         1626355            77.1             161            1049\n+Cjt06                        1626491         1626578            14.6              35             200\n+Cjp35                        1626625         1626700            18.2              37             244\n+Cjp36                        1626704         1626779             7.1              15              99\n+Cj1715                       1626807         1627337             5.8              83              78\n+Cj1716c                      1627317         1627919             3.8              62              52\n+Cj1717c                      1627921         1629333             5.6             212              75\n+Cj1718c                      1629320         1630396             3.9             113              53\n+Cj1719c                      1630393         1631928             3.6             151              49\n+Cj1720                       1632248         1632877            44.9             765             609\n+Cj1721c                      1632901         1633545             6.0             104              81\n+Cj1722c                      1633791         1633892             2.0               6               0\n+Cj1723c                      1633895         1634119             6.4              39              87\n+Cj1724c                      1634296         1634679            36.0             373             487\n+Cj1725                       1634839         1635438            41.0             664             555\n+Cj1726c                      1635443         1636324            17.5             417             237\n+Cj1727c                      1636407         1637678            13.5             464             183\n+Cj1728c                      1637923         1638078             0.5               2               0\n+Cj1729c                      1638104         1640701            67.0            4704             908\n+Cj1731c                      1640904         1641386             5.9              77              80\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/data3
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/data3 Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1681 @@\n+gene_ID                  start_coord       end_coord     average_cov          #reads            RPKM\n+\n+Cj0001                             1            1323            14.4             516             189\n+Cj0002                          1483            2550            96.1            2774            1258\n+Cj0003                          2579            4888            46.5            2904             609\n+Cj0004c                         4916            5257             6.5              60              85\n+Cj0005c                         5260            6498             7.0             235              92\n+Cj0006                          6703            8010             6.1             216              80\n+Cj0007                          8144           12634            25.2            3058             330\n+Cj0008                         12644           14395            37.7            1783             493\n+Cj0009                         14398           15843            46.1            1803             604\n+Cj0010c                        15844           16419            14.4             224             188\n+Cj0011c                        16452           16691           343.0            2225            4491\n+Cj0012c                        16756           17403          1143.6           20028           14971\n+Cj0013                         17563           19239            12.8             578             167\n+Cj0014c                        19251           19775            48.4             687             634\n+Cj0015c                        19867           21093            26.5             880             347\n+Cj0016                         21159           21833            17.1             312             224\n+Cj0017c                        21854           23380             8.5             350             111\n+Cj0018c                        23392           23559             7.4              34              98\n+Cj0019c                        23665           25443            27.8            1338             364\n+Cj0020c                        25433           26347            50.9            1258             666\n+Cj0021c                        26411           27289            15.0             357             197\n+Cj0022c                        27402           28304             2.6              62               0\n+Cj0023                         28382           29710            37.7            1355             494\n+Cj0024                         29726           32095            25.9            1657             339\n+Cj0025c                        32134           33519             2.0              76               0\n+Cj0026c                        33639           34262            18.2             306             238\n+Cj0027                         34382           36013            74.9            3305             981\n+Cj0028                         36000           37571            13.4             568             175\n+Cj0029                         37667           38662             8.5             229             111\n+Cjr01                          39249           40761           761.8           31153            9974\n+Cjp01                          40866           40941            12.3              25             159\n+Cjp02                          40950           41026           159.7             332            2089\n+Cjr02                          41568           44457          2642.6          206408           34596\n+Cjr03                          44741           44860           549.3            1782            7193\n+Cj0030                         44966           46363             5.7             214              74\n+Cj0031                         46424           50156             4.4             443              57\n+Cj0033                         50156           51937             6.5             315              86\n+Cj0034c                        51967           52668            25.6             487             336\n'..b'1687            1497\n+Cj1696c                      1615195         1615428            92.0             582            1205\n+Cj1697c                      1615428         1615796           107.6            1073            1409\n+Cj1698c                      1615796         1616047            75.5             514             988\n+Cj1699c                      1616057         1616242           174.9             879            2289\n+Cj1700c                      1616229         1616654           212.4            2446            2781\n+Cj1701c                      1616657         1617358           152.2            2887            1992\n+Cj1702c                      1617358         1617783           186.0            2141            2434\n+Cj1703c                      1617794         1618075           154.3            1176            2020\n+Cj1704c                      1618077         1618907           163.4            3669            2139\n+Cj1705c                      1618909         1619190           101.0             769            1321\n+Cj1706c                      1619193         1619807           162.1            2694            2122\n+Cj1707c                      1619804         1620379           133.0            2070            1741\n+Cj1708c                      1620389         1620700           161.2            1359            2110\n+Cj1709c                      1620899         1621660             2.8              58               0\n+Cj1710c                      1621696         1623690             9.7             526             128\n+Cj1711c                      1623659         1624459            11.6             250             151\n+Cj1712                       1624541         1625077             6.3              91              82\n+Cj1713                       1625100         1626170             1.1              31               0\n+Cj1714                       1626167         1626265             1.1               3               0\n+Cjp34                        1626279         1626355            63.4             132             830\n+Cjt06                        1626491         1626578            19.2              46             253\n+Cjp35                        1626625         1626700            12.2              25             159\n+Cjp36                        1626704         1626779             9.9              20             127\n+Cj1715                       1626807         1627337             4.6              66              60\n+Cj1716c                      1627317         1627919             3.6              58              47\n+Cj1717c                      1627921         1629333             5.5             211              72\n+Cj1718c                      1629320         1630396             4.0             115              52\n+Cj1719c                      1630393         1631928             3.7             152              48\n+Cj1720                       1632248         1632877            46.4             790             607\n+Cj1721c                      1632901         1633545             6.8             119              89\n+Cj1722c                      1633791         1633892             2.3               6               0\n+Cj1723c                      1633895         1634119             4.5              27              58\n+Cj1724c                      1634296         1634679            32.9             341             430\n+Cj1725                       1634839         1635438            42.7             692             559\n+Cj1726c                      1635443         1636324            20.7             493             271\n+Cj1727c                      1636407         1637678            14.6             503             192\n+Cj1728c                      1637923         1638078             0.7               3               0\n+Cj1729c                      1638104         1640701            73.5            5157             962\n+Cj1731c                      1640904         1641386             4.8              63              63\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/data4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/data4 Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1681 @@\n+gene_ID                  start_coord       end_coord     average_cov          #reads            RPKM\n+\n+Cj0001                             1            1323            14.1             506             188\n+Cj0002                          1483            2550            91.7            2645            1219\n+Cj0003                          2579            4888            46.0            2873             612\n+Cj0004c                         4916            5257             6.4              59              85\n+Cj0005c                         5260            6498             6.4             216              86\n+Cj0006                          6703            8010             6.4             228              86\n+Cj0007                          8144           12634            25.3            3067             336\n+Cj0008                         12644           14395            38.3            1815             510\n+Cj0009                         14398           15843            45.3            1772             603\n+Cj0010c                        15844           16419            13.1             203             174\n+Cj0011c                        16452           16691           359.4            2331            4782\n+Cj0012c                        16756           17403          1133.1           19844           15077\n+Cj0013                         17563           19239            13.5             612             180\n+Cj0014c                        19251           19775            49.3             700             656\n+Cj0015c                        19867           21093            25.5             846             339\n+Cj0016                         21159           21833            16.9             309             225\n+Cj0017c                        21854           23380             8.2             339             109\n+Cj0018c                        23392           23559            10.8              49             144\n+Cj0019c                        23665           25443            26.6            1279             354\n+Cj0020c                        25433           26347            48.5            1199             645\n+Cj0021c                        26411           27289            15.1             358             201\n+Cj0022c                        27402           28304             2.7              67               0\n+Cj0023                         28382           29710            35.8            1287             477\n+Cj0024                         29726           32095            24.6            1578             328\n+Cj0025c                        32134           33519             2.2              82               0\n+Cj0026c                        33639           34262            17.2             291             230\n+Cj0027                         34382           36013            70.4            3106             937\n+Cj0028                         36000           37571            15.1             643             201\n+Cj0029                         37667           38662             8.4             226             112\n+Cjr01                          39249           40761           760.1           31081           10114\n+Cjp01                          40866           40941            10.0              21             136\n+Cjp02                          40950           41026           150.6             313            2001\n+Cjr02                          41568           44457          2616.8          204396           34820\n+Cjr03                          44741           44860           526.7            1708            7008\n+Cj0030                         44966           46363             5.2             197              69\n+Cj0031                         46424           50156             4.6             465              61\n+Cj0033                         50156           51937             5.6             272              75\n+Cj0034c                        51967           52668            26.8             509             357\n'..b'1708            1540\n+Cj1696c                      1615195         1615428            92.3             584            1229\n+Cj1697c                      1615428         1615796            96.7             965            1288\n+Cj1698c                      1615796         1616047            76.8             523            1022\n+Cj1699c                      1616057         1616242           169.3             851            2253\n+Cj1700c                      1616229         1616654           204.5            2355            2722\n+Cj1701c                      1616657         1617358           148.0            2808            1969\n+Cj1702c                      1617358         1617783           186.0            2141            2474\n+Cj1703c                      1617794         1618075           150.0            1143            1996\n+Cj1704c                      1618077         1618907           164.4            3693            2188\n+Cj1705c                      1618909         1619190           105.4             803            1402\n+Cj1706c                      1619193         1619807           157.5            2618            2096\n+Cj1707c                      1619804         1620379           131.0            2040            1744\n+Cj1708c                      1620389         1620700           163.8            1381            2179\n+Cj1709c                      1620899         1621660             2.6              53               0\n+Cj1710c                      1621696         1623690            10.0             539             133\n+Cj1711c                      1623659         1624459            10.9             236             145\n+Cj1712                       1624541         1625077             5.4              78              72\n+Cj1713                       1625100         1626170             1.4              41               0\n+Cj1714                       1626167         1626265             2.9               8               0\n+Cjp34                        1626279         1626355            66.2             138             882\n+Cjt06                        1626491         1626578            15.1              36             201\n+Cjp35                        1626625         1626700            16.1              33             214\n+Cjp36                        1626704         1626779             4.5               9              58\n+Cj1715                       1626807         1627337             4.2              60              56\n+Cj1716c                      1627317         1627919             3.6              59              48\n+Cj1717c                      1627921         1629333             5.3             204              71\n+Cj1718c                      1629320         1630396             4.0             118              54\n+Cj1719c                      1630393         1631928             3.5             144              46\n+Cj1720                       1632248         1632877            46.5             791             618\n+Cj1721c                      1632901         1633545             5.9             104              79\n+Cj1722c                      1633791         1633892             2.1               6               0\n+Cj1723c                      1633895         1634119             6.2              38              83\n+Cj1724c                      1634296         1634679            29.6             307             394\n+Cj1725                       1634839         1635438            41.8             678             556\n+Cj1726c                      1635443         1636324            20.7             493             275\n+Cj1727c                      1636407         1637678            13.7             471             182\n+Cj1728c                      1637923         1638078             1.4               6               0\n+Cj1729c                      1638104         1640701            69.4            4871             923\n+Cj1731c                      1640904         1641386             4.9              63              64\n'
b
diff -r 000000000000 -r c5a812cdf478 test-data/done
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/done Fri Dec 09 10:52:35 2016 -0500
b
@@ -0,0 +1,1 @@
+DONE
b
diff -r 000000000000 -r c5a812cdf478 test-data/error.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/error.log Fri Dec 09 10:52:35 2016 -0500
b
@@ -0,0 +1,1 @@
+
b
diff -r 000000000000 -r c5a812cdf478 test-data/heatmap.pdf
b
Binary file test-data/heatmap.pdf has changed
b
diff -r 000000000000 -r c5a812cdf478 test-data/rerror.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rerror.log Fri Dec 09 10:52:35 2016 -0500
[
@@ -0,0 +1,12 @@
+Loading required package: preprocessCore
+Loading required package: gplots
+
+Attaching package: ‘gplots’
+
+The following object is masked from ‘package:stats’:
+
+    lowess
+
+Warning message:
+In heatmap.2(countDataNormLog[wh, ], density.info = c("none"), hclustfun = function(x) hclust(x,  :
+  Discrepancy: Colv is FALSE, while dendrogram is `both'. Omitting column dendogram.
b
diff -r 000000000000 -r c5a812cdf478 test-data/rscript.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/rscript.log Fri Dec 09 10:52:35 2016 -0500
b
@@ -0,0 +1,2 @@
+null device 
+          1 
b
diff -r 000000000000 -r c5a812cdf478 test-data/script.data
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/script.data Fri Dec 09 10:52:35 2016 -0500
b
@@ -0,0 +1,4 @@
+sample1 sample1 gr1
+sample2 sample2 gr1
+sample3 sample3 gr2
+sample4 sample4 gr2
b
diff -r 000000000000 -r c5a812cdf478 test-data/stats.data
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/stats.data Fri Dec 09 10:52:35 2016 -0500
b
b'@@ -0,0 +1,1680 @@\n+Feature\tgr2-gr1:logFC\tgr2-gr1:logCPM\tgr2-gr1:PValue\tgr2-gr1:FDR\n+Cj0001\t0.251163140624812\t7.450466899601\t0.000210979477327028\t0.000648781213245567\n+Cj0002\t0.530387367681972\t9.73328197799141\t3.92647017615346e-62\t1.43316161429601e-60\n+Cj0003\t-0.141096118617414\t10.1328696827574\t3.23730270556559e-07\t1.49736397868998e-06\n+Cj0004c\t0.546789320738327\t4.27438964069929\t0.0101429432128199\t0.0223216152515204\n+Cj0005c\t-0.0386100455851845\t6.41352518261495\t0.713021814662884\t0.801314341913642\n+Cj0006\t0.0572262525537494\t6.34479964715941\t0.583897736817362\t0.685569440640805\n+Cj0007\t-0.0798748935714388\t10.1859689943891\t0.00666385884081241\t0.0156265628403967\n+Cj0008\t-0.255567171662445\t9.51034236301575\t5.54315407636418e-14\t4.11812198859091e-13\n+Cj0009\t-0.484759400409196\t9.62822097543145\t9.67052427932554e-50\t2.61884036532058e-48\n+Cj0010c\t-0.378190664513606\t6.51239940649276\t5.36839159626876e-05\t0.000183155708236247\n+Cj0011c\t-0.0936887877353404\t9.76634066448534\t0.00440155038839324\t0.0106487076399312\n+Cj0012c\t-0.197456901899823\t12.949347565317\t3.16490585700577e-60\t1.08446468039034e-58\n+Cj0013\t-0.364006157463179\t7.97565692061486\t2.10110931097026e-10\t1.246559198982e-09\n+Cj0014c\t0.229302522931033\t7.89915141545952\t7.3889787523684e-05\t0.000247133373012481\n+Cj0015c\t-0.156583554909941\t8.4000051205571\t0.00125756904417107\t0.003422136831707\n+Cj0016\t0.127083234386439\t6.79211799297971\t0.143007733647566\t0.22208899226952\n+Cj0017c\t-0.18352203902824\t7.09385501458378\t0.0164829285531994\t0.0345072781057629\n+Cj0018c\t-0.978590636036807\t4.54920036252744\t4.20719576672574e-07\t1.92476340390532e-06\n+Cj0019c\t0.127578640965301\t8.85951692547961\t0.00209796126661611\t0.00539585506454568\n+Cj0020c\t0.591304518222515\t8.57021062747079\t5.91328316644171e-38\t1.18195267100662e-36\n+Cj0021c\t0.015453274262304\t7.04717719970582\t0.872325116787744\t0.922313520835405\n+Cj0022c\t-0.0610807618230194\t4.65022647688166\t0.755664352572265\t0.836913224253848\n+Cj0023\t-0.00155879292653441\t8.93505784928644\t0.977619840313746\t1\n+Cj0024\t-0.11073341579623\t9.28136807636078\t0.0026924493181347\t0.00677754483530458\n+Cj0025c\t-0.288377536563003\t5.0502940017973\t0.0750668237772794\t0.128740752933659\n+Cj0026c\t-0.486893832008047\t7.05351465527707\t3.74572338965654e-10\t2.20669107762573e-09\n+Cj0027\t0.0615279240104964\t10.1819388112351\t0.029781050546858\t0.0580747780118173\n+Cj0028\t-0.0454073637059376\t7.83399574924162\t0.514654351321527\t0.624804523404804\n+Cj0029\t-0.205750222309521\t6.51086679060757\t0.0445561029712139\t0.0819383317510056\n+Cj0030\t0.203806772126169\t6.16664584501197\t0.0580593877928865\t0.103155250903975\n+Cj0031\t-0.022546617798866\t7.40873794226012\t0.758862272204966\t0.839900959151047\n+Cj0033\t-0.258372446631317\t6.90334794900954\t0.00201223850231749\t0.0052138093293072\n+Cj0034c\t-0.384103076190169\t7.73087023750986\t1.48504736931912e-08\t7.74346128287829e-08\n+Cj0035c\t-0.286286710162699\t4.63935723534391\t0.156641404154039\t0.239527247335729\n+Cj0036\t-0.036715548339173\t8.12389305588524\t0.498866673463925\t0.612726514078954\n+Cj0037c\t0.120131023920956\t8.6839310127116\t0.00951372918057541\t0.0210732866677917\n+Cj0038c\t0.869835832472237\t4.93917190533352\t1.23975792218773e-06\t5.32366637174731e-06\n+Cj0039c\t-0.243295673978174\t9.57034537165025\t4.4783463764191e-13\t3.18607778220664e-12\n+Cj0040\t0.253822924348461\t7.91895715827187\t1.00139722177811e-05\t3.76983393579695e-05\n+Cj0041\t-0.325279908421266\t8.69890329220657\t9.2596052853717e-14\t6.73024990222471e-13\n+Cj0042\t0.0850199671165459\t8.17843963926571\t0.106812978809227\t0.173946645412893\n+Cj0043\t-0.201750388999392\t8.57314218916993\t1.16907543313394e-05\t4.36195033829308e-05\n+Cj0044c\t0.09412638483492\t8.63442847229589\t0.0364988448933533\t0.069480227410363\n+Cj0045c\t-0.0655832609551803\t7.54260707321925\t0.324224706788124\t0.437364144790227\n+Cj0053c\t-0.33483860585757\t7.58803703245217\t1.82073447037724e-07\t8.63563044000955e-07\n+Cj0054c\t0.164049771960829\t7.77475968350957\t0.0241552526527\t0.0483969799569014\n+Cj0055c\t0.551168041619309\t7.26004484056475\t3.83461866183206e-14\t2.88714113597132e-13\n+Cj0056c\t0.11529059'..b'\n+Cjp07\t-0.201393832690504\t6.01913520892501\t0.0774727844265827\t0.132057670103789\n+Cjp08\t-0.0610565292975918\t3.02119869200662\t0.911902320795614\t0.956329791765044\n+Cjp09\t0.0789492050345755\t6.02329713096144\t0.551039972472727\t0.65523804092189\n+Cjp10\t-0.204083169510766\t8.45854384462665\t1.76391328367489e-05\t6.39656674576703e-05\n+Cjp11\t0.349068919311388\t11.9923156784728\t2.44148200321706e-81\t1.24219644951559e-79\n+Cjp12\t-0.208848577045457\t4.51381269704339\t0.301685213879788\t0.412584514937022\n+Cjp13\t-0.322231225736962\t6.38128949105107\t0.00107780166219975\t0.00296174957583205\n+Cjp14\t0.104210823178076\t3.16479010904796\t0.830375874138309\t0.893718649152705\n+Cjp15\t-0.209766151010146\t7.01286048574317\t0.00789098456236578\t0.0179768834195552\n+Cjp16\t-0.527469323690171\t3.83336481231359\t0.0368575810313408\t0.0698463640537486\n+Cjp17\t0.197329320131585\t1.50182740629166\t0.831812631474571\t0.894118699261078\n+Cjp19\t-0.585630413256889\t4.17239585352498\t0.00761744618229388\t0.017568258434164\n+Cjp20\t-0.114614424829157\t3.99582222380107\t0.636456459735365\t0.733332848591807\n+Cjp21\t-0.0686823737490038\t5.19856866137998\t0.681991688267342\t0.772126800135447\n+Cjp22\t-0.226540237060962\t6.66243106472528\t0.0110000844678772\t0.0240337364745386\n+Cjp23\t-0.353025723104197\t2.42783006043204\t0.391607487160007\t0.504611643086455\n+Cjp24\t-0.0152743402303605\t2.74468336782184\t0.999999999999776\t1\n+Cjp25\t0.0848310092076146\t5.31944191023014\t0.588852855180689\t0.69042174849747\n+Cjp26\t-0.166761557958878\t6.58792537916917\t0.0731730109983744\t0.126137048733337\n+Cjp27\t-0.858268961181644\t2.29538700484784\t0.0724567718900572\t0.125030750260438\n+Cjp28\t-0.224851950084201\t5.01702220568239\t0.217001981820457\t0.31167350511253\n+Cjp29\t0.734109496851576\t3.66100088606691\t0.00704870545765388\t0.0164143917661593\n+Cjp30\t-0.122166326183728\t3.81411418090365\t0.674943147226437\t0.765983072710674\n+Cjp32\t-0.0874439451768363\t5.97433497049163\t0.45896096308337\t0.575500714725152\n+Cjp33\t-0.328588828011158\t4.32966509182498\t0.124211315818702\t0.197866033453132\n+Cjp34\t-0.380671920243272\t5.85944326037467\t0.00133854890531683\t0.00361903963289366\n+Cjp35\t-0.430399681435943\t3.73450743410787\t0.100374637588678\t0.164579117686904\n+Cjp36\t-0.201563169939485\t2.70346212180279\t0.608925025674964\t0.708513595362623\n+Cjr01\t-0.102775882095673\t13.5422910142694\t7.20756779798992e-10\t4.17293321821554e-09\n+Cjr02\t-0.00199342109653863\t16.21381505212\t0.870136632410869\t0.921562930750092\n+Cjr03\t0.0716348479862328\t9.30066612687491\t0.0445037148480824\t0.0819317294187833\n+Cjr04\t-0.10277590228244\t13.5422910142694\t7.11640659274934e-10\t4.13441061218898e-09\n+Cjr05\t-0.00201720063842253\t16.2138690187805\t0.868521430782704\t0.921562930750092\n+Cjr06\t0.166954322200703\t8.79992007728668\t7.93557714601454e-05\t0.000263838297587295\n+Cjr07\t-0.102775979976485\t13.5422910142694\t6.77618864736138e-10\t3.95042386768047e-09\n+Cjr08\t-0.00201719911428346\t16.2138690187805\t0.86854118978017\t0.921562930750092\n+Cjr09\t0.172836846375826\t8.7634083905036\t5.48033049240918e-05\t0.000186264674023381\n+Cjs01\t0.194800216436614\t12.2901088394379\t2.34683500730423e-23\t2.83477408436245e-22\n+Cjs02\t0.520621450537711\t3.13408724707507\t0.128402772795709\t0.203193454782277\n+Cjs03\t0.168063147710577\t10.1054046632285\t2.1180899514834e-09\t1.19338021091967e-08\n+Cjt01\t0.0995906789925662\t5.04200992251548\t0.588231919020598\t0.690175675776089\n+Cjt02\t-0.124166329208327\t4.7344995351148\t0.506444192273288\t0.618864482406733\n+Cjt03\t-0.583941660254936\t4.13412515205323\t0.0085236436529396\t0.0191582298437558\n+Cjt04\t0.0724165206745971\t3.90781846125343\t0.870782546926074\t0.921562930750092\n+Cjt05\t-0.212480888910792\t6.56077639094446\t0.0223001487916176\t0.045165198819211\n+Cjt06\t0.146126727543698\t3.92584585167676\t0.62778126057736\t0.72542652202986\n+Cjt1\t0.435399237792385\t4.58359947584301\t0.0212662026694545\t0.0432799445842596\n+Cjt2\t-0.119492910275624\t4.842875582846\t0.522681436188141\t0.63078490717773\n+Cjt3\t-0.469303073374358\t4.74978787712401\t0.00808820116400837\t0.0184012056292277\n+Cjt4\t-0.280180139875651\t4.87572672286493\t0.107580248404089\t0.1745190696333\n'
b
diff -r 000000000000 -r c5a812cdf478 tools/script.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/script.R Fri Dec 09 10:52:35 2016 -0500
[
@@ -0,0 +1,68 @@
+#!/usr/bin/env Rscript
+
+args = commandArgs(TRUE)
+countDataPath = args[1]
+statsDataPath = args[2]
+logFC = args[3]
+logCPM = args[4]
+pValue = args[5]
+fdr = args[6]
+
+require(preprocessCore)
+require(gplots)
+
+#prepare counts data --------------------------------------------------------
+countData = read.table(countDataPath, comment = "",
+                       sep = "\t")
+
+groups = sapply(as.character(countData[1, -1]), strsplit, ":")
+groups = as.vector(t(countData[1, -1]))
+
+names = as.vector(t(countData[2, -1]))
+
+countData = countData[-c(1,2), ]
+rownames(countData) = countData[, 1]
+countData = countData[, -1]
+colnames(countData) = names
+
+countData = countData[, order(groups, names)]
+
+# prepare stats data ------------------------------------------------------
+
+statsData = read.table(statsDataPath, sep = "\t",
+                       header = T)
+
+colnames(statsData)[-1] = sapply(colnames(statsData)[-1], function(x){
+  unlist(strsplit(x, ".", fixed = T))[3]
+})
+
+wh = which(abs(statsData$logFC) >= logFC & statsData$logCPM >= logCPM & statsData$PValue <= pValue & statsData$FDR <= fdr)
+
+for(i in 1:ncol(countData)){
+  countData[,i] = as.numeric(countData[,i])
+}
+
+countDataNorm = normalize.quantiles(as.matrix(countData), copy = T)
+countDataNormLog = log(countDataNorm + 1, 2)
+
+colnames(countDataNormLog) = colnames(countData)
+rownames(countDataNormLog) = rownames(countData)
+
+#svg("heatmap.svg", width = 3+length(names), height = 1/2*length(wh))
+pdf("heatmap.pdf")
+
+heatmap.2(
+  countDataNormLog[wh, ],
+  density.info=c("none"),
+  hclustfun = function(x) hclust(x, method = "average"),
+  distfun = function(x) as.dist(1-cor(t(x))),  
+  col = bluered(50), 
+  scale = 'row', 
+  trace = "none", #lwid = c(1, length(names)),  lhei = c(1,1/3*length(wh)),
+#  Rowv=NA, 
+  Colv = NA,
+  margins = c(7, 8)
+)
+
+dev.off()
+
b
diff -r 000000000000 -r c5a812cdf478 tools/scrsh.sh
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/scrsh.sh Fri Dec 09 10:52:35 2016 -0500
[
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+#sample_data=(tmp tmp1 tmp2 tmp3)
+sample_data=(`cat $1 | cut -f1 | sed ':a;N;$!ba;s/\n/ /g'`)
+#sample_name=(sample1 sample2 sample3 sample4)
+sample_name=(`cat $1 | cut -f2 | sed ':a;N;$!ba;s/\n/ /g'`)
+#sample_group=(gr1 gr1 gr2 gr2)
+sample_group=(`cat $1 | cut -f3 | sed ':a;N;$!ba;s/\n/ /g'`)
+
+
+group=('#')
+sample=('#Feature')
+
+touch anno.tmp
+touch count.tmp
+
+nsamples=`expr ${#sample_data[@]} - 1`
+
+for i in `seq 0 1 $nsamples`; do
+ group+=(${sample_group[i]}:${sample_group[i]})
+ sample+=(${sample_name[i]})
+
+ cat ${sample_data[i]} | tail -n+3 > dataWithoutHeader 2>> script.log
+
+ cat dataWithoutHeader | sort -k1 > dataWithoutHeader.sorted 2>> script.log
+
+ cat dataWithoutHeader.sorted | awk '{print $1}' > anno.sample 2>> script.log
+ cat dataWithoutHeader.sorted | awk '{print $5}' > count.sample 2>> script.log
+
+ paste -d"\t" count.tmp count.sample > count 2>> script.log
+ paste -d"\t" anno.tmp anno.sample > anno 2>> script.log
+
+ cat count > count.tmp 2>> script.log
+ cat anno > anno.tmp 2>> script.log
+
+done
+
+echo ${group[*]} | sed -e 's/ /\t/g' > count.matrix 2>> script.log
+echo ${sample[*]} | sed -e 's/ /\t/g' >> count.matrix 2>> script.log
+
+cat count | cut -f 2- > count.tmp 2>> script.log
+
+paste -d"\t" anno.sample count.tmp >> count.matrix 2>> script.log
+
+cat anno.tmp | cut -f 2- | awk '{for (i=2; i<=NF; i++){if ($1!=$i){print "error"; break}}}' > control.data 2>> script.log
+
+echo -e "gene_ID\tstart_coord\tend_coord" > annotation 2>> script.log
+cat dataWithoutHeader.sorted | awk '{print $1"\t"$2"\t"$3}' >> annotation 2>> script.log
+
+if [[ -s control.data ]]; then
+ echo "kolumny nie sa w odpowiedniej kolejnosci" > error.log
+ echo "" > count.matrix
+ echo "" > annotation
+else
+ echo "" > error.log
+fi