-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from nf-core/dev
PR for 1.0.0 release
- Loading branch information
Showing
26 changed files
with
918 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
# Markdownlint configuration file | ||
default: true, | ||
line-length: false | ||
no-multiple-blanks: 0 | ||
blanks-around-headers: false | ||
blanks-around-lists: false | ||
header-increment: false | ||
no-duplicate-header: | ||
siblings_only: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: nfcore/scrnaseq branch protection | ||
# This workflow is triggered on PRs to master branch on the repository | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# PRs are only ok if coming from an nf-core dev branch | ||
- uses: actions/checkout@v1 | ||
- name: Check PRs | ||
run: | | ||
[[ $(git remote get-url origin) == *nf-core/scrnaseq ]] && [ ${GITHUB_BASE_REF} = "master" ] && [ ${GITHUB_HEAD_REF} = "dev" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: scrnaseq CI | ||
# This workflow is triggered on pushes and PRs to the repository. | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
nxf_ver: ['19.10.0', ''] | ||
profile: ['test,docker', 'test_kallisto,docker', 'test,docker --aligner star'] | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Nextflow | ||
run: | | ||
export NXF_VER=${{ matrix.nxf_ver }} | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
- name: Download and tag image | ||
run: | | ||
docker pull nfcore/scrnaseq:dev | ||
docker tag nfcore/scrnaseq:dev nfcore/scrnaseq:1.0.0 | ||
- name: "Test suites for all alignment methods" | ||
run: | | ||
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.profile }} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: nfcore/scrnaseq linting | ||
# This workflow is triggered on pushes and PRs to the repository. | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
Markdown: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10' | ||
- name: Install markdownlint | ||
run: | | ||
npm install -g markdownlint-cli | ||
- name: Run Markdownlint | ||
run: | | ||
markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml | ||
YAML: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: '10' | ||
- name: Install yamllint | ||
run: | | ||
npm install -g yaml-lint | ||
- name: Run yamllint | ||
run: | | ||
yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml") | ||
nf-core: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Install Nextflow | ||
run: | | ||
wget -qO- get.nextflow.io | bash | ||
sudo mv nextflow /usr/local/bin/ | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.6' | ||
architecture: 'x64' | ||
- name: Install pip | ||
run: | | ||
sudo apt install python3-pip | ||
pip install --upgrade pip | ||
- name: Install nf-core tools | ||
run: | | ||
pip install nf-core | ||
- name: Run nf-core lint | ||
run: | | ||
nf-core lint ${GITHUB_WORKSPACE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
# nf-core/scrnaseq: Changelog | ||
|
||
## v1.0dev - [date] | ||
## v1.0.0 - 2019-11-28 "Tiny Aluminium Crab" | ||
|
||
Initial release of nf-core/scrnaseq, created with the [nf-core](http://nf-co.re/) template. | ||
This includes the following workflow options: | ||
|
||
* Salmon Alevin + AlevinQC | ||
* STARSolo | ||
* Kallisto / BUStools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
FROM nfcore/base | ||
LABEL authors="Peter J Bailey, Alexander Peltzer" \ | ||
FROM nfcore/base:1.7 | ||
LABEL authors="Peter J Bailey, Alexander Peltzer, Olga Botvinnik" \ | ||
description="Docker image containing all requirements for nf-core/scrnaseq pipeline" | ||
|
||
COPY environment.yml / | ||
RUN conda env create -f /environment.yml && conda clean -a | ||
ENV PATH /opt/conda/envs/nf-core-scrnaseq-1.0dev/bin:$PATH | ||
ENV PATH /opt/conda/envs/nf-core-scrnaseq-1.0.0/bin:$PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/usr/bin/env python | ||
#This was downloaded on 2019-06-23 from https://github.com/bustools/getting_started/releases/ | ||
#All credit goes to the original authors from the Kallisto/BUStools team! | ||
# BSD 2-Clause License | ||
# | ||
# Copyright (c) 2017, Nicolas Bray, Harold Pimentel, Páll Melsted and Lior Pachter | ||
# All rights reserved. | ||
# | ||
# Redistribution and use in source and binary forms, with or without | ||
# modification, are permitted provided that the following conditions are met: | ||
# | ||
# * Redistributions of source code must retain the above copyright notice, this | ||
# list of conditions and the following disclaimer. | ||
# | ||
# * Redistributions in binary form must reproduce the above copyright notice, | ||
# this list of conditions and the following disclaimer in the documentation | ||
# and/or other materials provided with the distribution. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
||
import sys, argparse | ||
|
||
def create_transcript_list(input, use_name = True, use_version = False): | ||
r = {} | ||
for line in input: | ||
if len(line) == 0 or line[0] == '#': | ||
continue | ||
l = line.strip().split('\t') | ||
if l[2] == 'transcript': | ||
info = l[8] | ||
d = {} | ||
for x in info.split('; '): | ||
x = x.strip() | ||
p = x.find(' ') | ||
if p == -1: | ||
continue | ||
k = x[:p] | ||
p = x.find('"',p) | ||
p2 = x.find('"',p+1) | ||
v = x[p+1:p2] | ||
d[k] = v | ||
|
||
|
||
if 'transcript_id' not in d or 'gene_id' not in d: | ||
continue | ||
|
||
tid = d['transcript_id'].split(".")[0] | ||
gid = d['gene_id'].split(".")[0] | ||
if use_version: | ||
if 'transcript_version' not in d or 'gene_version' not in d: | ||
continue | ||
|
||
tid += '.' + d['transcript_version'] | ||
gid += '.' + d['gene_version'] | ||
gname = None | ||
if use_name: | ||
if 'gene_name' not in d: | ||
continue | ||
gname = d['gene_name'] | ||
|
||
if tid in r: | ||
continue | ||
|
||
r[tid] = (gid, gname) | ||
return r | ||
|
||
|
||
|
||
def print_output(output, r, use_name = True): | ||
for tid in r: | ||
if use_name: | ||
output.write("%s\t%s\t%s\n"%(tid, r[tid][0], r[tid][1])) | ||
else: | ||
output.write("%s\t%s\n"%(tid, r[tid][0])) | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
|
||
parser = argparse.ArgumentParser(add_help=True, description='Creates transcript to gene info from GTF files\nreads from standard input and writes to standard output') | ||
parser.add_argument('--use_version', '-v', action='store_true', help='Use version numbers in transcript and gene ids') | ||
parser.add_argument('--skip_gene_names', '-s', action='store_true', help='Do not output gene names') | ||
args = parser.parse_args() | ||
|
||
|
||
|
||
input = sys.stdin | ||
r = create_transcript_list(input, use_name = not args.skip_gene_names, use_version = args.use_version) | ||
output = sys.stdout | ||
print_output(output, r) |
Oops, something went wrong.