Skip to content

Commit

Permalink
ReportLimma wo gui
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Barrero Rodríguez committed Oct 27, 2023
1 parent dc3fcb4 commit 3b528b9
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 4 deletions.
23 changes: 23 additions & 0 deletions 2_ReportLimma_wo_GUI/ReportLimma.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@echo off

rem Initialize the variable for the argument
set "config="

rem Check if an argument was provided
if not "%~1"=="" (
set "config=%~1"
echo Configuration file path: %~1
) else (
echo Configuration file was not provided.
exit /b 1
)

for %%I in ("%~dp0") do set "base_path=%%~fI"

set "Rexe_relative=R-Portable\App\R-Portable\bin\x64\Rscript.exe"
set "Rexe_path=%base_path%%Rexe_relative%"
set "Rscript=%base_path%R-Portable/app_wo_GUI.R"

echo Executing command: "%Rexe_path%" "--vanilla %Rscript% %config%"

"%Rexe_path%" "--vanilla %Rscript% %config%"
26 changes: 26 additions & 0 deletions 2_ReportLimma_wo_GUI/limma_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@

report_infile: D:\ReportAnalysis\2_ReportLimma_wo_GUI\test\test1\NM_qfq_table_pgmfreq.tsv

sample_table: D:\ReportAnalysis\2_ReportLimma_wo_GUI\limma_sample_table.tsv

outfile: D:\ReportAnalysis\2_ReportLimma_wo_GUI\test\test1\LIMMA_NM_qfq_table_pgmfreq.tsv

# Possible types
# - limma
# - limma_with_duplicates
# - t-test
test_type:
- limma
- limma_with_duplicates
- t-test

integrations:
- Z_pgm2p
- Z_pgm2p_dNM
- Z_p2qf
- Z_qf2qfq
- Z_qfq2qfqall

hypothesis_testing:
- [ H, C ]
- [ Control, Heteroplasmy ]
5 changes: 5 additions & 0 deletions 2_ReportLimma_wo_GUI/limma_sample_table.tsv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
C H Control Heteroplasmy
C1 H1 C1 H1
C2 H2 C2 H2
C3 H3 C3 H3
H4 H4
6 changes: 3 additions & 3 deletions 3_FDRoptimizer/FDRoptimizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,14 @@ def main(config, file=None):

logging.info(f'Maximum number of significant elements {ymax} at scan frequency {xmax}')

if config['AddFDR']:
if config['AddFDR'] and thr==max(config['FDR_Thr']):

boolean = tmp.loc[:, scCol]>=xmax

tmp = tmp.join(
pd.DataFrame({
(f'{pvCol[0]}', f'qvalue_{thr}'): multipletests(tmp.loc[boolean, pvCol], method='fdr_bh')[1]
#(f'{pvCol[0]}', f'qvalue'): multipletests(tmp.loc[boolean, pvCol], method='fdr_bh')[1]
#(f'{pvCol[0]}', f'qvalue_{thr}'): multipletests(tmp.loc[boolean, pvCol], method='fdr_bh')[1]
(f'{pvCol[0]}', f'qvalue'): multipletests(tmp.loc[boolean, pvCol], method='fdr_bh')[1]
}, index=tmp.index[boolean]), how='left'
)

Expand Down
2 changes: 1 addition & 1 deletion build.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os

# Lista de nombres de las carpetas que quieres comprimir
carpetas = ['1_NMpyCompare', '2_ReportLimma-browser', '3_FDRoptimizer', '4_qTableReport']
carpetas = ['1_NMpyCompare', '2_ReportLimma_wo_GUI', '3_FDRoptimizer', '4_qTableReport']

exclude = ["\\test", "\\__pycache__"]

Expand Down

0 comments on commit 3b528b9

Please sign in to comment.