[med-svn] [Git][med-team/kissplice][master] 2 commits: New upstream version 2.6.1
François Gindraud (@fgindraud)
gitlab at salsa.debian.org
Tue Apr 5 17:25:52 BST 2022
François Gindraud pushed to branch master at Debian Med / kissplice
Commits:
3f735526 by Francois Gindraud at 2022-04-05T18:22:47+02:00
New upstream version 2.6.1
- - - - -
11f7a88f by Francois Gindraud at 2022-04-05T18:22:47+02:00
Update upstream source from tag 'upstream/2.6.1'
Update to upstream version '2.6.1'
with Debian dir 00cb50ec6796c90104ed2f4986c0d639d7f540b3
- - - - -
22 changed files:
- CMakeLists.txt
- ChangeLog
- README.md
- kissplice.in.py
- − modules/CEdge.cpp
- modules/CEdge.h
- modules/CGraph.cpp
- modules/CGraph.h
- modules/CMakeLists.txt
- − modules/NEdge.cpp
- modules/NEdge.h
- modules/NGraph.cpp
- modules/NGraph.h
- − modules/NNode.cpp
- modules/NNode.h
- thirdparty/kissreads/src/Utils.cpp
- thirdparty/kissreads/src/commons.cpp
- thirdparty/kissreads/src/extension_algorithm.cpp
- thirdparty/kissreads/src/interface_libchash.cpp
- thirdparty/kissreads/src/kissReads.cpp
- thirdparty/kissreads/src/libchash.cpp
- thirdparty/kissreads/src/outputs.cpp
Changes:
=====================================
CMakeLists.txt
=====================================
@@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.1)
project(
kissplice
- VERSION 2.6.0 # Definition which is propagated through PROJECT_VERSION
+ VERSION 2.6.1 # Definition which is propagated through PROJECT_VERSION
LANGUAGES CXX
)
=====================================
ChangeLog
=====================================
@@ -1,3 +1,9 @@
+2022-04-05 Francois Gindraud <francois.gindraud at inria.fr>
+ * 2.6.0 -> 2.6.1
+ Bug fix:
+ - Option -s 1 works again. The last version for which it worked was 2.4.0-p1
+ - Various warning fixes in C++ code
+
2022-03-16 Audric Cologne <audric.cologne at univ-lyon1.fr>
* 2.5.5 -> 2.6.0
Major bug fixes:
@@ -6,24 +12,17 @@
kissreads update:
- Kissreads is now written with C++
CMake update
+ - conversion to "modern CMake" conventions: targets, proper scoping of CFLAGS, find_package for requirement detection.
+ - bcalm tool is now an external dependency by default. A locally compiled version can be used as a fallback (matching previous behavior).
+ - make install functionality has been restored. Previously broken due to bcalm submodule which installed bcalm in bin/.
+ - userguide is built instead of using a cached pdf. Can be disabled if no latex dsitribution is present. A CI-generated pdf available online is linked in the readme.
+ - release simplification: version number is propagated to userguide, manpage, kissplice.py frontend script.
+ - fixes to documentation.
New important release. Compared to 2.5.x, 2.6.x is:
- Faster to install
- Faster to run (parallelisation of kissreads)
- Using information of stranded reads in kissreads (--stranded parameter)
- Outputting information about read mapping on the de Bruijn Graph (--get-mapping-info)
- - Using an external version of bcalm if possible
- - Created with a pre-compiled pdf of the user guide
-
-
-TODO François Gindraud <francois.gindraud at inria.fr>
- * 2.5.5 -> TODO
- Build system improvements:
- -conversion to "modern CMake" conventions: targets, proper scoping of CFLAGS, find_package for requirement detection.
- -bcalm tool is now an external dependency by default. A locally compiled version can be used as a fallback (matching previous behavior).
- -make install functionality has been restored. Previously broken due to bcalm submodule which installed bcalm in bin/.
- -userguide is built instead of using a cached pdf. Can be disabled if no latex dsitribution is present. A CI-generated pdf available online is linked in the readme.
- -release simplification: version number is propagated to userguide, manpage, kissplice.py frontend script.
- -fixes to documentation.
2022-01-21 Audric Cologne <audric.cologne at univ-lyon1.fr>
* 2.5.4 -> 2.5.5
=====================================
README.md
=====================================
@@ -4,6 +4,12 @@ Main page: http://kissplice.prabi.fr/
[User guide](https://gitlab.inria.fr/erable/kissplice/-/jobs/artifacts/master/file/prefix/share/doc/kissplice/user_guide.pdf?job=check_install_and_user_guide) from latest build.
+# Docker
+
+You can find the latest version of KisSplice, KisSplice2RefGenome and KissDE [on Docker Hub](https://hub.docker.com/repository/docker/dwishsan/kissplice-pipeline).
+
+We also propose a [stand-alone Docker image for the KissDE Shiny App](https://hub.docker.com/repository/docker/dwishsan/kde-shiny) for KisSplice results exploration.
+
# Building:
Required:
=====================================
kissplice.in.py
=====================================
@@ -446,11 +446,11 @@ def eval_func_tuple(f_args):
def concatenate_graph_all_log_bcc_to_all_bcc_type0(workdir, kval, output_snps):
if output_snps==2: #concatenate all non-branching snps
- destinationSNPS = open(workdir+"/all_bcc_type0_"+str(kval), 'ab') ## THE UNIQUE FILE ALSO CONTAINS SNPS
- shutil.copyfileobj(open(workdir+"/bcc/graph_all_log_bcc", 'rb'), destinationSNPS)
+ destinationSNPS = open(workdir+"/all_bcc_type0_"+str(kval), 'a') ## THE UNIQUE FILE ALSO CONTAINS SNPS
+ shutil.copyfileobj(open(workdir+"/bcc/graph_all_log_bcc", 'r'), destinationSNPS)
destinationSNPS.close()
elif output_snps==1: #concatenate only non-branching Type-0a
- destinationSNPS = open(workdir+"/all_bcc_type0_"+str(kval), 'ab') ## THE UNIQUE FILE ALSO CONTAINS SNPS
+ destinationSNPS = open(workdir+"/all_bcc_type0_"+str(kval), 'a') ## THE UNIQUE FILE ALSO CONTAINS SNPS
#append the Type_0a bubbles to the destinationSNPS file
snpsFile = open(workdir+"/bcc/graph_all_log_bcc", 'r')
=====================================
modules/CEdge.cpp deleted
=====================================
@@ -1,138 +0,0 @@
-/* ***************************************************************************
- *
- * KisSplice
- * de-novo calling alternative splicing events from RNA-seq data.
- *
- * ***************************************************************************
- *
- * Copyright INRIA
- * contributors : Vincent Lacroix
- * Pierre Peterlongo
- * Gustavo Sacomoto
- * Vincent Miele
- * Alice Julien-Laferriere
- * David Parsons
- *
- * pierre.peterlongo at inria.fr
- * vincent.lacroix at univ-lyon1.fr
- *
- * This software is a computer program whose purpose is to detect alternative
- * splicing events from RNA-seq data.
- *
- * This software is governed by the CeCILL license under French law and
- * abiding by the rules of distribution of free software. You can use,
- * modify and/ or redistribute the software under the terms of the CeCILL
- * license as circulated by CEA, CNRS and INRIA at the following URL
- * "http://www.cecill.info".
-
- * As a counterpart to the access to the source code and rights to copy,
- * modify and redistribute granted by the license, users are provided only
- * with a limited warranty and the software's author, the holder of the
- * economic rights, and the successive licensors have only limited
- * liability.
-
- * In this respect, the user's attention is drawn to the risks associated
- * with loading, using, modifying and/or developing or reproducing the
- * software by the user in light of its specific status of free software,
- * that may mean that it is complicated to manipulate, and that also
- * therefore means that it is reserved for developers and experienced
- * professionals having in-depth computer knowledge. Users are therefore
- * encouraged to load and test the software's suitability as regards their
- * requirements in conditions enabling the security of their systems and/or
- * data to be ensured and, more generally, to use and operate it in the
- * same conditions as regards security.
- *
- * The fact that you are presently reading this means that you have had
- * knowledge of the CeCILL license and that you accept its terms.
- */
-
-
-
-
-
-// ===========================================================================
-// Include Libraries
-// ===========================================================================
-
-
-
-
-// ===========================================================================
-// Include Project Files
-// ===========================================================================
-#include "CEdge.h"
-
-
-
-
-// ===========================================================================
-// Declare Used Namespaces
-// ===========================================================================
-
-
-
-
-//############################################################################
-// #
-// Class CEdge #
-// #
-//############################################################################
-
-// ===========================================================================
-// Static attributes
-// ===========================================================================
-
-// ===========================================================================
-// Constructors
-// ===========================================================================
-CEdge::CEdge( void ) : _pair()
-{
-}
-
-CEdge::CEdge( const CEdge& model ) : _pair( model._pair )
-{
-}
-
-CEdge::CEdge( int f, int s ) : _pair( f, s )
-{
-}
-
-// ===========================================================================
-// Destructor
-// ===========================================================================
-
-// ===========================================================================
-// Operators
-// ===========================================================================
-bool CEdge::operator==( const CEdge& that ) const
-{
- return _pair == that._pair;
-}
-
-bool CEdge::operator!=( const CEdge& that ) const
-{
- return _pair != that._pair;
-}
-
-bool CEdge::operator<( const CEdge& that ) const
-{
- return _pair < that._pair;
-}
-
-// ===========================================================================
-// Public Methods
-// ===========================================================================
-CEdge& CEdge::swap_ends( void )
-{
- swap( _pair.first, _pair.second );
-
- return *this;
-}
-
-// ===========================================================================
-// Protected Methods
-// ===========================================================================
-
-// ===========================================================================
-// Non inline accessors
-// ===========================================================================
=====================================
modules/CEdge.h
=====================================
@@ -57,34 +57,17 @@
// ===========================================================================
// Include Libraries
// ===========================================================================
-#include <cstdio>
-#include <cstdlib>
#include <utility>
#include <algorithm>
-
-
// ===========================================================================
// Include Project Files
// ===========================================================================
-
-
-
// ===========================================================================
// Class declarations
// ===========================================================================
-
-
-
-// ===========================================================================
-// Declare Used Namespaces
-// ===========================================================================
-using namespace std;
-
-
-
//! Edge class
/*!
* \brief Class meant to be used by CGraph (compact graph) to represent edges.
@@ -92,7 +75,6 @@ using namespace std;
* It encapsulates a pair of int (u -> v edge), each int (u or v) being a node id
*/
-
class CEdge
{
public :
@@ -104,10 +86,10 @@ class CEdge
// =======================================================================
// Constructors
// =======================================================================
- CEdge( void );
- CEdge( const CEdge& model );
+ CEdge() = default;
+ CEdge( const CEdge& ) = default;
- CEdge( int f, int s );
+ CEdge( int f, int s ) : m_pair( f, s ) {}
// =======================================================================
// Destructor
@@ -116,8 +98,8 @@ class CEdge
// =======================================================================
// Accessors: getters
// =======================================================================
- inline int getFirst( void );
- inline int getSecond( void );
+ inline int getFirst() const { return m_pair.first; }
+ inline int getSecond() const { return m_pair.second; }
// =======================================================================
// Accessors: setters
@@ -126,23 +108,24 @@ class CEdge
// =======================================================================
// Operators
// =======================================================================
- bool operator==( const CEdge& that ) const;
- bool operator!=( const CEdge& that ) const;
- bool operator<( const CEdge& that ) const;
+ bool operator==( const CEdge& that ) const { return m_pair == that.m_pair; }
+ bool operator!=( const CEdge& that ) const { return m_pair != that.m_pair; }
+ bool operator<( const CEdge& that ) const { return m_pair < that.m_pair; }
// =======================================================================
// Public Methods
// =======================================================================
- CEdge& swap_ends( void );
+ CEdge& swap_ends() {
+ std::swap(m_pair.first, m_pair.second);
+ return *this;
+ }
// =======================================================================
// Public Attributes
// =======================================================================
-
-
protected :
- pair<int, int> _pair;
+ std::pair<int, int> m_pair;
// =======================================================================
// Forbidden Constructors
@@ -157,31 +140,4 @@ class CEdge
// =======================================================================
};
-
-// ===========================================================================
-// Getters' definitions
-// ===========================================================================
-inline int CEdge::getFirst( void )
-{
- return _pair.first;
-}
-
-inline int CEdge::getSecond( void )
-{
- return _pair.second;
-}
-
-// ===========================================================================
-// Setters' definitions
-// ===========================================================================
-
-// ===========================================================================
-// Inline Operators' definitions
-// ===========================================================================
-
-// ===========================================================================
-// Inline functions' definition
-// ===========================================================================
-
-
#endif // EDGE_H
=====================================
modules/CGraph.cpp
=====================================
@@ -112,13 +112,6 @@ CGraph::CGraph(int nbNodes, vector<LabelledCEdge>& allEdges, int kValue)
}
}
-
-// ===========================================================================
-// Destructors
-// ===========================================================================
-CGraph::~CGraph(void) {
-}
-
// ===========================================================================
// Public Methods
// ===========================================================================
=====================================
modules/CGraph.h
=====================================
@@ -112,12 +112,6 @@ class CGraph
*/
CGraph( int nbNodes, vector<LabelledCEdge> & allEdges, int kValue );
- // =======================================================================
- // Destructors
- // =======================================================================
- ~CGraph(void);
-
-
// =======================================================================
// Public Attributes
// =======================================================================
@@ -140,19 +134,8 @@ class CGraph
// Forbidden Constructors
// =======================================================================
- CGraph(const CGraph &model)
- {
- printf("%s:%d: error: call to forbidden constructor of CGraph.\n",
- __FILE__, __LINE__);
- exit(EXIT_FAILURE);
- };
-
- CGraph( void )
- {
- printf("%s:%d: error: call to forbidden constructor of CGraph.\n",
- __FILE__, __LINE__);
- exit(EXIT_FAILURE);
- };
+ CGraph(const CGraph &) = delete;
+ CGraph() = delete;
// =======================================================================
// Protected Methods
=====================================
modules/CMakeLists.txt
=====================================
@@ -1,16 +1,16 @@
-add_executable(ks_clean_duplicates CleanDuplicates.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp CEdge.cpp LabelledCEdge.cpp NNode.cpp NEdge.cpp Utils.cpp)
+add_executable(ks_clean_duplicates CleanDuplicates.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp LabelledCEdge.cpp Utils.cpp)
set_property(TARGET ks_clean_duplicates PROPERTY RUNTIME_OUTPUT_DIRECTORY "${BUILD_INTERNAL_BINDIR}")
install(TARGETS ks_clean_duplicates RUNTIME DESTINATION "${RELATIVE_INTERNAL_BINDIR}")
-add_executable(ks_bubble_enumeration BubbleEnumeration.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp CEdge.cpp LabelledCEdge.cpp NNode.cpp NEdge.cpp Utils.cpp)
+add_executable(ks_bubble_enumeration BubbleEnumeration.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp LabelledCEdge.cpp Utils.cpp)
set_property(TARGET ks_bubble_enumeration PROPERTY RUNTIME_OUTPUT_DIRECTORY "${BUILD_INTERNAL_BINDIR}")
install(TARGETS ks_bubble_enumeration RUNTIME DESTINATION "${RELATIVE_INTERNAL_BINDIR}")
-add_executable(ks_run_modules run.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp CEdge.cpp LabelledCEdge.cpp NNode.cpp NEdge.cpp SplitBcc.cpp Utils.cpp)
+add_executable(ks_run_modules run.cpp CycleCompression.cpp NGraph.cpp CGraph.cpp LabelledCEdge.cpp SplitBcc.cpp Utils.cpp)
set_property(TARGET ks_run_modules PROPERTY RUNTIME_OUTPUT_DIRECTORY "${BUILD_INTERNAL_BINDIR}")
install(TARGETS ks_run_modules RUNTIME DESTINATION "${RELATIVE_INTERNAL_BINDIR}")
-add_executable(ks_error_removal ErrorRemoval.cpp CEdge.cpp LabelledCEdge.cpp Utils.cpp)
+add_executable(ks_error_removal ErrorRemoval.cpp LabelledCEdge.cpp Utils.cpp)
set_property(TARGET ks_error_removal PROPERTY RUNTIME_OUTPUT_DIRECTORY "${BUILD_INTERNAL_BINDIR}")
install(TARGETS ks_error_removal RUNTIME DESTINATION "${RELATIVE_INTERNAL_BINDIR}")
=====================================
modules/NEdge.cpp deleted
=====================================
@@ -1,145 +0,0 @@
-/* ***************************************************************************
- *
- * KisSplice
- * de-novo calling alternative splicing events from RNA-seq data.
- *
- * ***************************************************************************
- *
- * Copyright INRIA
- * contributors : Vincent Lacroix
- * Pierre Peterlongo
- * Gustavo Sacomoto
- * Vincent Miele
- * Alice Julien-Laferriere
- * David Parsons
- *
- * pierre.peterlongo at inria.fr
- * vincent.lacroix at univ-lyon1.fr
- *
- * This software is a computer program whose purpose is to detect alternative
- * splicing events from RNA-seq data.
- *
- * This software is governed by the CeCILL license under French law and
- * abiding by the rules of distribution of free software. You can use,
- * modify and/ or redistribute the software under the terms of the CeCILL
- * license as circulated by CEA, CNRS and INRIA at the following URL
- * "http://www.cecill.info".
-
- * As a counterpart to the access to the source code and rights to copy,
- * modify and redistribute granted by the license, users are provided only
- * with a limited warranty and the software's author, the holder of the
- * economic rights, and the successive licensors have only limited
- * liability.
-
- * In this respect, the user's attention is drawn to the risks associated
- * with loading, using, modifying and/or developing or reproducing the
- * software by the user in light of its specific status of free software,
- * that may mean that it is complicated to manipulate, and that also
- * therefore means that it is reserved for developers and experienced
- * professionals having in-depth computer knowledge. Users are therefore
- * encouraged to load and test the software's suitability as regards their
- * requirements in conditions enabling the security of their systems and/or
- * data to be ensured and, more generally, to use and operate it in the
- * same conditions as regards security.
- *
- * The fact that you are presently reading this means that you have had
- * knowledge of the CeCILL license and that you accept its terms.
- */
-
-
-
-
-
-// ===========================================================================
-// Include Libraries
-// ===========================================================================
-
-
-
-// ===========================================================================
-// Include Project Files
-// ===========================================================================
-#include "NEdge.h"
-#include "NGraph.h"
-#include "Utils.h"
-
-
-
-// ===========================================================================
-// Declare Used Namespaces
-// ===========================================================================
-
-
-
-
-//############################################################################
-// #
-// Class NEdge #
-// #
-//############################################################################
-
-// ===========================================================================
-// Static attributes
-// ===========================================================================
-
-// ===========================================================================
-// Constructors
-// ===========================================================================
-NEdge::NEdge( const NEdge & model )
-{
- node = model.node;
- labels = model.labels;
-}
-
-NEdge::NEdge( int _node, string _labels )
-{
- node = _node;
- labels = _labels;
-}
-
-NEdge::NEdge( int _node, char label1, char label2 )
-{
- node = _node;
-
- char buf[3] = { label1, label2, '\0' };
- labels = string( buf );
-}
-
-
-// ===========================================================================
-// Destructors
-// ===========================================================================
-NEdge::~NEdge( void )
-{
-}
-
-
-// ===========================================================================
-// Operators
-// ===========================================================================
-
-// ===========================================================================
-// Public Methods
-// ===========================================================================
-void NEdge::add_label( string label )
-{
- labels += label;
-};
-
-void NEdge::del_all_but_first( void )
-{
- labels.erase( 2 );
-};
-
-void NEdge::revert_dir( int i )
-{
- labels[i] = reverse_dir(labels[i]);
-};
-
-// ===========================================================================
-// Protected Methods
-// ===========================================================================
-
-// ===========================================================================
-// Non inline accessors
-// ===========================================================================
=====================================
modules/NEdge.h
=====================================
@@ -61,28 +61,16 @@
#include <cstdlib>
#include <string>
-
-
-
// ===========================================================================
// Include Project Files
// ===========================================================================
-
-
-
-
-// ===========================================================================
-// Declare Used Namespaces
-// ===========================================================================
-using namespace std;
-
+#include "Utils.h"
/* The node class is used into the adjacency list of the NGraph object.
It keeps the whole information of the link between a node u and its outgoing
neighbours: the index of the node v and the label of the arc linking u to v.
*/
-
class NEdge
{
public :
@@ -94,27 +82,26 @@ class NEdge
// =======================================================================
// Constructors
// =======================================================================
- NEdge( const NEdge& model );
- NEdge( int node, string labels );
- NEdge( int node, char label1, char label2 );
-
- // =======================================================================
- // Destructors
- // =======================================================================
- ~NEdge( void );
+ NEdge() = delete;
+ NEdge( const NEdge& ) = default;
+ NEdge( int node, string labels ) : m_node(node), m_labels(std::move(labels)) {}
+ NEdge( int node, char label1, char label2 ) : m_node(node) {
+ char buf[3] = { label1, label2, '\0' };
+ m_labels = std::string( buf );
+ }
// =======================================================================
// Accessors: getters
// =======================================================================
- inline int get_node( void ) const;
- inline string get_labels( void ) const;
+ inline int get_node( void ) const { return m_node; }
+ inline string get_labels( void ) const { return m_labels; }
// =======================================================================
// Accessors: setters
// =======================================================================
- inline void set_node( int node );
- inline void set_labels( string labels );
+ inline void set_node( int node ) { m_node = node; }
+ inline void set_labels( string labels ) { m_labels = std::move(labels); }
// =======================================================================
@@ -124,28 +111,15 @@ class NEdge
// =======================================================================
// Public Methods
// =======================================================================
- void add_label( string label );
- void del_all_but_first( void );
- void revert_dir( int i );
+ void add_label( const string& label ) { m_labels += label; }
+ void del_all_but_first() { m_labels.erase( 2 ); }
+ void revert_dir( int i ) { m_labels[i] = reverse_dir(m_labels[i]); }
// =======================================================================
// Public Attributes
// =======================================================================
-
-
protected :
-
- // =======================================================================
- // Forbidden Constructors
- // =======================================================================
- NEdge( void )
- {
- printf( "%s:%d: error: call to forbidden constructor.\n", __FILE__, __LINE__ );
- exit( EXIT_FAILURE );
- };
-
-
// =======================================================================
// Protected Methods
// =======================================================================
@@ -154,48 +128,10 @@ class NEdge
// Protected Attributes
// =======================================================================
//! Index of the node
- int node;
+ int m_node;
//! Label of the incoming edge
- string labels;
+ string m_labels;
};
-
-// ===========================================================================
-// Getters' definitions
-// ===========================================================================
-int NEdge::get_node( void ) const
-{
- return node;
-};
-
-string NEdge::get_labels( void ) const
-{
- return labels;
-};
-
-
-// ===========================================================================
-// Setters' definitions
-// ===========================================================================
-void NEdge::set_node( int _node )
-{
- node = _node;
-};
-
-void NEdge::set_labels( string _labels )
-{
- labels = _labels;
-};
-
-
-// ===========================================================================
-// Inline Operators' definitions
-// ===========================================================================
-
-// ===========================================================================
-// Inline functions' definition
-// ===========================================================================
-
-
#endif // NEDGE_H
=====================================
modules/NGraph.cpp
=====================================
@@ -110,16 +110,6 @@ NGraph::NGraph( int kValue, int outputtedSnps )
}
-NGraph::NGraph( const NGraph &model )
-{
- _kValue = model._kValue;
- _nodes = model._nodes;
- _nbOutput = model._nbOutput;
- _nodeToStr = model._nodeToStr;
- _strToNode = model._strToNode;
-}
-
-
/*!
TODO : check : Create a NGraph for the BCC passed in edges ? all_edges ?
*/
@@ -147,14 +137,6 @@ NGraph::NGraph( CGraph& cgraph, vector<char *>& seqs,
}
-// ===========================================================================
-// Destructors
-// ===========================================================================
-NGraph::~NGraph(void)
-{
-}
-
-
// ===========================================================================
// Public Methods
// ===========================================================================
=====================================
modules/NGraph.h
=====================================
@@ -113,15 +113,9 @@ class NGraph
// Constructors
// =======================================================================
NGraph( int kValue, int outputtedSnps );
- NGraph( const NGraph & model );
+ NGraph( const NGraph & model ) = default;
NGraph( CGraph & g, vector<char*> & seqs, vector<LabelledCEdge> & all_edges, vector<CEdge> & edges );
-
-
- // =======================================================================
- // Destructors
- // =======================================================================
- ~NGraph( void );
-
+ ~NGraph() = default;
// =======================================================================
// Accessors: getters
@@ -132,7 +126,7 @@ class NGraph
inline const list<NEdge>& getAdjList( int node_id ) const;
inline const vector<NNode>& getNodes( void ) const;
inline int getNbNodes( void ) const;
- inline const int getNbOutput( void ) const;
+ inline int getNbOutput( void ) const;
int get_in_degree( int node, char dir ) const;
int get_out_degree( int node, char dir ) const;
@@ -231,11 +225,7 @@ class NGraph
// =======================================================================
// Forbidden Constructors
// =======================================================================
- NGraph( void )
- {
- printf( "%s:%d: error: call to forbidden constructor.\n", __FILE__, __LINE__ );
- exit( EXIT_FAILURE );
- };
+ NGraph() = delete;
// =======================================================================
// Protected Methods
@@ -291,7 +281,7 @@ int NGraph::getNbNodes( void ) const
return _nodes.size();
}
-const int NGraph::getNbOutput( void ) const
+int NGraph::getNbOutput( void ) const
{
return _nbOutput;
}
=====================================
modules/NNode.cpp deleted
=====================================
@@ -1,117 +0,0 @@
-/* ***************************************************************************
- *
-
- * KisSplice
- * de-novo calling alternative splicing events from RNA-seq data.
- *
- * ***************************************************************************
- *
- * Copyright INRIA
- * contributors : Vincent Lacroix
- * Pierre Peterlongo
- * Gustavo Sacomoto
- * Vincent Miele
- * Alice Julien-Laferriere
- * David Parsons
- *
- *
- *
- * pierre.peterlongo at inria.fr
- * vincent.lacroix at univ-lyon1.fr
- *
- * This software is a computer program whose purpose is to detect alternative
- * splicing events from RNA-seq data.
- *
- * This software is governed by the CeCILL license under French law and
- * abiding by the rules of distribution of free software. You can use,
- * modify and/ or redistribute the software under the terms of the CeCILL
- * license as circulated by CEA, CNRS and INRIA at the following URL
- * "http://www.cecill.info".
-
- * As a counterpart to the access to the source code and rights to copy,
- * modify and redistribute granted by the license, users are provided only
- * with a limited warranty and the software's author, the holder of the
- * economic rights, and the successive licensors have only limited
- * liability.
-
- * In this respect, the user's attention is drawn to the risks associated
- * with loading, using, modifying and/or developing or reproducing the
- * software by the user in light of its specific status of free software,
- * that may mean that it is complicated to manipulate, and that also
- * therefore means that it is reserved for developers and experienced
- * professionals having in-depth computer knowledge. Users are therefore
- * encouraged to load and test the software's suitability as regards their
- * requirements in conditions enabling the security of their systems and/or
- * data to be ensured and, more generally, to use and operate it in the
- * same conditions as regards security.
- *
- * The fact that you are presently reading this means that you have had
- * knowledge of the CeCILL license and that you accept its terms.
- */
-
-
-
-
-
-// ===========================================================================
-// Include Libraries
-// ===========================================================================
-
-
-
-
-// ===========================================================================
-// Include Project Files
-// ===========================================================================
-#include "NNode.h"
-
-
-
-
-// ===========================================================================
-// Declare Used Namespaces
-// ===========================================================================
-
-
-
-
-//############################################################################
-// #
-// Class NNode #
-// #
-//############################################################################
-
-// ===========================================================================
-// Static attributes
-// ===========================================================================
-
-// ===========================================================================
-// Constructors
-// ===========================================================================
-NNode::NNode( void ) : _adjList(), _sequence()
-{
-}
-
-// ===========================================================================
-// Destructors
-// ===========================================================================
-
-// ===========================================================================
-// Operators
-// ===========================================================================
-
-// ===========================================================================
-// Public Methods
-// ===========================================================================
-void NNode::add_to_adj_list( NEdge new_edge )
-{
- _adjList.push_back( new_edge );
-}
-
-// ===========================================================================
-// Protected Methods
-// ===========================================================================
-
-// ===========================================================================
-// Non inline accessors
-// ===========================================================================
=====================================
modules/NNode.h
=====================================
@@ -101,7 +101,7 @@ class NNode
// =======================================================================
// Constructors
// =======================================================================
- NNode( void );
+ NNode() = default;
// =======================================================================
// Destructors
@@ -126,7 +126,10 @@ class NNode
// =======================================================================
// Public Methods
// =======================================================================
- void add_to_adj_list( NEdge new_edge );
+ void add_to_adj_list( NEdge new_edge )
+ {
+ _adjList.push_back( new_edge );
+ }
// =======================================================================
// Public Attributes
@@ -136,21 +139,6 @@ class NNode
protected :
- // =======================================================================
- // Forbidden Constructors
- // =======================================================================
- //~ NNode( void )
- //~ {
- //~ printf( "%s:%d: error: call to forbidden constructor.\n", __FILE__, __LINE__ );
- //~ exit( EXIT_FAILURE );
- //~ };
- /*NNode( const NNode& model )
- {
- printf( "%s:%d: error: call to forbidden constructor.\n", __FILE__, __LINE__ );
- exit( EXIT_FAILURE );
- };*/
-
-
// =======================================================================
// Protected Methods
// =======================================================================
=====================================
thirdparty/kissreads/src/Utils.cpp
=====================================
@@ -3,8 +3,6 @@
#include <algorithm>
#include <iterator>
-using namespace std;
-
char complement(char n)
{
switch(n)
@@ -32,18 +30,18 @@ char complement(char n)
void reverse_complement(char *seq) {
//get the complement
- string seqAsStr(seq);
- transform(
+ std::string seqAsStr(seq);
+ std::transform(
seqAsStr.begin(),
seqAsStr.end(),
seqAsStr.begin(),
complement);
//reverse it
- string RC(seqAsStr.rbegin(), seqAsStr.rend());
+ std::string RC(seqAsStr.rbegin(), seqAsStr.rend());
//put it in seq
- for (int i=0; i<RC.size(); i++)
+ for (std::size_t i=0; i<RC.size(); i++)
seq[i]=RC[i];
}
=====================================
thirdparty/kissreads/src/commons.cpp
=====================================
@@ -346,7 +346,6 @@ int get_next_sequence_and_comments_for_fastq (gzFile file, char * sequence, char
int get_next_fasta_sequence(gzFile file, char * sequence, char * line) {
char *rv;
- char *p;
int nextchar = 0;
//char * line = malloc(sizeof(char)*1048576);
@@ -389,7 +388,6 @@ void removeDashNDashR(char * sequence) {
int get_next_sequence_for_fastq (gzFile file, char * sequence, char * quality, char * readid, char * qualityid){
char *rv, *qv;
- char *p;
//does not work if the sequence is written on several lines
//char * line = malloc(sizeof(char)*MAX_SIZE_LINE);
=====================================
thirdparty/kissreads/src/extension_algorithm.cpp
=====================================
@@ -99,7 +99,7 @@ void feed_coherent_positions(p_fragment_info the_starter, //the fragment/path
) {
int i, start_on_starter, stop_on_starter;
if(start<0) start_on_starter=0; else start_on_starter=start;
- if(start+length_read<strlen(the_starter->w)) stop_on_starter=start+length_read; else stop_on_starter=strlen(the_starter->w);
+ if(std::size_t(start+length_read)<strlen(the_starter->w)) stop_on_starter=start+length_read; else stop_on_starter=strlen(the_starter->w);
@@ -370,7 +370,7 @@ float read_coherence (gzFile reads_file,
uint64_t nb_seeds;
// working variables
- int read_len, i, ii, j, starter_id, pwi, stop, read_coherence;
+ int read_len, i, ii, starter_id, pwi, stop, read_coherence;
long int read_number=0;
// map of starter -> position (for each read and direction, stores the starter and position already tested.)
=====================================
thirdparty/kissreads/src/interface_libchash.cpp
=====================================
@@ -222,7 +222,7 @@ void hash_clear(hash_t map, void (*specific_free)(const void *)){
ssize_t hash_iterator_return_entry(hash_t map, hash_iter iter,
char **key, void **data){
assert(map != NULL);
- assert(iter >= 0);
+ //assert(iter >= 0);
assert(key != NULL);
assert(data != NULL);
//if ((int)iter != -1 && !hash_iterator_is_end(map, iter))
=====================================
thirdparty/kissreads/src/kissReads.cpp
=====================================
@@ -62,7 +62,7 @@ using namespace std;
#include <omp.h>
#endif
-char * getVersion(){
+const char * getVersion(){
return "kissreads module 1.2.6 - Copyright INRIA - CeCILL License";
}
@@ -200,9 +200,9 @@ int main(int argc, char **argv) {
number_of_read_sets=0;
while(number_of_read_sets+2<argc && argv[number_of_read_sets+2][0]!='-') number_of_read_sets++;
char ** reads_file_names = (char **) malloc(sizeof(char *)*number_of_read_sets);
- char * coherent_file_name="";
- char * uncoherent_file_name="";
- char * samout_file_name="";
+ const char * coherent_file_name="";
+ const char * uncoherent_file_name="";
+ const char * samout_file_name="";
// copy the read set file names
number_of_read_sets=0;
while(number_of_read_sets+2<argc && argv[number_of_read_sets+2][0]!='-'){
@@ -641,10 +641,10 @@ int main(int argc, char **argv) {
explanations << "Bubble (" << all_starters[upperPathIndex]->comment << ", " <<
all_starters[lowerPathIndex]->comment << ") " <<
"is strand-uncoherent because the following LEFT read files: [";
- for (int i = 0; i < leftReadFilesAgreedOnFW.size(); i++)
+ for (std::size_t i = 0; i < leftReadFilesAgreedOnFW.size(); i++)
explanations << leftReadFilesAgreedOnFW[i] << ", ";
explanations << "] say that the reads map on the + strand while the following LEFT read files: [";
- for (int i = 0; i < leftReadFilesAgreedOnRC.size(); i++)
+ for (std::size_t i = 0; i < leftReadFilesAgreedOnRC.size(); i++)
explanations << leftReadFilesAgreedOnRC[i] << ", ";
explanations << "] say that the reads map on the - strand" << endl;
keepGoing = 0;
@@ -661,10 +661,10 @@ int main(int argc, char **argv) {
explanations << "Bubble (" << all_starters[upperPathIndex]->comment << ", " <<
all_starters[lowerPathIndex]->comment << ") " <<
"is strand-uncoherent because the following RIGHT read files: [";
- for (int i = 0; i < rightReadFilesAgreedOnFW.size(); i++)
+ for (std::size_t i = 0; i < rightReadFilesAgreedOnFW.size(); i++)
explanations << rightReadFilesAgreedOnFW[i] << ", ";
explanations << "] say that the reads map on the + strand while the following RIGHT read files: [";
- for (int i = 0; i < rightReadFilesAgreedOnRC.size(); i++)
+ for (std::size_t i = 0; i < rightReadFilesAgreedOnRC.size(); i++)
explanations << rightReadFilesAgreedOnRC[i] << ", ";
explanations << "] say that the reads map on the - strand" << endl;
keepGoing = 0;
=====================================
thirdparty/kissreads/src/libchash.cpp
=====================================
@@ -161,13 +161,13 @@ char grgKeyTruncMask[sizeof(ulong)][sizeof(ulong)];
} \
while ( 0 )
-#define FREE_KEY(ht, key) do \
- if ( STORES_PTR(ht) && (ht)->fSaveKeys ) \
- if ( (ht)->cchKey == NULL_TERMINATED ) \
+#define FREE_KEY(ht, key) do { \
+ if ( STORES_PTR(ht) && (ht)->fSaveKeys ) { \
+ if ( (ht)->cchKey == NULL_TERMINATED ) { \
HTfree((char *)(key), WORD_ROUND(strlen((char *)(key))+1)); \
- else \
- HTfree((char *)(key), WORD_ROUND((ht)->cchKey)); \
- while ( 0 )
+ } else { \
+ HTfree((char *)(key), WORD_ROUND((ht)->cchKey)); } \
+ }} while ( 0 )
/* the following are useful for bitmaps */
/* Format is like this (if 1 word = 4 bits): 3210 7654 ba98 fedc ... */
@@ -314,10 +314,8 @@ unsigned long HTcopy(char *ul)
static void HTSetupKeyTrunc(void)
{
- int i, j;
-
- for ( i = 0; i < sizeof(unsigned long); i++ )
- for ( j = 0; j < sizeof(unsigned long); j++ )
+ for (size_t i = 0; i < sizeof(unsigned long); i++ )
+ for (size_t j = 0; j < sizeof(unsigned long); j++ )
grgKeyTruncMask[i][j] = j < i ? 255 : 0; /* chars have 8 bits */
}
@@ -399,7 +397,7 @@ static HTOffset EntriesUpto(HTBitmapPart *bm, int i)
4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8};
if ( i == 0 ) return 0;
- for ( ; i > sizeof(*bm)*8; i -= sizeof(*bm)*8, bm++ )
+ for ( ; i > int(sizeof(*bm)*8); i -= sizeof(*bm)*8, bm++ )
{ /* think of it as loop unrolling */
#if LOG_WORD_SIZE >= 3 /* 1 byte per word, or more */
retval += rgcBits[*bm & 255]; /* get the low byte */
@@ -465,7 +463,7 @@ static HTOffset EntriesUpto(HTBitmapPart *bm, int i)
#endif /* 2 bytes */
#endif /* 1 byte */
}
- assert("" == "word size is too big in EntriesUpto()");
+ assert("word size is too big in EntriesUpto()" == nullptr);
return -1;
}
#define SPARSE_POS_TO_OFFSET(bm, i) ( EntriesUpto(&((bm)[0]), i) )
@@ -647,151 +645,6 @@ static ulong SparseMemory(ulong cBuckets, ulong cOccupied)
SPARSE_GROUPS(cBuckets) * sizeof(SparseBin) );
}
-
-/* Just for fun, I also provide support for dense tables. These are
- * just regulr arrays. Access is fast, but they can get big.
- * Use Table(x) at the top of chash.h to decide which you want.
- * A disadvantage is we need to steal more of the data space for
- * indicating empty buckets. We choose -3.
- */
-
-#ifndef DenseBucket /* by default, each bucket holds an HTItem */
-#define DenseBucket HTItem
-#endif
-
-typedef struct DenseBin { /* needs to be a struct for C typing reasons */
- DenseBucket *rgBuckets; /* A bin is an array of buckets */
-} DenseBin;
-
-typedef struct DenseIterator {
- long pos; /* the actual iterator */
- DenseBin *bin; /* state info, to avoid args for NextBucket() */
- ulong cBuckets;
-} DenseIterator;
-
-#define DENSE_IS_EMPTY(bin, i) ( (bin)[i].data == EMPTY )
-#define DENSE_SET_EMPTY(bin, i) (bin)[i].data = EMPTY /* fks-hash.h */
-#define DENSE_SET_OCCUPIED(bin, i) (bin)[i].data = 1 /* not EMPTY */
-
-static void DenseClear(DenseBin *bin, ulong cBuckets)
-{
- while ( cBuckets-- )
- DENSE_SET_EMPTY(bin->rgBuckets, cBuckets);
-}
-
-static ulong DenseAllocate(DenseBin **pbin, ulong cBuckets)
-{
- *pbin = (DenseBin *) HTsmalloc(sizeof(*pbin));
- (*pbin)->rgBuckets = (DenseBucket *) HTsmalloc(sizeof(*(*pbin)->rgBuckets)
- * cBuckets);
- DenseClear(*pbin, cBuckets);
- return cBuckets;
-}
-
-static DenseBin *DenseFree(DenseBin *bin, ulong cBuckets)
-{
- HTfree(bin->rgBuckets, sizeof(*bin->rgBuckets) * cBuckets);
- HTfree(bin, sizeof(*bin));
- return NULL;
-}
-
-static int DenseIsEmpty(DenseBin *bin, ulong location)
-{
- return DENSE_IS_EMPTY(bin->rgBuckets, location);
-}
-
-static DenseBucket *DenseFind(DenseBin *bin, ulong location)
-{
- if ( DenseIsEmpty(bin, location) )
- return NULL;
- return bin->rgBuckets + location;
-}
-
-static DenseBucket *DenseInsert(DenseBin *bin, DenseBucket *bckInsert,
- ulong location, int *pfOverwrite)
-{
- DenseBucket *bckPlace;
-
- bckPlace = DenseFind(bin, location);
- if ( bckPlace ) /* means something is already there */
- {
- if ( *pfOverwrite )
- *bckPlace = *bckInsert;
- *pfOverwrite = 1; /* set to 1 to indicate someone was there */
- return bckPlace;
- }
- else
- {
- bin->rgBuckets[location] = *bckInsert;
- *pfOverwrite = 0;
- return bin->rgBuckets + location;
- }
-}
-
-static DenseBucket *DenseNextBucket(DenseIterator *iter)
-{
- for ( iter->pos++; iter->pos < iter->cBuckets; iter->pos++ )
- if ( !DenseIsEmpty(iter->bin, iter->pos) )
- return iter->bin->rgBuckets + iter->pos;
- return NULL; /* all remaining groups were empty */
-}
-
-static DenseBucket *DenseFirstBucket(DenseIterator *iter,
- DenseBin *bin, ulong cBuckets)
-{
- iter->bin = bin; /* set it up for NextBucket() */
- iter->cBuckets = cBuckets;
- iter->pos = -1; /* thus the next bucket will be 0 */
- return DenseNextBucket(iter);
-}
-
-static void DenseWrite(FILE *fp, DenseBin *bin, ulong cBuckets)
-{
- ulong pos = 0, bit, bm;
-
- WRITE_UL(fp, cBuckets);
- while ( pos < cBuckets )
- {
- bm = 0;
- for ( bit = 0; bit < 8*sizeof(ulong); bit++ )
- {
- if ( !DenseIsEmpty(bin, pos) )
- SET_BITMAP(&bm, bit); /* in fks-hash.h */
- if ( ++pos == cBuckets )
- break;
- }
- WRITE_UL(fp, bm);
- }
-}
-
-static ulong DenseRead(FILE *fp, DenseBin **pbin)
-{
- ulong pos = 0, bit, bm, cBuckets;
-
- READ_UL(fp, cBuckets);
- cBuckets = DenseAllocate(pbin, cBuckets);
- while ( pos < cBuckets )
- {
- READ_UL(fp, bm);
- for ( bit = 0; bit < 8*sizeof(ulong); bit++ )
- {
- if ( TEST_BITMAP(&bm, bit) ) /* in fks-hash.h */
- DENSE_SET_OCCUPIED((*pbin)->rgBuckets, pos);
- else
- DENSE_SET_EMPTY((*pbin)->rgBuckets, pos);
- if ( ++pos == cBuckets )
- break;
- }
- }
- return cBuckets;
-}
-
-static ulong DenseMemory(ulong cBuckets, ulong cOccupied)
-{
- return cBuckets * sizeof(DenseBucket);
-}
-
-
/* ======================================================================== */
/* HASHING ROUTINES */
/* ---------------------- */
@@ -1284,10 +1137,11 @@ HTItem *HashFirstBucket(HashTable *ht)
{
HTItem *retval;
- for ( retval = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets);
- retval; retval = Table(NextBucket)(ht->iter) )
- if ( !IS_BCK_DELETED(retval) )
- LOAD_AND_RETURN(ht, retval);
+ for ( retval = Table(FirstBucket)(ht->iter, ht->table, ht->cBuckets); retval; retval = Table(NextBucket)(ht->iter) ) {
+ if ( !IS_BCK_DELETED(retval) ) {
+ LOAD_AND_RETURN(ht, retval);
+ }
+ }
return NULL;
}
@@ -1295,9 +1149,11 @@ HTItem *HashNextBucket(HashTable *ht)
{
HTItem *retval;
- while ( (retval=Table(NextBucket)(ht->iter)) )
- if ( !IS_BCK_DELETED(retval) )
- LOAD_AND_RETURN(ht, retval);
+ while ( (retval=Table(NextBucket)(ht->iter)) ) {
+ if ( !IS_BCK_DELETED(retval) ) {
+ LOAD_AND_RETURN(ht, retval);
+ }
+ }
return NULL;
}
@@ -1428,14 +1284,15 @@ static HashTable *HashDoLoad(FILE *fp, char * (*dataRead)(FILE *, int),
READ_UL(fp, bck->data); /* all we need if dataRead is NULL */
if ( IS_BCK_DELETED(bck) ) /* always 0 if defined(INSERT_ONLY) */
continue; /* this is why we read the data first */
- if ( dataRead != NULL ) /* if it's null, we're done */
- if ( !ht->fpData ) /* load data into memory */
+ if ( dataRead != NULL ) { /* if it's null, we're done */
+ if ( !ht->fpData ) { /* load data into memory */
bck->data = (ulong)dataRead(fp, bck->data);
- else /* store location of data on disk */
+ }else /* store location of data on disk */
{
fseek(fp, bck->data, SEEK_CUR); /* bck->data held size of data */
bck->data = ftell(fp) - bck->data - sizeof(unsigned long);
}
+ }
if ( ht->cchKey == NULL_TERMINATED ) /* now read the key */
{
=====================================
thirdparty/kissreads/src/outputs.cpp
=====================================
@@ -212,7 +212,7 @@ float rank_phi(const int *sum_up, const int *sum_lo, const int number_of_read_se
/**
* prints a couple using the reads starting position instead of coverage per position
*/
-void print_couple_i(char * comment, FILE* out, const p_fragment_info * results_against_set, int cycle_id, int number_of_read_sets, int qual, const char map_snps, bool checkStrands)
+void print_couple_i(const char * comment, FILE* out, const p_fragment_info * results_against_set, int cycle_id, int number_of_read_sets, int qual, const char map_snps, bool checkStrands)
{
int read_set_id;
@@ -400,7 +400,7 @@ void print_couple_i(char * comment, FILE* out, const p_fragment_info * results_a
/**
* prints a couple using the reads starting position instead of coverage per position
*/
-void print_couple_i(char * comment, FILE* out, const p_fragment_info * results_against_set, int cycle_id, int number_of_read_sets, int qual, const char map_snps, bool checkStrands){
+void print_couple_i(const char * comment, FILE* out, const p_fragment_info * results_against_set, int cycle_id, int number_of_read_sets, int qual, const char map_snps, bool checkStrands){
//TODO: warning bool checkStrands is not used here, just in the upper print_couple_i
View it on GitLab: https://salsa.debian.org/med-team/kissplice/-/compare/25bb6b8b3a269173f4a6a491db5a753fd86a97a7...11f7a88fcd7e91c42ceec86338c386138467bbc7
--
View it on GitLab: https://salsa.debian.org/med-team/kissplice/-/compare/25bb6b8b3a269173f4a6a491db5a753fd86a97a7...11f7a88fcd7e91c42ceec86338c386138467bbc7
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20220405/7e0f5db3/attachment-0001.htm>
More information about the debian-med-commit
mailing list