# HG changeset patch # User iuc # Date 1575494477 18000 # Node ID 3556001ff2db35db1c9622b59a82fe3a6c110723 # Parent 8d29173d49a9ccf6be420da2b6cb069062709b70 "planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/variant_analyzer commit 60dc8db809909edf44d662683b1f392b9d5964bf" diff -r 8d29173d49a9 -r 3556001ff2db mut2read.py --- a/mut2read.py Wed Nov 20 17:47:35 2019 -0500 +++ b/mut2read.py Wed Dec 04 16:21:17 2019 -0500 @@ -63,7 +63,7 @@ # read mut file with open(file1, 'r') as mut: - mut_array = np.genfromtxt(mut, skip_header=1, delimiter='\t', comments='#', dtype='string') + mut_array = np.genfromtxt(mut, skip_header=1, delimiter='\t', comments='#', dtype=str) # read dcs bam file # pysam.index(file2) @@ -86,7 +86,7 @@ dcs_len = [] - for pileupcolumn in bam.pileup(chrom.tobytes(), stop_pos - 2, stop_pos, max_depth=100000000): + for pileupcolumn in bam.pileup(chrom, stop_pos - 2, stop_pos, max_depth=100000000): if pileupcolumn.reference_pos == stop_pos - 1: count_alt = 0 diff -r 8d29173d49a9 -r 3556001ff2db mut2read.xml --- a/mut2read.xml Wed Nov 20 17:47:35 2019 -0500 +++ b/mut2read.xml Wed Dec 04 16:21:17 2019 -0500 @@ -1,14 +1,10 @@ - + Extracts all tags that carry a mutation in the duplex consensus sequence (DCS) va_macros.xml - - python - matplotlib - pysam - + - + Extracts all tags from the single stranded consensus sequence (SSCS) bam file that carry a mutation at the same position a mutation is called in the duplex consensus sequence (DCS) and calculates their frequencies va_macros.xml - - python - matplotlib - pysam - + 1: - for k1 in keys: - whole_array.append(k1) - else: - whole_array.append(keys[0]) + whole_array.extend(k.keys()) # 7. output summary with threshold workbook = xlsxwriter.Workbook(outfile) @@ -623,14 +616,14 @@ half1_mate2 = array2_half2 half2_mate2 = array2_half # calculate HD of "a" in the tag to all "a's" or "b" in the tag to all "b's" - dist = np.array([sum(itertools.imap(operator.ne, half1_mate1, c)) for c in half1_mate2]) + dist = np.array([sum(map(operator.ne, half1_mate1, c)) for c in half1_mate2]) min_index = np.where(dist == dist.min()) # get index of min HD # get all "b's" of the tag or all "a's" of the tag with minimum HD min_tag_half2 = half2_mate2[min_index] min_tag_array2 = array2[min_index] # get whole tag with min HD min_value = dist.min() # calculate HD of "b" to all "b's" or "a" to all "a's" - dist_second_half = np.array([sum(itertools.imap(operator.ne, half2_mate1, e)) + dist_second_half = np.array([sum(map(operator.ne, half2_mate1, e)) for e in min_tag_half2]) dist2 = dist_second_half.max() diff -r 8d29173d49a9 -r 3556001ff2db read2mut.xml --- a/read2mut.xml Wed Nov 20 17:47:35 2019 -0500 +++ b/read2mut.xml Wed Dec 04 16:21:17 2019 -0500 @@ -1,15 +1,12 @@ - + Looks for reads with mutation at known positions and calculates frequencies and stats. va_macros.xml - - python - matplotlib - pysam + xlsxwriter - + - - - @misc{duplex, - author = {Povysil, Gundula and Heinzl, Monika and Salazar, Renato and Stoler, Nicholas and Nekrutenko, Anton and Tiemann-Boege, Irene}, - year = {2019}, - title = {{Variant Analyzer: a quality control for variant calling in duplex sequencing data (manuscript)}} - } - - - - \ No newline at end of file + + +@misc{duplex, + author = {Povysil, Gundula and Heinzl, Monika and Salazar, Renato and Stoler, Nicholas and Nekrutenko, Anton and Tiemann-Boege, Irene}, + year = {2019}, + title = {{Variant Analyzer: a quality control for variant calling in duplex sequencing data (manuscript)}} + } + + + + + + matplotlib + pysam + + + +