Skip to content

Commit

Permalink
Merge pull request #38 from nf-core/dev
Browse files Browse the repository at this point in the history
Major changes towards release
  • Loading branch information
apeltzer authored Apr 16, 2019
2 parents ee8b3fb + df51542 commit df7e204
Show file tree
Hide file tree
Showing 32 changed files with 1,467 additions and 689 deletions.
5 changes: 2 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ We try to manage the required tasks for nf-core/bcellmagic using GitHub issues,

However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;)

> If you need help using or modifying nf-core/bcellmagic then the best place to go is the Gitter chatroom where you can ask us questions directly: https://gitter.im/nf-core/Lobby
> If you need help using or modifying nf-core/bcellmagic then the best place to ask is on the pipeline channel on [Slack](https://nf-core-invite.herokuapp.com/).
## Contribution workflow
If you'd like to write some code for nf-core/bcellmagic, the standard workflow
Expand All @@ -22,7 +22,6 @@ is as follows:

If you're not used to this workflow with git, you can start with some [basic docs from GitHub](https://help.github.com/articles/fork-a-repo/) or even their [excellent interactive tutorial](https://try.github.io/).


## Tests
When you create a pull request with changes, [Travis CI](https://travis-ci.org/) will run automatic tests.
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
Expand All @@ -42,4 +41,4 @@ If there are any failures then the automated tests fail.
These tests are run both with the latest available version of Nextflow and also the minimum required version that is stated in the pipeline code.

## Getting help
For further information/help, please consult the [nf-core/bcellmagic documentation](https://github.com/nf-core/bcellmagic#documentation) and don't hesitate to get in touch on [Gitter](https://gitter.im/nf-core/Lobby)
For further information/help, please consult the [nf-core/bcellmagic documentation](https://github.com/nf-core/bcellmagic#documentation) and don't hesitate to get in touch on the pipeline channel on [Slack](https://nf-core-invite.herokuapp.com/).
9 changes: 9 additions & 0 deletions .github/markdownlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 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
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@ results/
.DS_Store
tests/test_data
runBcellmagic.sh
.idea/
.idea/
*.pyc
node_modules/
package-lock.json
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,23 @@ before_install:
# PRs to master are only ok if coming from dev branch
- '[ $TRAVIS_PULL_REQUEST = "false" ] || [ $TRAVIS_BRANCH != "master" ] || ([ $TRAVIS_PULL_REQUEST_SLUG = $TRAVIS_REPO_SLUG ] && [ $TRAVIS_PULL_REQUEST_BRANCH = "dev" ])'
# Pull the docker image first so the test doesn't wait for this
- docker pull nfcore/bcellmagic
- docker pull nfcore/bcellmagic:dev
# Fake the tag locally so that the pipeline runs properly
- docker tag nfcore/bcellmagic nfcore/bcellmagic:latest
# Looks weird when this is :dev to :dev, but makes sense when testing code for a release (:dev to :1.0.1)
- docker tag nfcore/bcellmagic:dev nfcore/bcellmagic:1.0.0

install:
# Install Nextflow
- mkdir /tmp/nextflow && cd /tmp/nextflow
- wget -qO- get.nextflow.io | bash
- sudo ln -s /tmp/nextflow/nextflow /usr/local/bin/nextflow
# Install nf-core/tools
- pip install --upgrade pip
- pip install --upgrade pip
- pip install nf-core
# Reset
- mkdir ${TRAVIS_BUILD_DIR}/tests && cd ${TRAVIS_BUILD_DIR}/tests
# Install markdownlint-cli
- sudo apt-get install npm && npm install -g markdownlint-cli

env:
- NXF_VER='0.32.0' # Specify a minimum NF version that should be tested and work
Expand All @@ -33,5 +36,7 @@ env:
script:
# Lint the pipeline code
- nf-core lint ${TRAVIS_BUILD_DIR}
# Lint the documentation
- markdownlint ${TRAVIS_BUILD_DIR} -c ${TRAVIS_BUILD_DIR}/.github/markdownlint.yml
# Run the pipeline with the test profile
- nextflow run ${TRAVIS_BUILD_DIR} -profile test,docker
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# nf-core/bcellmagic: Changelog

## v1.0dev - <date>
## v1.0.0 - 2019-04-16 - "Alohomora"

Initial release of nf-core/bcellmagic, created with the [nf-core](http://nf-co.re/) template.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on the [Gitter channel](https://gitter.im/nf-core/Lobby). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on [Slack](https://nf-core-invite.herokuapp.com/). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
FROM kleinstein/immcantation:2.6.0
LABEL authors="Gisela Gabernet" \
FROM nfcore/base
LABEL authors="Gisela Gabernet, Simon Heumos, Alexander Peltzer" \
description="Docker image containing all requirements for nf-core/bcellmagic pipeline"
RUN sudo dnf install -y bash

COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-bcellmagic-1.0.0/bin:$PATH
RUN ln -s /opt/conda/envs/nf-core-bcellmagic-1.0.0/bin/vsearch /opt/conda/envs/nf-core-bcellmagic-1.0.0/bin/usearch
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) Gisela Gabernet
Copyright (c) Gisela Gabernet, Simon Heumos, Alexander Peltzer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
35 changes: 12 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# nf-core/bcellmagic

A pipeline to analyze B-cell repertoires based on [Immcantation 2.5.0](https://immcantation.readthedocs.io/en/version-2.5.0/).
A pipeline to analyze B-cell repertoires.

[![Build Status](https://travis-ci.org/nf-core/bcellmagic.svg?branch=master)](https://travis-ci.org/nf-core/bcellmagic)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A50.32.0-brightgreen.svg)](https://www.nextflow.io/)
Expand All @@ -11,33 +11,22 @@ A pipeline to analyze B-cell repertoires based on [Immcantation 2.5.0](https://i
https://img.shields.io/badge/singularity-available-7E4C74.svg)

### Introduction
The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker / singularity containers making installation trivial and results highly reproducible.

The nf-core/bcellmagic pipeline is built to analyze B-cell repertoire sequencing data from targeted amplification experiments. It makes use of the [Immcantation 2.5.0](https://immcantation.readthedocs.io/en/version-2.5.0/) toolset for the analysis of B-cell repertoires.

The pipeline is built using [Nextflow](https://www.nextflow.io), a workflow tool to run tasks across multiple compute infrastructures in a very portable manner. It comes with docker / singularity containers making installation trivial and results highly reproducible.

### Documentation
## Documentation
The nf-core/bcellmagic pipeline comes with documentation about the pipeline, found in the `docs/` directory:

1. [Installation](docs/installation.md)
1. [Installation](https://nf-co.re/usage/installation)
2. Pipeline configuration
* [Local installation](docs/configuration/local.md)
* [Adding your own system](docs/configuration/adding_your_own.md)
* [Local installation](https://nf-co.re/usage/local_installation)
* [Adding your own system config](https://nf-co.re/usage/adding_own_config)
* [Reference genomes](https://nf-co.re/usage/reference_genomes)
3. [Running the pipeline](docs/usage.md)
4. [Output and how to interpret the results](docs/output.md)
5. [Troubleshooting](docs/troubleshooting.md)

Input needs to be a TSV file following this format in general:

```
ID Source Treatment Extraction_time Population R1 R2 I1
QMKMK072AD Patient 2 Terifluomid baseline p sample_S8_L001_R1_001.fastq.gz sample_S8_L001_R2_001.fastq.gz sample_S8_L001_I1_001.fastq.gz
```
Attention, the R1/R2 and I1 naming patterns are crucial!

An example call of the pipeline could be then:

```
nextflow run ggabernet/bcellmagic -profile standard,docker --metadata metasheet_test.tsv --cprimers CPrimers_IG.fasta --vprimers VPrimers.fasta --max_memory 8.GB --max_cpus 8 -resume
```
5. [Troubleshooting](https://nf-co.re/usage/troubleshooting)

### Credits
nf-core/bcellmagic was originally written by Gisela Gabernet, Simon Heumos and Alexander Peltzer.
## Credits
nf-core/bcellmagic was originally written by Gisela Gabernet, Simon Heumos, Alexander Peltzer.
2 changes: 1 addition & 1 deletion assets/email_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="description" content="nf-core/bcellmagic: Well, its magic? ">
<meta name="description" content="nf-core/bcellmagic: B/T cell repertoire analysis pipeline with immcantation framework. WIP, currently requires a bunch of changes first.">
<title>nf-core/bcellmagic Pipeline Report</title>
</head>
<body>
Expand Down
9 changes: 9 additions & 0 deletions assets/multiqc_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
report_comment: >
This report has been generated by the <a href="https://github.com/nf-core/bcellmagic" target="_blank">nf-core/bcellmagic</a>
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://github.com/nf-core/bcellmagic" target="_blank">documentation</a>.
report_section_order:
nf-core/bcellmagic-software-versions:
order: -1000

export_plots: true
31 changes: 28 additions & 3 deletions assets/sendmail_template.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
To: $email
Subject: $subject
Mime-Version: 1.0
Content-Type: multipart/related;boundary="nfmimeboundary"
Content-Type: multipart/related;boundary="nfcoremimeboundary"

--nfmimeboundary
--nfcoremimeboundary
Content-Type: text/html; charset=utf-8

$email_html

--nfmimeboundary--
<%
if (mqcFile){
def mqcFileObj = new File("$mqcFile")
if (mqcFileObj.length() < mqcMaxSize){
out << """
--nfcoremimeboundary
Content-Type: text/html; name=\"multiqc_report\"
Content-Transfer-Encoding: base64
Content-ID: <mqcreport>
Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\"

${mqcFileObj.
bytes.
encodeBase64().
toString().
tokenize( '\n' )*.
toList()*.
collate( 76 )*.
collect { it.join() }.
flatten().
join( '\n' )}
"""
}}
%>

--nfcoremimeboundary--
12 changes: 6 additions & 6 deletions bin/alakazam.R
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ inputtable = args[1]

output_folder = dirname(inputtable)

db <- readChangeoDb(inputtable)
#db <- readChangeoDb(inputtable)

dbsubset <- subset(db, C_PRIMER %in% c("IgG", "IgA", "IgM"))
#dbsubset <- subset(db, C_PRIMER %in% c("IgG", "IgA", "IgM"))

# Calculate and plot rank abundance curve
a <- estimateAbundance(dbsubset, group="C_PRIMER")
ggsave(paste(output_folder,"abundance.pdf",sep="/"), plotAbundanceCurve(a,silent=T))
#a <- estimateAbundance(dbsubset, group="C_PRIMER")
#ggsave(paste(output_folder,"abundance.pdf",sep="/"), plotAbundanceCurve(a,silent=T))

# Generate Hill diversity curve
d <- rarefyDiversity(dbsubset, group="C_PRIMER")
ggsave(paste(output_folder,"diversity.pdf",sep="/"), plotDiversityCurve(d,silent=T))
#d <- rarefyDiversity(dbsubset, group="C_PRIMER")
#ggsave(paste(output_folder,"diversity.pdf",sep="/"), plotDiversityCurve(d,silent=T))

# # Calculate CD3 amino acid properties
# p <- aminoAcidProperties(dbsubset, seq="JUNCTION", nt = T, trim=T, label="CDR3")
Expand Down
Loading

0 comments on commit df7e204

Please sign in to comment.