Skip to content

Commit

Permalink
Merge pull request #17 from Illumina/omni5-issue
Browse files Browse the repository at this point in the history
Omni5 issue
  • Loading branch information
jjzieve authored Feb 17, 2020
2 parents 881bbac + 8a83221 commit af0ba22
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/gtc_final_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@
output_handle.write(delim.join(["Total Samples", str(len(samples))]) + "\n")

output_handle.write("[Data]\n")
output_handle.write(delim.join(["SNP Name", "Sample ID", "Chr", "MapInfo", "Alleles - AB", "Alleles - Plus", "Alleles - Forward"]) + "\n")
output_handle.write(delim.join(["SNP Name", "Sample ID", "Chr", "MapInfo", "Alleles - AB", "Alleles - Plus", "Alleles - Forward", "X", "Y"]) + "\n")
for gtc_file in samples:
sys.stderr.write("Processing " + gtc_file + "\n")
gtc_file = os.path.join(args.gtc_directory, gtc_file)
gtc = GenotypeCalls(gtc_file)
genotypes = gtc.get_genotypes()
plus_strand_genotypes = gtc.get_base_calls_plus_strand(manifest.snps, manifest.ref_strands)
forward_strand_genotypes = gtc.get_base_calls_forward_strand(manifest.snps, manifest.source_strands)
normalized_intensities = gtc.get_normalized_intensities(manifest.normalization_lookups)

assert len(genotypes) == len(manifest.names)
for (name, chrom, map_info, genotype, ref_strand_genotype, source_strand_genotype) in zip(manifest.names, manifest.chroms, manifest.map_infos, genotypes, plus_strand_genotypes, forward_strand_genotypes):
output_handle.write(delim.join([name, os.path.basename(gtc_file)[:-4], chrom, str(map_info), code2genotype[genotype], ref_strand_genotype, source_strand_genotype]) + "\n")
for (name, chrom, map_info, genotype, ref_strand_genotype, source_strand_genotype, (x_norm, y_norm)) in zip(manifest.names, manifest.chroms, manifest.map_infos, genotypes, plus_strand_genotypes, forward_strand_genotypes, normalized_intensities):
output_handle.write(delim.join([name, os.path.basename(gtc_file)[:-4], chrom, str(map_info), code2genotype[genotype], ref_strand_genotype, source_strand_genotype, str(x_norm), str(y_norm)]) + "\n")
2 changes: 2 additions & 0 deletions module/BeadPoolManifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ def __parse_file(self, manifest_file):
for locus_idx in xrange(self.num_loci):
self.normalization_ids[locus_idx] += 100 * \
self.assay_types[locus_idx]
# To mimic the byte-wrapping behavior from GenomeStudio, AutoCall, IAAP take the mod of 256
self.normalization_ids[locus_idx] %= 256
all_norm_ids.add(self.normalization_ids[locus_idx])
sorted_norm_ids = sorted(all_norm_ids)
lookup_dictionary = {}
Expand Down

0 comments on commit af0ba22

Please sign in to comment.