alignment

'numpy.float64' object does not support item assignment alignment sequences

'numpy.float64' object does not support item assignment alignment sequences Question: I am developing a program to calculate the sp scores of aligned sequences from the Percent Identity Matrix obtained on Clustal Omega. I have problems with element casting in python. I’m trying to store the values read from a text file in an array of …

Total answers: 1

Read Clustal file in Python

Read Clustal file in Python Question: I have a multiple sequence alignment (MSA) file derived from mafft in clustal format which I want to import into Python and save into a PDF file. I need to import the file and then highlight some specific words. I’ve tried to simply import the pdf of the MSA …

Total answers: 2

Python printing tabular data

Python printing tabular data Question: Hell All, I have been trying to print tabular data from two dimensional list numerical are right aligned, strings are left aligned and width of a column is dynamically decided based on max string length in each column Example-A: table = [[‘Name’, ‘Marks’, ‘Division’, ‘ID’], [‘Raj’, 7, ‘A’, 21], [‘Shivam’, …

Total answers: 2

matplotlib: Aligning y-axis labels in stacked scatter plots

matplotlib: Aligning y-axis labels in stacked scatter plots Question: In the plot bellow i have two scatter plots which have different number scale, so their Y-axis labels are not aligned. Is there any way I can force the horizontal alignment in the y-axis labels? import matplotlib.pylab as plt import random import matplotlib.gridspec as gridspec random.seed(20) …

Total answers: 5

Python spacing and aligning strings

Python spacing and aligning strings Question: I am trying to add spacing to align text in between two strings vars without using " " to do so Trying to get the text to look like this, with the second column being aligned. Location: 10-10-10-10 Revision: 1 District: Tower Date: May 16, 2012 User: LOD Time: …

Total answers: 7

Format output string, right alignment

Format output string, right alignment Question: I am processing a text file containing coordinates x, y, z 1 128 1298039 123388 0 2 …. every line is delimited into 3 items using words = line.split() After processing data I need to write coordinates back in another txt file so as items in each column are …

Total answers: 8

How to right-align columns content in reStructuredText simple tables?

How to right-align columns content in reStructuredText simple tables? Question: I’m editing the documentation for a project of mine using Sphinx, which in turn uses reStructuredText as markup language. I have a simple table (as opposed to grid table) in which the rightmost column reports contains numbers that I would like to right-align, but I …

Total answers: 5