semvec/pypi-packages huggingface dataset:
judi 0.0.0.4
A Software Workflow Management System Based on DoIt

# JUDI - Bioinformatics Pipeline: *Just Do It*

*judi* comes from the idea of bringing the power and efficiency of *doit* to
execute any kind of task under many combinations of parameter settings.


## Sample Code

Snippet from [tutorial](https://judi.readthedocs.io/tutorial_1.html), save it as ``dodo.py``.

```python
from judi import File, Task, add_param, combine_csvs

add_param('100 101 102 103'.split(), 'sample')
add_param('1 2'.split(), 'group')

REF = 'hg_refs/hg19.fa'
path_gen = lambda x: '{}_{}.fq'.format(x['sample'],x['group'])

class AlignFastq(Task):
  inputs = {'reads': File('orig_fastq', path = path_gen)}
  targets = {'sai': File('aln.sai')}
  actions = [('bwa aln {} {} > {}', [REF,'$reads','$sai'])]

class CreateBam(Task):
  mask = ['group']
  inputs = {'reads': AlignFastq.inputs['reads'],
             'sai': AlignFastq.targets['sai']}
  targets = {'bam': File('aln.bam', mask = mask)}
  actions = [('bwa sampe {} {} {} | samtools view -Sbh - | samtools sort - > {}', [REF,'$sai','$reads','$bam'])]

class GetCoverage(Task):
  mask = ['group']
  inputs = {'bam': CreateBam.targets['bam']}
  targets = {'cov': File('cov.csv', mask = mask)}
  actions = [('(echo val; samtools rmdup {} - | samtools mpileup - | cut -f4) > {}', ['$bam','$cov'])]

class CombineCoverage(Task):
  mask = ['group', 'sample']
  inputs = {'cov': GetCoverage.targets['cov']}
  targets = {'csv': File('combined.csv', mask = mask),
             'pdf': File('pltcov.pdf', mask = mask, root = '.')}
  actions = [(combine_csvs, ['#cov', '#csv']),
             ("""echo "library(ggplot2); pdf('{}')
              ggplot(read.csv('{}'), aes(x = val)) +
              geom_density(aes(color = factor(sample)))"\
              | R --vanilla""", ['$pdf','$csv'])]
```
Run from terminal:

```console
$ doit list
AlignFastq
CombineCoverage
CreateBam
GetCoverage
$ doit
. AlignFastq:group~1,sample~100
. AlignFastq:group~2,sample~100
. AlignFastq:group~1,sample~101
. AlignFastq:group~2,sample~101
. AlignFastq:group~1,sample~102
. AlignFastq:group~2,sample~102
. AlignFastq:group~1,sample~103
. AlignFastq:group~2,sample~103
. CreateBam:sample~100
. CreateBam:sample~102
. CreateBam:sample~103
. CreateBam:sample~101
. GetCoverage:sample~100
. GetCoverage:sample~102
. GetCoverage:sample~103
. GetCoverage:sample~101
. CombineCoverage:
```

## Project Details

 - Website & docs - [https://pyjudi.readthedocs.io](https://pyjudi.readthedocs.io)
 - Project management on github - [https://github.com/ncbi/JUDI](https://github.com/ncbi/JUDI)

## License

The MIT License
Copyright (c) 2019-2020 Soumitra Pal

see LICENSE file


## Install

*judi* is tested on python 3.6.

```console
$ pip install judi
```

## Dependencies

- doit

## Documentation

``docs`` folder contains ReST documentation based on Sphinx.

```console
$ make html
```

## Contributing

On github create pull requests using a named feature branch.
casfs 0.1.2
Content-Addressable filesystem over Pyfilesystem2.
Requires Python: >=3.5.3

# CASFS

[![Build status](https://github.com/google/casfs/workflows/build/badge.svg?branch=master)](https://github.com/google/casfs/actions?query=workflow%3Abuild+branch%3Amaster)
[![Codecov branch](https://img.shields.io/codecov/c/github/google/casfs/master.svg?maxAge=3600)](https://codecov.io/github/google/casfs)
[![readthedocs](https://img.shields.io/readthedocs/casfs?maxAge=3600)](https://casfs.readthedocs.io/en/latest/?badge=latest)
[![Latest version](https://img.shields.io/pypi/v/casfs?maxAge=3600)](https://pypi.org/project/casfs)

CASFS is a content-addressable filestore library, built on
[pyfilesystem2](https://github.com/PyFilesystem/pyfilesystem2). CASFS was
inspired by [hashfs](https://github.com/dgilland/hashfs).

## Installation and Usage

Install CASFS via [pip](https://pypi.org/project/casfs/):

```bash
pip install casfs
```

Full documentation for CASFS lives at [Read The
Docs](https://casfs.readthedocs.io/en/latest).

## Disclaimer

This is a research project, not an official Google product. Expect bugs and
sharp edges. Please help by trying out CASFS, [reporting
bugs](https://github.com/google/casfs/issues), and letting us know what you
think!

## Citing CASFS

If Caliban helps you in your research, pleae consider citing the repository:

```
@software{casfs2020github,
  author = {Sam Ritchie},
  title = {{CASFS}: Content-addressable filesystem abstraction for Python.},
  url = {http://github.com/google/casfs},
  version = {0.1.0},
  year = {2020},
}
```

In the above bibtex entry, names are in alphabetical order, the version number
is intended to be that of the latest tag on github, and the year corresponds to
the project's open-source release.

## License

Copyright 2020 Google LLC.

Licensed under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).
sqlalchemy-function 0.0.9
Bases and Mixins to store functions for later execution
Requires Python: >=3.6

SQLAlchemy-Function defines a [SQLALchemy Mixin](https://docs.sqlalchemy.org/en/13/orm/extensions/declarative/mixins.html) for creating Function models.

A Function model has a parent (optional), a function, arguments, and keyword arguments. When called, the Function model executes its function, passing in its parent (if applicable), its arguments, and its keyword arguments.

## Installation

```
$ pip install sqlalchemy-function
```

## Quickstart

In the setup, we create a SQLAlchemy session, define a Parent model 
subclassing `FunctionRelator`, and a Function model subclassing 
`FunctionMixin`.

```python
from sqlalchemy_function import FunctionMixin, FunctionRelator

from sqlalchemy import create_engine, Column, ForeignKey, Integer
from sqlalchemy.orm import relationship, sessionmaker, scoped_session
from sqlalchemy.ext.declarative import declarative_base

# standard session creation
engine = create_engine('sqlite:///:memory:')
session_factory = sessionmaker(bind=engine)
Session = scoped_session(session_factory)
session = Session()
Base = declarative_base()

# define a Function model parent
class Parent(FunctionRelator, Base):
    __tablename__ = 'parent'
    id = Column(Integer, primary_key=True)

    # Fuction models must reference their parent with a `parent` attribute
    functions = relationship('Function', backref='parent')

# define a Function model with the FunctionMixin
class Function(FunctionMixin, Base):
    __tablename__ = 'function'
    id = Column(Integer, primary_key=True)
    parent_id = Column(Integer, ForeignKey('parent.id'))

Base.metadata.create_all(engine)
```

We can now register, store, and call functions as follows.

```python
@Function.register
def foo(parent, *args, **kwargs):
    print('My parent is', parent)
    print('My args are', args)
    print('My kwargs are', kwargs)
    return 'return value'

parent = Parent()
Function.foo(parent, 'hello world', goodbye='moon')
parent.functions[0]()
```

Out:

```
My parent is <__main__.Parent object at 0x7f8b4d200518>
My args are ('hello world',)
My kwargs are {'goodbye': 'moon'}
'return value'
```

## Citation

```
@software{bowen2020sqlalchemy-function,
  author = {Dillon Bowen},
  title = {SQLAlchemy-Function},
  url = {https://dsbowen.github.io/sqlalchemy-function/},
  date = {2020-06-05},
}
```

## License

Users must cite this package in any publications which use it.

It is licensed with the MIT [License](https://github.com/dsbowen/sqlalchemy-function/blob/master/LICENSE).