Skip to content

Commit ae15f57

Browse files
committed
Changed splice junction evidence decision tree
Hierarchy of splice junction evidence: 1. --reference and --splice files 2. --genome sequence motifs 3. XS and ts tags from BAM/SAM input
1 parent ffc6c35 commit ae15f57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+13761
-8333
lines changed

bookend/core/assemble.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ def __init__(self, args):
9191
'sj':None,
9292
}
9393
config.update(long_defaults)
94+
elif self.input_file.header.get("HD",{}).get("SO",'unsorted') != 'coordinate':
95+
print("ERROR: BAM input reads must be sorted by coordinate.")
96+
sys.exit(1)
9497

9598
self.dataset = RNAseqDataset(chrom_array=self.input_file.header.references, config=config)
9699
elif self.file_type == 'elr.gz':

bookend/core/bam_to_elr.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
class BAMtoELRconverter:
1616
def __init__(self, args):
1717
"""Parses input arguments for converting BAM to ELR"""
18-
print(args)
1918
self.source = args['SOURCE']
2019
self.genome = args['GENOME']
2120
self.reference = args['REFERENCE']
@@ -139,6 +138,10 @@ def __init__(self, args):
139138
if self.source is None:
140139
self.source = self.bam_in.header['PG'][0]['ID']
141140

141+
if self.bam_in.header.get("HD",{}).get("SO",'unsorted') == 'coordinate':
142+
print("WARNING: BAM sorted by coordinate. Mate pairs will not be merged.")
143+
print("Sort by read name (samtools sort -n) if using paired-end reads.")
144+
142145
self.dataset = RNAseqDataset(
143146
chrom_array=self.bam_in.header.references,
144147
chrom_lengths=list(self.bam_in.header.lengths),

0 commit comments

Comments
 (0)