Skip to content

Commit

Permalink
Merge back 'dev' on 'master' for 1.4.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
qmarcou committed Apr 11, 2020
2 parents d2f9bb7 + f7710d2 commit 39f0e05
Show file tree
Hide file tree
Showing 32 changed files with 2,754 additions and 136 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
.project
.settings/*

# Ignore Netbeans config files
nbproject
tests


# Ignore the compiled object files
*.o
*.gcno
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ brevity. Much more detail can be found in the git revision history:

https://github.com/qmarcou/IGoR

* 1.4.0 (April 2, 2020)

A brief description of the release content's

New features:
- Add new file with CDR3 segments
- Add new option -getdatadir to output the path of default models directory
- New IGL and IGK models for humans

Miscellaneous :
- New script igor-compute_pgen to calculate pgen for a single sequence


* 1.3.0 (August 4, 2018)

A brief description of the release content's
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ man_MANS = igor.1
bin_SCRIPTS = \
scripts/igor-compute_pgen


install-data-local:
mkdir -p $(DESTDIR)$(pkgdatadir)/models
cp -r models/* $(DESTDIR)$(pkgdatadir)/models
Expand Down
10 changes: 9 additions & 1 deletion docs/asciidoc/alignments/alignment_commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,20 @@ switch in the command line. For each gene, alignment parameters can be
set using `--V`,`--D` or `--J`. *Specifying any of those three argument
will cause to align only the specified genes*. In order to specify a set
of parameters for all genes or force to align all genes the argument
`--all` should be passed. The arguments for setting the different
`--all` should be passed.

The complementarity-determining region (CDR3) of the aligned sequences is
by default written on a file <batchname>_indexed_CDR3.csv in the aligns
directory when `--all` is used. In case of separated alignments the CDR3 file
can be generated by using the `--feature ---ntCDR3` option.
The arguments for setting the different
parameters are given in the table below.
If the considered sequences are nucleotide CDR3 sequences (delimited by
its anchors on 3' and 5' sides) using the command `--ntCDR3` alignments will
be performed using gene anchors information as offset bounds.
[width="99%",cols="<32%,<68%",options="header",]
|=======================================================================
|Command line argument |Description
Expand Down
22 changes: 22 additions & 0 deletions docs/asciidoc/alignments/alignments_output.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,25 @@ the genomic template)
|3_p_align_offset |Offset of the last nucleotide of the SW alignemnt
(relative to the read)
|=======================================================================



The CDR3 files are semicolon separated files. For each IGoR indexed
sequence the following fields are given:
[width="99%",cols="<32%,<68%",options="header",]
|=======================================================================
|Field |Description
|seq_index |The sequence index the alignment corresponds to in the
_indexed_sequences.csv_ file.

|v_anchor | Position of the V anchor (first nucleotide of 2nd-CYS codon) relative to the read sequence.

|j_anchor | Position of the J anchor (last nucleotide of J-PHE or J-TRP codon) relative to the read sequence.

|CDR3nt | Nucleotide CDR3 sequence of the indexed sequence.

|CDR3aa | Amino acids CDR3 sequence of the indexed sequence.

|=======================================================================

TIP: Anchors positions are 0 based indices relative to the read sequence.
3 changes: 3 additions & 0 deletions docs/asciidoc/general/general_commands.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ General
~~~~~~~

include::general_command_lines.adoc[]

include::scripts.adoc[]

19 changes: 19 additions & 0 deletions docs/asciidoc/general/scripts.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[scripts]]
Bash scripts
^^^^^^^^^^^^

A set of bash scripts for common tasks using igor.
We can use igor-compute_pgen to calculate the Pgen of
a specific sequence.

[source,shell]
----
igor-compute_pgen <specie> <chain> <ntsequence>
----
Example

[source,shell]
----
igor-compute_pgen human beta actcagctttgtatttctgtgccagcagcgtagattgggacagggggcctcctacgagcagtacgtcgggccg
----

4 changes: 2 additions & 2 deletions docs/asciidoc/general/workflow/supplied_models_table.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[cols="<,<",options="header",]
|=======================
|Species |Chains
|human |alpha, beta, heavy
|mouse |beta
|human |TRA (or alpha), TRB (or beta), IGH (or heavy chain), IGL (or lambda light chain), IGK (or kappa light chain)
|mouse |TRB (or beta)
|=======================
205 changes: 104 additions & 101 deletions docs/index.html

Large diffs are not rendered by default.

62 changes: 62 additions & 0 deletions igor_src/CDR3SeqData.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/*
* File: CDR3SeqData.cpp
*
* Author: Carlos Olivares
*
* This source code is distributed as part of the IGoR software.
* IGoR (Inference and Generation of Repertoires) is a versatile software to analyze and model immune receptors
* generation, selection, mutation and all other processes.
* Copyright (C) 2017- Quentin Marcou, 2019 - Carlos Olivares
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
*/

