<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Islam,<div class=""><br class=""></div><div class="">I’m looking at the Bio.Emboss code and it seems that, generally speaking, this module runs EMBOSS applications but does not parse their output, which is what would be required to get the “similarity” value.</div><div class=""><br class=""></div><div class="">Also note that in your code example you haven’t yet run water, which you would do like "water_cmd()”. But you can always parse out this similarity value yourself, first by capturing the output, something like this:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">>>> water_cmd = WaterCommandline(gapopen=10, gapextend=0.5, stdout=True, auto=True)</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">>>> water_cmd.asequence = "asis:ACCCGGGCGCGGT"</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">>>> water_cmd.bsequence = "asis:ACCCGAGCGCGGT"</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">>>> output = water_cmd()</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">>>> output</span></div><div style="margin: 0px; font-size: 14px; line-height: normal; font-family: Courier; background-color: rgb(179, 187, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">('########################################\n# Program: water\n# Rundate: Tue 21 Feb 2017 13:23:38\n# Commandline: water\n#    -auto\n#    -stdout\n#    -asequence asis:ACCCGGGCGCGGT\n#    -bsequence asis:ACCCGAGCGCGGT\n#    -gapopen 10\n#    -gapextend 0.5\n# Align_format: srspair\n# Report_file: stdout\n########################################\n\n#=======================================\n#\n# Aligned_sequences: 2\n# 1: asis\n# 2: asis\n# Matrix: EDNAFULL\n# Gap_penalty: 10.0\n# Extend_penalty: 0.5\n#\n# Length: 13\n# Identity:      12/13 (92.3%)\n# Similarity:    12/13 (92.3%)\n# Gaps:           0/13 ( 0.0%)\n# Score: 56.0\n# \n#\n#=======================================\n\nasis               1 ACCCGGGCGCGGT     13\n                     |||||.|||||||\nasis               1 ACCCGAGCGCGGT     13\n\n\n#---------------------------------------\n#---------------------------------------\n', '')</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class="">Now just use your regex.</div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Brian O.</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Feb 19, 2017, at 7:28 PM, Islam Amin <<a href="mailto:eng.islamamin@gmail.com" class="">eng.islamamin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Dear All.</div><div class="">I would like to get the similarity between two sequences, I have found that there is attributes called "similarity" but I this it is boolean value, is there any way to get the similarity value between two sequences instead of writing a text file.</div><div class=""><br class=""></div><div class="">from Bio.Emboss.Applications import WaterCommandline</div><div class="">water_cmd = WaterCommandline(gapopen=10, gapextend=0.5)</div><div class="">water_cmd.asequence = "asis:ACCCGGGCGCGGT"</div><div class="">water_cmd.bsequence = "asis:ACCCGAGCGCGGT"</div><div class="">print water_cmd.similarity</div><div class="">> None</div><div class=""><br class=""></div>
</div>
_______________________________________________<br class="">Biopython mailing list  -  <a href="mailto:Biopython@mailman.open-bio.org" class="">Biopython@mailman.open-bio.org</a><br class=""><a href="http://mailman.open-bio.org/mailman/listinfo/biopython" class="">http://mailman.open-bio.org/mailman/listinfo/biopython</a></div></blockquote></div><br class=""></div></body></html>