# HG changeset patch # User mvdbeek # Date 1454517275 18000 # Node ID 893560ece89f6925bc1f42c3df4a768cf6492a1c # Parent a118d511a27cb7cfa3b47c4e9c5587229aa92e03 planemo upload for repository https://github.com/ARTbio/tools-artbio/tree/master/tools/msp_sr_readmap_and_size_histograms commit 9237338d798251fb2667280d597746e852f3ffcc-dirty diff -r a118d511a27c -r 893560ece89f readmap.py --- a/readmap.py Wed Feb 03 11:06:50 2016 -0500 +++ b/readmap.py Wed Feb 03 11:34:35 2016 -0500 @@ -77,7 +77,7 @@ return gene, coordinate, count, orientation def lookup_gene_length(gene, readDict): - return readDict[readDict.keys()[0]].instanceDict["size"] + return readDict[readDict.keys()[0]].instanceDict.values()[0].size def handle_start_stop_coordinates(plottable, readDict): """ @@ -91,9 +91,11 @@ new_line = "\t".join([gene, "0", "0", "F"]) plottable = [new_line] + plottable gene_length = str(lookup_gene_length(gene, readDict)) + gene, coordinate, count, orientation = listify_plottable_item(last_line) if not coordinate == gene_length: last_line = "\t".join([gene, gene_length, "0", "F"]) plottable = plottable + [last_line] + return plottable def write_readplot_dataframe(readDict, readmap_file): listoflines = [] @@ -106,7 +108,7 @@ dict=readDict[sample].instanceDict for gene in dict.keys(): plottable = dict[gene].readplot() - handle_start_stop_coordinates(plottable, readDict) + plottable = handle_start_stop_coordinates(plottable, readDict) for line in plottable: #print >>readmap, "%s\t%s" % (line, sample) listoflines.append ("%s\t%s" % (line, sample)) diff -r a118d511a27c -r 893560ece89f readmap.xml --- a/readmap.xml Wed Feb 03 11:06:50 2016 -0500 +++ b/readmap.xml Wed Feb 03 11:34:35 2016 -0500 @@ -1,4 +1,4 @@ - + from sRbowtie aligment bowtie