Skip to content

Commit

Permalink
rename unused argument
Browse files Browse the repository at this point in the history
  • Loading branch information
lingminhao committed Jan 26, 2025
1 parent b3fed7c commit 596897a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/prepareDataFromBam.R
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ prepareDataFromBam <- function(bamFile, yieldSize = NULL, verbose = FALSE,
if(cleanReads){
softClip5Prime <- clipFunction(cigarData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '^(\\d*)[S].*', replace_pattern = '\\1')
softClip3Prime <- clipFunction(cigarData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '.*\\D(\\d*)[S]$', replace_pattern = '\\1')
hardClip5Prime <- clipFunction(alignData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '^(\\d*)[H].*', replace_pattern = '\\1')
hardClip3Prime <- clipFunction(alignData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '.*\\D(\\d*)[H]$', replace_pattern = '\\1')
hardClip5Prime <- clipFunction(cigarData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '^(\\d*)[H].*', replace_pattern = '\\1')
hardClip3Prime <- clipFunction(cigarData = GenomicAlignments::cigar(alignmentInfo), grep_pattern = '.*\\D(\\d*)[H]$', replace_pattern = '\\1')
# softClip5Prime <-suppressWarnings(pmax(0,as.numeric(gsub('^(\\d*)[S].*','\\1',GenomicAlignments::cigar(alignmentInfo))), na.rm=T))
# softClip3Prime <-suppressWarnings(pmax(0,as.numeric(gsub('.*\\D(\\d*)[S]$','\\1',GenomicAlignments::cigar(alignmentInfo))), na.rm=T))
# hardClip5Prime <-suppressWarnings(pmax(0,as.numeric(gsub('^(\\d*)[H].*','\\1',GenomicAlignments::cigar(alignmentInfo))), na.rm=T))
Expand Down Expand Up @@ -154,4 +154,4 @@ prepareDataFromBam <- function(bamFile, yieldSize = NULL, verbose = FALSE,
clipFunction <- function(cigarData, grep_pattern, replace_pattern){
return(suppressWarnings(pmax(0,as.numeric(gsub(grep_pattern,replace_pattern,
cigarData)), na.rm=T)))
}
}

1 comment on commit 596897a

@lingminhao
Copy link
Collaborator Author

@lingminhao lingminhao commented on 596897a Jan 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix the bug mentioned at GoekeLab/bambu-singlecell-spatial#6

Please sign in to comment.