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

Allow slicing of screed records #768

Closed
ctb opened this issue Feb 11, 2015 · 10 comments
Closed

Allow slicing of screed records #768

ctb opened this issue Feb 11, 2015 · 10 comments

Comments

@ctb
Copy link
Member

ctb commented Feb 11, 2015

This pattern occurs several times in the khmer code base:

new_read.name = read.name
new_read.sequence = read.sequence[:trim_at]
if hasattr(read, 'accuracy'):
    accuracy = read.accuracy
    new_read.accuracy = read.accuracy[:trim_at]

and should really just be new_read = read[:trim_at]...

This could be done at the same time as #705, too.

@bocajnotnef
Copy link
Contributor

I'm only seeing this in scripts/trim-low-abund. Are there others?

@bocajnotnef
Copy link
Contributor

(Also, starting work on this)

@ctb
Copy link
Member Author

ctb commented Feb 27, 2015

On Fri, Feb 27, 2015 at 08:44:46AM -0800, bocajnotnef wrote:

I'm only seeing this in scripts/trim-low-abund. Are there others?

filter-abund and filter-abund-single, too. And maybe more down the road :)

@bocajnotnef
Copy link
Contributor

Alright. Is there an obvious place I should look to fix this? Otherwise I'm just gonna try to do it and see what breaks.

@ctb
Copy link
Member Author

ctb commented Feb 27, 2015

On Fri, Feb 27, 2015 at 08:47:43AM -0800, bocajnotnef wrote:

Alright. Is there an obvious place I should look to fix this? Otherwise I'm just gonna try to do it and see what breaks.

Let's talk briefly at noon.

@bocajnotnef
Copy link
Contributor

  • see _screed_recorcd_dict (rename to RecordDict and make public?)
  • rewrite getitem to handle slice objects

@themangoemoji
Copy link
Contributor

@bocajnotnef are you still working on this? Thinking of picking it up.

@bocajnotnef
Copy link
Contributor

@wrightmhw Hadn't started--Go for it.

@bocajnotnef
Copy link
Contributor

Closing--resolved by dib-lab/screed#29

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

No branches or pull requests

5 participants