Skip to content

Commit

Permalink
updateStar
Browse files Browse the repository at this point in the history
  • Loading branch information
urmi-21 committed Feb 23, 2020
1 parent f32d50e commit f663daf
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions pyrpipe/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ class Star(Aligner):
Attributes
----------
"""
def __init__(self,star_index="",**kwargs):
def __init__(self,star_index="",threads=None,**kwargs):

super().__init__()
self.programName="STAR"
Expand All @@ -330,6 +330,12 @@ def __init__(self,star_index="",**kwargs):
'--chimOutType','--chimSegmentMin','--chimScoreMin','--chimScoreDropMax','--chimScoreSeparation','--chimScoreJunctionNonGTAG','--chimJunctionOverhangMin','--chimSegmentReadGapMax','--chimFilter','--chimMainSegmentMultNmax']


if not threads:
threads=os.cpu_count()

if '--runThreadN' not in kwargs:
kwargs['--runThreadN']=str(threads)

#initialize the passed arguments
self.passedArgumentDict=kwargs

Expand Down Expand Up @@ -417,7 +423,7 @@ def build_index(self,index_path,*args,verbose=False,quiet=False,logs=True,object



def perform_alignment(self,sra_object,out_suffix="_star",out_dir="",verbose=False,quiet=False,logs=True,objectid="NA",**kwargs):
def perform_alignment(self,sra_object,out_suffix="_star",out_dir="",verbose=False,quiet=False,logs=True,objectid="NA",out_type=None,optimize=None,**kwargs):
"""Function to perform alignment using star and the provided SRA object.
All star output will be written to the sra_object directory by default.
Expand All @@ -438,6 +444,10 @@ def perform_alignment(self,sra_object,out_suffix="_star",out_dir="",verbose=Fals
Log this command to pyrpipe logs
objectid: str
Provide an id to attach with this command e.g. the SRR accession. This is useful for debugging, benchmarking and reports.
out_type: str
Out type options for star
optimize: bool
If true optimize maping parameters based on read length
kwargs: dict
Options to pass to STAR. This will override the existing options in self.passed_args_dict (only replace existing arguments and not replace all the arguments).
Expand Down

0 comments on commit f663daf

Please sign in to comment.