From d9e43e514d5fe7bbc7205a52ccb3e4faef50e856 Mon Sep 17 00:00:00 2001 From: drosofff Date: Tue, 25 Jun 2019 00:02:25 +0200 Subject: [PATCH] fix missing header for the first column of filter_genes --- tools/gsc_filter_genes/filter_genes.R | 3 ++- tools/gsc_filter_genes/filter_genes.xml | 2 +- tools/gsc_filter_genes/test-data/filtered-0.05.tab | 2 +- tools/gsc_filter_genes/test-data/filtered-5.tab | 2 +- tools/gsc_filter_genes/test-data/filtered-null.tab | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/gsc_filter_genes/filter_genes.R b/tools/gsc_filter_genes/filter_genes.R index 4141bbd8a..1e01bab88 100644 --- a/tools/gsc_filter_genes/filter_genes.R +++ b/tools/gsc_filter_genes/filter_genes.R @@ -81,6 +81,7 @@ kept_genes <- rowSums(data.counts != 0) >= (opt$absolute_detection) # Filter matrix data.counts <- data.counts[kept_genes,] +data.counts <- cbind(Genes=rownames(data.counts), data.counts) # Save filtered matrix write.table( @@ -89,5 +90,5 @@ write.table( sep = "\t", quote = F, col.names = T, - row.names = T + row.names = F ) \ No newline at end of file diff --git a/tools/gsc_filter_genes/filter_genes.xml b/tools/gsc_filter_genes/filter_genes.xml index 19dad57f4..3c506283b 100644 --- a/tools/gsc_filter_genes/filter_genes.xml +++ b/tools/gsc_filter_genes/filter_genes.xml @@ -1,4 +1,4 @@ - + which are detected in less that a given fraction of the libraries r-optparse diff --git a/tools/gsc_filter_genes/test-data/filtered-0.05.tab b/tools/gsc_filter_genes/test-data/filtered-0.05.tab index 54adf93b3..233e040f5 100644 --- a/tools/gsc_filter_genes/test-data/filtered-0.05.tab +++ b/tools/gsc_filter_genes/test-data/filtered-0.05.tab @@ -1,4 +1,4 @@ -1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 +Genes 1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 BAI3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.97662501806838 0 0 0 0 12.8615775772142 0 0 0 15.9032354384535 0 0 0 0 0 12.2158463533178 9.68026850722175 15.3729581524844 0 0 14.28403727033 0 0 0 0 17.0775051033723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.86467441602363 0 0 0 0 0 0 14.2185940019444 0 0 0 0 0 9.4604919129408 0 0 FAM63B 0 14.7268225958904 0 0 0 0 0 14.2095873331695 0 0 0 7.05523661711308 0 0 0 0 10.8662524562421 0 0 0 0 0 0 12.5659445674216 0 0 0 0 0 0 17.508917577493 0 15.2092038075611 0 0 16.3552364080959 0 0 0 0 0 0 0 0 0 0 12.833405122753 0 0 0 0 10.631490277574 0 0 0 0 6.49910345713958 0 0 12.6988507765885 0 17.5291982691478 0 0 0 0 0 0 9.72047933810935 0 0 8.00314342388438 0 0 0 0 0 10.5923353166174 0 13.1956852586776 0 0 0 0 14.4254341461373 0 0 0 0 13.2598797712496 0 0 0 0 0 0 0 6.6653716296684 0 0 TMEM132C 0 0 0 0 0 0 0 0 0 15.6304274760255 0 0 0 0 11.3724171014623 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13.7057920287568 0 0 12.4990036192117 0 0 0 0 0 0 0 0 0 0 0 12.3619870470136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16.6895776681193 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tools/gsc_filter_genes/test-data/filtered-5.tab b/tools/gsc_filter_genes/test-data/filtered-5.tab index 54adf93b3..233e040f5 100644 --- a/tools/gsc_filter_genes/test-data/filtered-5.tab +++ b/tools/gsc_filter_genes/test-data/filtered-5.tab @@ -1,4 +1,4 @@ -1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 +Genes 1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 BAI3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.97662501806838 0 0 0 0 12.8615775772142 0 0 0 15.9032354384535 0 0 0 0 0 12.2158463533178 9.68026850722175 15.3729581524844 0 0 14.28403727033 0 0 0 0 17.0775051033723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.86467441602363 0 0 0 0 0 0 14.2185940019444 0 0 0 0 0 9.4604919129408 0 0 FAM63B 0 14.7268225958904 0 0 0 0 0 14.2095873331695 0 0 0 7.05523661711308 0 0 0 0 10.8662524562421 0 0 0 0 0 0 12.5659445674216 0 0 0 0 0 0 17.508917577493 0 15.2092038075611 0 0 16.3552364080959 0 0 0 0 0 0 0 0 0 0 12.833405122753 0 0 0 0 10.631490277574 0 0 0 0 6.49910345713958 0 0 12.6988507765885 0 17.5291982691478 0 0 0 0 0 0 9.72047933810935 0 0 8.00314342388438 0 0 0 0 0 10.5923353166174 0 13.1956852586776 0 0 0 0 14.4254341461373 0 0 0 0 13.2598797712496 0 0 0 0 0 0 0 6.6653716296684 0 0 TMEM132C 0 0 0 0 0 0 0 0 0 15.6304274760255 0 0 0 0 11.3724171014623 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 13.7057920287568 0 0 12.4990036192117 0 0 0 0 0 0 0 0 0 0 0 12.3619870470136 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 16.6895776681193 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 diff --git a/tools/gsc_filter_genes/test-data/filtered-null.tab b/tools/gsc_filter_genes/test-data/filtered-null.tab index a2ac399bb..0c835da53 100644 --- a/tools/gsc_filter_genes/test-data/filtered-null.tab +++ b/tools/gsc_filter_genes/test-data/filtered-null.tab @@ -1,4 +1,4 @@ -1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 +Genes 1001000235.G10 1001000174.B1 1001000177.C5 1001000182.H4 1001000175.A2 1001000230.B11 1001000237.E9 1001000173.E10 1001000241.E7 1001000249.A3 1001000179.A7 1001000247.F11 1001000240.D9 1001000178.G5 1001000249.E3 1001000174.H6 1001000181.F8 1001000177.A10 1001000235.D2 1001000240.G10 1001000248.E7 1001000012.B6 1001000179.H4 1001000230.C1 1001000175.H9 1001000241.G11 1001000174.G2 1001000252.C6 1001000186.D11 1001000239.G7 1001000258.G11 1001000264.A1 1001000174.A10 1001000255.E9 1001000242.B5 1001000179.F3 1001000185.F9 1001000267.F8 1001000183.G10 1001000247.E7 1001000031.A2 1001000271.B1 1001000187.G6 1001000236.C6 1001000238.C12 1001000187.D6 1001000235.E10 1001000036.C1 1001000253.H2 1001000231.C2 1001000178.C10 1001000267.C1 1001000180.E4 1001000173.E5 1001000179.F5 1001000245.G11 1001000185.D5 1001000012.A7 1001000010.B4 1001000265.D11 1001000032.F1 1001000036.H9 1001000245.B3 1001000185.A8 1001000178.C6 1001000037.F10 1001000245.H4 1001000012.B10 1001000245.F2 1001000249.G2 1001000187.E11 1001000266.A4 1001000266.G4 1001000179.E3 1001000178.C11 1001000031.D12 1001000037.D6 1001000250.G2 1001000018.F11 1001000175.F9 1001000254.G1 1001000264.F12 1001000183.B3 1001000241.E6 1001000183.E6 1001000181.F10 1001000176.B1 1001000235.B7 1001000231.D12 1001000230.E7 1001000186.H6 1001000258.H5 1001000237.H10 1001000231.B7 1001000270.H8 1001000240.G1 1001000177.D11 1001000185.D3 1001000238.B5 1001000174.E10 BAI3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.97662501806838 0 0 0 0 12.8615775772142 0 0 0 15.9032354384535 0 0 0 0 0 12.2158463533178 9.68026850722175 15.3729581524844 0 0 14.28403727033 0 0 0 0 17.0775051033723 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 9.86467441602363 0 0 0 0 0 0 14.2185940019444 0 0 0 0 0 9.4604919129408 0 0 JPH1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10.9442475033749 0 0 0 0 0 0 0 0 0 0 0 0 0 0 7.03963574788986 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 10.3969315865349 GSTA5 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0