linsalrob / PhiSpy

Prediction of prophages from bacterial genomes
MIT License
70 stars 20 forks source link

Keep CDS parts in original frame #38

Closed pdec closed 4 years ago

pdec commented 4 years ago

When there's a gap in a complex feature, the new feature needs to have a start position shifted by one. That way newly created features stay in the original frame.

The following lines require change: https://github.com/linsalrob/PhiSpy/blob/c1117eb26a044d64ebb80b6b315c532cb0cb46f2/PhiSpyModules/seqio_filter.py#L120 to

merged = FeatureLocation(p.start - 1, p.end, strand)

and

https://github.com/linsalrob/PhiSpy/blob/c1117eb26a044d64ebb80b6b315c532cb0cb46f2/PhiSpyModules/seqio_filter.py#L148

to

merged = FeatureLocation(p.start, p.end - 1, strand)