#include <string>

#include "CDR3SeqData.h"

CDR3SeqData::CDR3SeqData() {
seq_index = -1;
v_anchor = -1;
j_anchor = -1;
CDR3nt = "";
CDR3aa = "";
}

//CDR3SeqData::CDR3SeqData(int seq_index, int v_anchor, int j_anchor ) {
// seq_index = seq_index;
// v_anchor = v_anchor;
// j_anchor = j_anchor;
// CDR3nt = "";
// CDR3aa = "";
//}

CDR3SeqData::CDR3SeqData(const CDR3SeqData& orig) {
}

CDR3SeqData::~CDR3SeqData() {
}


std::string CDR3SeqData::strData(){
std::string delimiter = ";";
return std::to_string(seq_index) + delimiter +
std::to_string(v_anchor ) + delimiter +
std::to_string(j_anchor ) + delimiter +
CDR3nt + delimiter +
CDR3aa;
}


29 changes: 29 additions & 0 deletions igor_src/CDR3SeqData.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

/**
* \class CDR3SeqData CDR3SeqData.h
* \brief Class to store CDR3 information of a sequence.
* \author C. Olivares
*
*/

#ifndef CDR3SEQDATA_H
#define CDR3SEQDATA_H

class CDR3SeqData {
public:
CDR3SeqData();
CDR3SeqData(const CDR3SeqData& orig);
virtual ~CDR3SeqData();
int seq_index;
int v_anchor;
int j_anchor;
std::string CDR3nt;
std::string CDR3aa;
std::string strData();

private:

};

#endif /* CDR3SEQDATA_H */

17 changes: 5 additions & 12 deletions igor_src/Counter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,15 @@

using namespace std;

Counter::Counter(string path): Counter(path,false){

}

Counter::Counter(string path , bool last_iter):path_to_file(path),last_iter_only(last_iter),fstreams_created(false){
//Make sure the given path is a folder
if (path_to_file[path_to_file.size()-1] != '/'){
path_to_file+="/";
}
}

/*
* By default the counter will be output in /tmp
* I hope you're using a UNIX based system
*/
Counter::Counter(): Counter("/tmp/") {
Counter::Counter(const string& path /* = "/tmp/"*/, bool last_iter /* = false*/):path_to_file(path),last_iter_only(last_iter),fstreams_created(false){
//Make sure the given path is a folder
if (path_to_file.back() != '/'){
path_to_file.push_back('/');
}
}

Counter::~Counter() {
Expand Down
4 changes: 1 addition & 3 deletions igor_src/Counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@
*/
class Counter {
public:
Counter();
Counter(std::string);
Counter(std::string , bool);
Counter(const std::string& path = "/tmp/", bool last_iter = false);
virtual ~Counter();

virtual std::string type() const =0;
Expand Down
Loading

0 comments on commit 39f0e05

Please sign in to comment.