background, see [[run splicedice on SUGP1 KD signature with splicedice]] for splicedice steps through “pairwise”

raksha called these “reference” SRR12801019 SRR12801023

she called these “sample” SRR12801020 SRR12801024

connect to server

log into prism vpn ssh ubuntu@10.50.100.135

cd /mnt/code/dennisrm_splicedice
git clone https://github.com/dennisrm/splicedice.git
sig=/mnt/code/dennisrm_splicedice/splicedice/code/signature.py
cd /mnt/code/rakshya_RBPSig
git clone https://github.com/codewithrakshya/RBPSig
cd /mnt/code/rakshya_RBPSig/RBPSig
python ./filter_data.py --output-prefix /mnt/output/splicedice_2024.12.19_23.40.49/

iterating

python3 ./filter_data.py --output-prefix /mnt/output/splicedice_2024.12.19_23.40.49/
pip3 install pandas
sudo apt install python3-pandas
sudo apt install python3-argparse
python3 ./filter_data.py --output-prefix /mnt/output/splicedice_2024.12.19_23.40.49/

python3 ./filter_data.hcb.py --output-prefix /mnt/output/splicedice_2024.12.19_23.40.49/

errors addressed

Traceback (most recent call last):
  File "/mnt/code/rakshya_RBPSig/RBPSig/./filter_data.py", line 10, in <module>
    import pandas as pd
ModuleNotFoundError: No module named 'pandas'

ubuntu@hbeale-mesa:/mnt/code/rakshya_RBPSig/RBPSig$ pip3 install pandas
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.

 cp ./filter_data.py ./filter_data.hcb.py
nano ./filter_data.hcb.py
# changed _pairwiseFisherResults.tsv to pairwise.tsv

copied ./filter_data.py to ./filter_data.hcb.py changed pairwiseFisher to pairwise

ran without error:

ubuntu@hbeale-mesa:/mnt/code/rakshya_RBPSig/RBPSig$ python3 ./filter_data.hcb.py --output-prefix /mnt/output/splicedice_2024.12.19_23.40.49/
Filtered data saved to /mnt/output/splicedice_2024.12.19_23.40.49/_filteredPairwiseResults.tsv
Filtered _allPS data saved to /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv

signature.py

attempt 1

cd /mnt/output/splicedice_2024.12.19_23.40.49
python3 /mnt/code/dennisrm_splicedice/splicedice/code/signature.py \
fit_beta \
-x significance_threshold=0.05 \
-p /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv \
-n 10 \
-m  /mnt/output/splicedice_2024.12.19_23.40.49/_manifest.txt \
-o test

ModuleNotFoundError: No module named 'statsmodels'
sudo apt install python3-statsmodels

consider also numpy scipy.stats

tools warnings config

attempt 2

cd /mnt/output/splicedice_2024.12.19_23.40.49
python3 /mnt/code/dennisrm_splicedice/splicedice/code/signature.py \
fit_beta \
-x significance_threshold=0.05 \
-p /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv \
-n 10 \
-m  /mnt/output/splicedice_2024.12.19_23.40.49/_manifest.txt \
-o test

error when no sig intervals

ubuntu@hbeale-mesa:/mnt/output/splicedice_2024.12.19_23.40.49$ python3 /mnt/code/dennisrm_splicedice/splicedice/code/signature.py fit_beta -x significance_threshold=0.05 -p /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv -n 10 -m  /mnt/output/splicedice_2024.12.19_23.40.49/_manifest.txt -o test
significance_threshold=0.05
try
Testing for differential splicing...
Groups: /mnt/output/splicedice_2024.12.19_23.40.49/_junction_beds/SRR12801019_Aligned.sortedByCoord.out.junc.bed (1), /mnt/output/splicedice_2024.12.19_23.40.49/_junction_beds/SRR12801020_Aligned.sortedByCoord.out.junc.bed (1), /mnt/output/splicedice_2024.12.19_23.40.49/_junction_beds/SRR12801023_Aligned.sortedByCoord.out.junc.bed (1), /mnt/output/splicedice_2024.12.19_23.40.49/_junction_beds/SRR12801024_Aligned.sortedByCoord.out.junc.bed (1)
Fitting beta distributions...
Traceback (most recent call last):
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 425, in <module>
    main()
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 87, in main
    beta_stats = manifest.fit_betas(ps_table,compare_stats)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 328, in fit_betas
    interval_set = self.significant_intervals(compare_stats)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 303, in significant_intervals
    for i in range(m): # error when no sig intervals
                   ^
UnboundLocalError: cannot access local variable 'm' where it is not associated with a value
ubuntu@hbeale-mesa:/mnt/output/splicedice_2024.12.19_23.40.49$ 

review input

/mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv - looks fine; there are differences

16:16317777-16317895:+  0.726   0.432   0.736   0.408
16:16317777-16318922:+  0.024   0.145   0.011   0.16
16:16317777-16358956:+  0.0     0.003   0.0     0.003

fix manifest

i think the problem is the manifest. it should be a new one something like this SRR12801019 Reference SRR12801023 Reference SRR12801020 Sample SRR12801024 Sample

 help="TSV file with list of samples (first column) and group labels (second column).")  

A19 A20 A23 A24

cd /mnt/output/splicedice_2024.12.19_23.40.49
cp /mnt/code/rakshya_RBPSig/RBPSig/manifest.txt signature_manifest.txt
nano signature_manifest.txt

A19 control
A23 control
A20 SUGP1_knockdown A24 SUGP1_knockdown

attempt 3

cd /mnt/output/splicedice_2024.12.19_23.40.49
python3 /mnt/code/dennisrm_splicedice/splicedice/code/signature.py \
fit_beta \
-x significance_threshold=0.05 \
-p /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv \
-n 10 \
-m  /mnt/output/splicedice_2024.12.19_23.40.49/signature_manifest.txt \
-o test

ubuntu@hbeale-mesa:/mnt/output/splicedice_2024.12.19_23.40.49$ cd /mnt/output/splicedice_2024.12.19_23.40.49
python3 /mnt/code/dennisrm_splicedice/splicedice/code/signature.py \
fit_beta \
-x significance_threshold=0.05 \
-p /mnt/output/splicedice_2024.12.19_23.40.49/_filteredAllPS.tsv \
-n 10 \
-m  /mnt/output/splicedice_2024.12.19_23.40.49/signature_manifest.txt \
-o test
significance_threshold=0.05
try
Testing for differential splicing...
Groups: control (2), SUGP1_knockdown (2)
Fitting beta distributions...
Traceback (most recent call last):
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 425, in <module>
    main()
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 87, in main
    beta_stats = manifest.fit_betas(ps_table,compare_stats)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 328, in fit_betas
    interval_set = self.significant_intervals(compare_stats)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/code/dennisrm_splicedice/splicedice/code/signature.py", line 303, in significant_intervals
    for i in range(m): # error when no sig intervals
                   ^
UnboundLocalError: cannot access local variable 'm' where it is not associated with a value
ubuntu@hbeale-mesa:/mnt/output/splicedice_2024.12.19_23.40.49$ 


<
Previous Post
A Moment on the Wonen’s Rugby Bandwagon
>
Blog Archive
Archive of all previous blog posts