Giter Site home page Giter Site logo

process-featurecounts's Introduction

Process featureCounts Output

This script processes the output files generated by featureCounts to a simpler (and smaller) counts matrix.

Usage

usage: process-featurecounts [-h] [-V] [-v {error,warning,info,debug}] [-r <re>] [-s <re>] [-e] [-i <n>] [-k <n,[n]>] <file>

Reformat featureCounts output files

positional arguments:
  <file>                input featureCounts file

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -v {error,warning,info,debug}, --verbose {error,warning,info,debug}
                        Set logging level (default debug)
  -r <re>, --id-regex <re>
                        row ID regular expression to use (default
                        "^([^.]+)\.\d+(.*)$")
  -s <re>, --sample-regex <re>
                        sample name regular expression to use (default
                        "^(.*)$")
  -e, --include-header  include header comments
  -i <n>, --id-col <n>  gene ID column (default 1)
  -k <n,[n]>, --skip <n,[n]>
                        comma-separated columns to skip (default 2,3,4,5,6)

Header & row ID Trimming

process-featurecounts trims both the header sample names and the gene IDs using the specified sample-regex and id-regex regular expressions. After matching, all captured groups are concatenated to yield the output.

Installation

Installation should be as simple as:

git clone https://github.com/alastair-droop/process-featurecounts.git
cd process-featurecounts
python setup.py install

process-featurecounts's People

Contributors

alastair-droop avatar

Watchers

 avatar  avatar  avatar

Forkers

anandksrao

process-featurecounts's Issues

Install OK but even help menu wont show up

I seek your help, because semingly install went OK, but not even the help menu will show up. More details below:

Installation was performed by following your instructions at main GitHub page, under Installation

$ git clone https://github.com/alastair-droop/process-featurecounts.git
$ cd process-featurecounts
$ python setup.py install --user # installing this on my account on a shared HPCC

Install STDOUT read as follows:

$ python setup.py install --user
running install
running bdist_egg
running egg_info
writing prfeaturecounts.egg-info/PKG-INFO
writing top-level names to prfeaturecounts.egg-info/top_level.txt
writing dependency_links to prfeaturecounts.egg-info/dependency_links.txt
writing entry points to prfeaturecounts.egg-info/entry_points.txt
reading manifest file 'prfeaturecounts.egg-info/SOURCES.txt'
writing manifest file 'prfeaturecounts.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/bdist.linux-x86_64/egg
creating build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/version.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/scripts.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
copying build/lib/prfeaturecounts/__init__.py -> build/bdist.linux-x86_64/egg/prfeaturecounts
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/version.py to version.pyc
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/scripts.py to scripts.pyc
byte-compiling build/bdist.linux-x86_64/egg/prfeaturecounts/__init__.py to __init__.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/entry_points.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying prfeaturecounts.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
prfeaturecounts.scripts: module references __file__
creating 'dist/prfeaturecounts-1.0.1-py2.7.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing prfeaturecounts-1.0.1-py2.7.egg
removing '/home/lotte/.local/lib/python2.7/site-packages/prfeaturecounts-1.0.1-py2.7.egg' (and everything under it)
creating /home/lotte/.local/lib/python2.7/site-packages/prfeaturecounts-1.0.1-py2.7.egg
Extracting prfeaturecounts-1.0.1-py2.7.egg to /home/lotte/.local/lib/python2.7/site-packages
prfeaturecounts 1.0.1 is already the active version in easy-install.pth
Installing process-featurecounts script to /home/lotte/.local/bin

Installed /home/lotte/.local/lib/python2.7/site-packages/prfeaturecounts-1.0.1-py2.7.egg
Processing dependencies for prfeaturecounts==1.0.1
Finished processing dependencies for prfeaturecounts==1.0.1

However, help menu does not appear - instead I see a lot of warning and errors, as follows:

$ process-featurecounts -h
Traceback (most recent call last):
  File "/home/lotte/.local/bin/process-featurecounts", line 11, in <module>
    load_entry_point('prfeaturecounts==1.0.1', 'console_scripts', 'process-featurecounts')()
  File "/home/lotte/.local/lib/python2.7/site-packages/prfeaturecounts-1.0.1-py2.7.egg/prfeaturecounts/scripts.py", line 48, in main
    args = parser.parse_args()
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 1701, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 1733, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 1939, in _parse_known_args
    start_index = consume_optional(start_index)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 1879, in consume_optional
    take_action(action, args, option_string)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 1807, in take_action
    action(self, namespace, argument_values, option_string)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 996, in __call__
    parser.print_help()
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 2340, in print_help
    self._print_message(self.format_help(), file)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 2314, in format_help
    return formatter.format_help()
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 281, in format_help
    help = self._root_section.format_help()
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 211, in format_help
    func(*args)
  File "/share/apps/python-2.7.15/lib/python2.7/argparse.py", line 332, in _format_usage
    assert ' '.join(opt_parts) == opt_usage
AssertionError

Other possibly relevant details

python --version
Python 2.7.15
python3 --version
Python 3.6.9
$ lsb_release -d
Description:	Ubuntu 18.04.4 LTS

How should I modify install parameters to get this up and running? Please let me know if you need any other details.
Thank you, in advance!

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.