Skip to content

Commit

Permalink
Merge pull request #563 from gagneurlab/external_bam
Browse files Browse the repository at this point in the history
Minor changes and bug fixes
  • Loading branch information
AtaJadidAhari committed Aug 7, 2024
2 parents bdddf24 + 0d22836 commit d850645
Show file tree
Hide file tree
Showing 6 changed files with 47 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.12"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/conf.py
fail_on_warning: true

# Optionally build your docs in additional formats such as PDF and ePub
formats:
- pdf
- epub

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Detection of RNA Outlier Pipeline
[![DROP pipeline status](https://github.com/gagneurlab/drop/workflows/Build/badge.svg?branch=master)](https://github.com/gagneurlab/drop/actions?query=workflow%3ABuild)
[![DROP pipeline status](https://github.com/gagneurlab/drop/workflows/Build/badge.svg)](https://github.com/gagneurlab/drop/actions?query=workflow%3ABuild)
[![Version](https://img.shields.io/github/v/release/gagneurlab/drop?include_prereleases)](https://github.com/gagneurlab/drop/releases)
[![Version](https://readthedocs.org/projects/gagneurlab-drop/badge/?version=latest)](https://gagneurlab-drop.readthedocs.io/en/latest)

Expand Down
4 changes: 0 additions & 4 deletions drop/config/SampleAnnotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ def parse(self, sep='\t'):

annotationTable = pd.read_csv(self.file, sep=sep, index_col=False)

# FRASER cannot handle a mixture of stranded and unstranded samples, raise error in such cases
if (annotationTable['STRAND'] == 'no').any() & ((annotationTable['STRAND'] == 'reverse').any() | (annotationTable['STRAND'] == 'yes').any()):
raise ValueError("Data contains a mix of stranded and unstranded samples. Please analyze them separately.\n")

if annotationTable['STRAND'].isnull().values.any():
raise ValueError("STRAND is not provided for some samples. All samples should have STRAND value in the sample annotation file.\n")

Expand Down
2 changes: 2 additions & 0 deletions drop/config/SampleParams.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import shutil


pd.set_option("future.no_silent_downcasting", True)


class ParamHelper:
def __init__(self,include,sampleAnnotationColumns,group,path):
Expand Down
17 changes: 15 additions & 2 deletions drop/config/submodules/AberrantSplicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ def __init__(self, config, sampleAnnotation, processedDataDir, processedResultsD
if len(set(self.rnaIDs[g]) & set(self.rnaExIDs[g])) > 0:
raise ValueError(f"{set(self.rnaIDs[g]) & set(self.extRnaIDs[g])} has both BAM and external count file \
please fix in sample annotation table to only have either external count or BAM processing\n")

all_ids = self.sampleAnnotation.subsetGroups(self.groups, assay=["RNA", "SPLICE_COUNT"])
self.checkSubset(all_ids)

self.checkStrandSpecificity()

def setDefaultKeys(self, dict_):
super().setDefaultKeys(dict_)
setKey = utils.setKey
Expand Down Expand Up @@ -109,3 +110,15 @@ def getPsiTypeAssay(self):
if(fraser_version == "FRASER2"):
return "jaccard"
return "theta"