Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: Segment has no attribute name #2

Closed
fabricecarles opened this issue Jul 25, 2017 · 7 comments
Closed

AttributeError: Segment has no attribute name #2

fabricecarles opened this issue Jul 25, 2017 · 7 comments

Comments

@fabricecarles
Copy link

Hi,
I am interested by your tools, but unfortunately when a want to use it against the structure 1atp (rename here test1atp.pdb) I get the following error:

kinconform test1atp.pdb 
Traceback (most recent call last):
  File "/bin/kinconform", line 169, in <module>
    results = do_one(args)
  File "/bin/kinconform", line 133, in do_one
    temp,posn = get_sequence(x)
  File "/bin/kinconform", line 55, in get_sequence
    chains = [x.name for x in prot.segments]
  File "/usr/lib64/python2.7/site-packages/MDAnalysis/core/groups.py", line 2709, in __getattr__
    "".format(cls=self.__class__.__name__, attr=attr))
AttributeError: Segment has no attribute name

Any idea ? could you provide the exact version of each dependencies ? I suspect an issue with version of MDAnalysis.
For your intention I have install the last MDAnalysis version using pip

 pip install --upgrade MDAnalysis
Collecting MDAnalysis
  Downloading MDAnalysis-0.16.2.tar.gz (2.6MB)
    100% |████████████████████████████████| 2.6MB 285kB/s 

Sincerely

@dmcskim
Copy link
Owner

dmcskim commented Jul 25, 2017 via email

@fabricecarles
Copy link
Author

Hi Daniel,
Thank a lot for this quick patch.
Now I have a mistake with an other fonction...
I have add in my bashrc the mapgaps1.0.1 bin executable after extraction of the tar.gz
export PATH=$PATH:/home/carles/Documents/sources/mapgaps1_0_1/bin
Then I run a test from mapgaps1_0_1/example/run_example shell script and everything seem to be ok.
Unfortunately when I try to run kinconform from my /home I get the following error.

kinconform struct1atp.pdb 
struct1atp.pdb
Traceback (most recent call last):
  File "/bin/kinconform", line 179, in <module>
    results = do_one(args)
  File "/bin/kinconform", line 150, in do_one
    mapping = align_and_map_fasta('pdbs.fasta', positions, basedir)
  File "/bin/kinconform", line 83, in align_and_map_fasta
    mapping = make_mapfile(fasta+'_aln.cma',positions)
  File "/bin/kinconform", line 25, in make_mapfile
    block = cma.read(aligned_seq)
  File "build/bdist.linux-x86_64/egg/biocma/sugar.py", line 12, in read
  File "build/bdist.linux-x86_64/egg/biocma/cma.py", line 16, in parse
  File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
    return self.gen.next()
  File "build/bdist.linux-x86_64/egg/biocma/sugar.py", line 34, in maybe_open
IOError: [Errno 2] No such file or directory: 'pdbs.fasta_aln.cma'

Did I miss something on the configuration of my environnement ?
where is supposed to be the pdbs.fasta_aln.cma file ?

Fabrice

@dmcskim
Copy link
Owner

dmcskim commented Jul 26, 2017 via email

@fabricecarles
Copy link
Author

fabricecarles commented Jul 26, 2017

Thank again for your quick answer,
I runed again your test with makefile. I got the pdbs.fasta file but not pdbs.fasta_aln.cma
I think there is a problem with fasta format and carriage return since the ">Name of sequence" has to be separate from the sequence by '\n' as well as each new sequence. Moreover file should finish with "\n" again.

@zencore
Copy link

zencore commented Sep 14, 2017

Hi @fabricecarles

I've made some fixes in the kinconform script might also fix the errors you were facing. I've sent a pull request to @dmcskim, or you can check out my fork of kinconform.

@dmcskim
Copy link
Owner

dmcskim commented Mar 1, 2018

Thanks zencore! Updates were merged.

@dmcskim dmcskim closed this as completed Mar 1, 2018
@pschmidtke
Copy link

Hi I also tried a recent install. Tried with latest MDanalysis and also run in this segment error stated in the beginning of the issue. I tried to go back to 0.16.2 but still the same error. Can you please specify which version you were using by the time of development or if there's a conda or docker version available?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants