Comments (6)
I'm not sure that is a "bug" on our end, and I'm not even sure of how to catch it. We don't know that we are writing to a file, we're writing to stdout and that's being redirected to a file. That's outside of Python's control and therefore pdb-tools. See: https://unix.stackexchange.com/questions/257110/exclude-target-redirection-file-from-being-processed-in-for-loop
I'm afraid that short of adding an output flag (which none of the other tools has), the only option is for the user to write the ensemble to a different folder, or be more specific with the glob: pdb_mkensemble model*.pdb > ensemble.pdb
. Ultimately, we could add a check to only write files that have content, but that can hide a bunch of errors.
from pdb-tools.
Ok - but then why does pdb_merge
does not show the same behaviour then?
Or may-be it does but since the file is non-existing (or empty) you don't see it in the resulting pdb file.
And I was not suggesting to add an output flag.
We leave it as is then, but this can give strange behaviours and lead to errors with other software using those ensembles.
from pdb-tools.
When I first read this thread, I had the same opinion as João. But looking to your explanations and the code in more detail, it seems to be a bug. Give me some minutes, and I will come back with more.
edited: see next comment
from pdb-tools.
Hi @amjjbonvin
I can't reproduce that behaviour. It works well in my case. For example:
pdb_fecth 2fej > 2fej.pdb
pdb_splitmodel 2fej.pdb
rm 2fej.pdb
pdb_mkensemble *.pdb > test.pdb
And the test.pdb
is clean.
Check if you are running on the latest version:
$ pip show pdb-tools
Name: pdb-tools
Version: 2.5.0
In similar cases, I use a tmp
file to bypass the output, for example:
pdb_mkensemble *.pdb > tmp && mv tmp test.pdb
Cheers,
from pdb-tools.
Ok - must be a strange behaviour on my Mac then.
If running under tcsh
(I know, it's dinosaur stuff...) I get the weird behaviour. When running under bash
it works fine... In both cases the same Python3 ((3.7.2) from the system are called.
from pdb-tools.
Okay. So it's precisely as João said at first, it's a problem how the tcsh
pass the arguments to the python sys.args
. In bash the args
are block to the >
but likely in tcsh
the whole command line is sent. If you see this can be a real issue because tcsh
is used often in servers where pdb-tools
may run, we can make a checkpoint in the python part. But that will bring a non-negligible burden to the code.
from pdb-tools.
Related Issues (20)
- Better naming of pdb_tofasta entries HOT 2
- `pdb_fetch` could return `.cif` if the `.pdb` is not available HOT 3
- Possible bug in Molprobity HOT 4
- `ValueError: invalid literal for int() with base 10: '?'` when handling `HETATM` HOT 7
- improve `pdb_wc` when using as library.
- Bug in the `pdb-tools` website HOT 3
- `pdb_selaltloc` is breaking with ANISOU lines for `7K2U.pdb`
- Development suggestion: Behaviour of pdb_reres and pdb_shiftres HOT 3
- Help with badly formatted PDB file HOT 3
- `pdb_wc` should report the list of chain IDs of the PDB
- Improve `pdb_mkensemble` to work as lib
- pdb_fixinsert can't handle the PDB, which has missing residue in insertion code region HOT 3
- pdb_merge not adding END statement HOT 1
- Question on `pdb_keepcoord` HOT 4
- pdb_selaltloc removes residues with (only) alternate locations HOT 22
- `pdb_tidy` removes the `TER` record between chains and removes last `ENDMDL` in a multi-model PDB HOT 8
- pdb_merge should discard MODEL/ENDMDL statements
- pdb_tidy discards ENDMDL statements for HETATM ensembles
- pdb_selb
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pdb-tools.