Skip to content

Commit 0c332cf

Browse files
committed
fix selection of control data
1 parent 16fc4b6 commit 0c332cf

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
# [0.2.5]
9+
10+
# Fix
11+
- Fixed a variable shadowing issue in path handling that prevented the control path from being properly set. The inner declaration of ctrlsPath inside the
12+
conditional block was creating a local variable instead of modifying the outer one, causing the control path to remain empty regardless of input parameters.
13+
814
# [0.2.4]
915

1016
# Fix

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![docker-release](https://github.com/Ibvt/RNAnue/actions/workflows/docker.yml/badge.svg)](https://github.com/Ibvt/RNAnue/actions/workflows/docker.yml)
22

3-
# RNAnue - 0.2.4
3+
# RNAnue - 0.2.5
44

55
## About
66
RNAnue is a comprehensive analysis to detect RNA-RNA interactions from Direct-Duplex-Detection (DDD) data.

src/Data.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ void Data::alignDataPrep() {
4848
if(params["preproc"].as<std::bitset<1>>() == std::bitset<1>("1")) {
4949
fs::path ctrlsPath = "";
5050
if(params["ctrls"].as<std::string>() != "") {
51-
fs::path ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "preproc/ctrls";
51+
ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "preproc/ctrls";
5252
}
5353
fs::path trtmsPath = fs::path(params["outdir"].as<std::string>()) / "preproc/trtms";
5454

@@ -65,7 +65,7 @@ void Data::alignDataPrep() {
6565
void Data::detectDataPrep() {
6666
fs::path ctrlsPath = "";
6767
if(params["ctrls"].as<std::string>() != "") {
68-
fs::path ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "align/ctrls";
68+
ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "align/ctrls";
6969
}
7070
fs::path trtmsPath = fs::path(params["outdir"].as<std::string>()) / "align/trtms";
7171

@@ -76,7 +76,7 @@ void Data::detectDataPrep() {
7676
void Data::clusteringDataPrep() {
7777
fs::path ctrlsPath = "";
7878
if(params["ctrls"].as<std::string>() != "") {
79-
fs::path ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "detect/ctrls";
79+
ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "detect/ctrls";
8080
}
8181
fs::path trtmsPath = fs::path(params["outdir"].as<std::string>()) / "detect/trtms";
8282

@@ -87,7 +87,7 @@ void Data::clusteringDataPrep() {
8787
void Data::analysisDataPrep() {
8888
fs::path ctrlsPath = "";
8989
if(params["ctrls"].as<std::string>() != "") {
90-
fs::path ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "detect/ctrls";
90+
ctrlsPath = fs::path(params["outdir"].as<std::string>()) / "detect/ctrls";
9191
}
9292
fs::path trtmsPath = fs::path(params["outdir"].as<std::string>()) / "detect/trtms";
9393

0 commit comments

Comments
 (0)