Giter Site home page Giter Site logo

screed's Introduction

screed's People

Contributors

acr avatar anotherthomas avatar betatim avatar bocajnotnef avatar brtaylor92 avatar camillescott avatar ctb avatar dependabot[bot] avatar kdm9 avatar luizirber avatar mr-c avatar peterjc avatar proteasome avatar sguermond avatar standage avatar themangoemoji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

screed's Issues

post demultiplexing script as example

see below:

#! /usr/bin/env python
from __future__ import print_function
import screed
import sys
import argparse

p = argparse.ArgumentParser()
p.add_argument('r1_file')
p.add_argument('r2_file')
p.add_argument('code_r1')
p.add_argument('code_r2')
args = p.parse_args()

for record1, record2 in zip(screed.open(args.r1_file),
                            screed.open(args.r2_file)):
    if record1.sequence[8:].startswith(args.code_r1) and \
       record2.sequence[0:].startswith(args.code_r2):
       
       print('@{}\n{}\n+\n{}'.format(record1.name, record1.sequence,
                                     record1.quality))
       print('@{}\n{}\n+\n{}'.format(record2.name, record2.sequence,
                                     record2.quality))

TypeError: Database A_xenica_combined.fastq_screed is not a proper screed database

I'm using screed 1.0 to convert a fastq file to a fasta file, but it appears that the db file is being written over in the second step.

First:

screed db A_xenica_combined.fastq

With this result:

-rw-r--r-- 1 ljcohen ljcohen 86451998720 Aug 15 20:17 A_xenica_combined.fastq_screed

Second, this command:

(ONT) ljcohen@c11-71:~/A_xenica_promethION$ python -m screed dump_fasta A_xenica_combined.fastq_screed A_xenica_combined.fasta

With this result:

Traceback (most recent call last):
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/openscreed.py", line 147, in __init__
    admin_table, = res.fetchone()
TypeError: 'NoneType' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/__main__.py", line 52, in <module>
    main()
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/__main__.py", line 48, in main
    ScreedCommands()
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/__main__.py", line 44, in __init__
    cmd(sys.argv[2:])
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/dump_fasta.py", line 27, in main
    n = ToFasta(args.dbfile, args.outputfile)
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/conversion.py", line 75, in ToFasta
    db = ScreedDB(dbFile)
  File "/home/ljcohen/miniconda3/envs/ONT/lib/python3.6/site-packages/screed/openscreed.py", line 157, in __init__
    % self._filepath)
TypeError: Database A_xenica_combined.fastq_screed is not a proper screed database

And now my file is only 8K:

-rw-r--r-- 1 ljcohen ljcohen        8192 Aug 16 09:25 A_xenica_combined.fastq_screed

Contents of file:

(ONT) ljcohen@c11-71:~/A_xenica_promethION$ cat A_xenica_combined.fastq_screed
(ONT) ljcohen@c11-71:~/A_xenica_promethION$ LE SCREEDADMIN (id INTEGER PRIMARY KEY, FIELDNAME TEXT, ROLE TEXT)

Screed was installed with khmer 3.0.0a1 from the bioconda channel in a Python 3 conda 4.5.4 environment running on Ubuntu 16.04.4 LTS on the UCD farm cluster.

(ONT) ljcohen@c11-71:~/A_xenica_promethION$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.4 LTS
Release:	16.04
Codename:	xenial
(ONT) ljcohen@c11-71:~/A_xenica_promethION$ python
Python 3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 09:53:17) 
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux
>>>

Screed version?

I was writing up a separate issue, and trying to find the screed version. It appears that there is not a version -v or --version flag? I found the version with the help of @luizirber via conda list:

screed                    1.0                        py_1    bioconda

Problems with deepcopy

via @standage:

There is a maximum recursion depth exception when using deepcopy with screed records. This triggers the bug:

import screed
from copy import deepcopy
record = screed.screedRecord.Record()
deepcopy(record)

output

screed/screedRecord.py in __getattr__(self, name)
     39     def __getattr__(self, name):
     40         try:
---> 41             return self.d[name]
     42         except KeyError:
     43             raise AttributeError(name)

RuntimeError: maximum recursion depth exceeded while calling a Python object

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.