Skip to content

Commit

Permalink
minor fix in bowtie2
Browse files Browse the repository at this point in the history
  • Loading branch information
urmi-21 committed Jan 18, 2021
1 parent fd1a864 commit ba255f2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ Preprint is available [here](https://www.biorxiv.org/content/10.1101/2020.03.04.

Read the docs [here](https://pyrpipe.readthedocs.io/en/latest/?badge=latest)

### Note: Due to change in API designs, pyrpipe version 0.0.5 and above is not compatible with lower versions. All the tutorials and documentation have been updated to reflect v0.0.5. pyrpipe version 0.0.5 is currenly available only from GitHub.
**NOTE:** Due to change in API designs, pyrpipe version 0.0.5 and above is not compatible with lower versions.
All the tutorials and documentation have been updated to reflect v0.0.5.


## What it does
Expand All @@ -30,7 +31,7 @@ Allows fast and easy development of bioinformatics pipelines in python by provid
* comprehensive logging features to log all the commands, output and their return status
* report generating features for easy sharing, reproducing, benchmarking and debugging

## Key Features
## Key Features (version 0.0.5)
* Import any UNIX executable command/tool in python
* Dry-run feature to check dependencies and commands before execution
* Flexible and robust handling of options and arguments (both Linux and Java style options)
Expand Down
12 changes: 6 additions & 6 deletions pyrpipe/mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def perform_alignment(self,sra_object,out_suffix="_bowtie2",out_dir="",objectid=

#create path to output sam file
outSamFile=os.path.join(out_dir,sra_object.srr_accession+out_suffix+".sam")
outBamFile=os.path.join(out_dir,sra_object.srr_accession+out_suffix+"_sorted.bam")
#outBamFile=os.path.join(out_dir,sra_object.srr_accession+out_suffix+"_sorted.bam")


#find layout and fq file paths
Expand All @@ -613,20 +613,20 @@ def perform_alignment(self,sra_object,out_suffix="_bowtie2",out_dir="",objectid=



status=self.run(None,objectid=sra_object.srr_accession,target=outBamFile,**internal_kwargs)
status=self.run(None,objectid=sra_object.srr_accession,target=outSamFile,**internal_kwargs)


if status:
if not pu.check_files_exist(outSamFile) and not _dryrun:
return ""
#convert to bam before returning
#convert to bam before returning; returns outBamFile
return tools.Samtools().sam_sorted_bam(outSamFile)
#return outSamFile

return ""


return ""



def check_index(self):
"""Function to check bowtie index.
Returns True is index exist on disk.
Expand Down
3 changes: 2 additions & 1 deletion pyrpipe/sra.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ def assemble(self,assembly_object,**kwargs):
if not self.bam_path:
raise ValueError("No BAM file associated with "+ self.srr_accession)

if not pu.check_files_exist(self.bam_path):
if not _dryrun and not pu.check_files_exist(self.bam_path):
raise ValueError("BAM file {} not fount ".format(self.bam_path))

status=assembly_object.perform_assembly(self.bam_path,objectid=self.srr_accession,**kwargs)
Expand All @@ -356,6 +356,7 @@ def quant(self,quant_object):
if not (hasattr(quant_object,'_category') and quant_object._category=='Quantification'):
raise ValueError("Error: No valid assembly object provided for "+self.srr_accession)



status=quant_object.perform_quant(self,objectid=self.srr_accession)
if not status:
Expand Down
2 changes: 1 addition & 1 deletion pyrpipe/valid_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
#samtools version 1.9
_args_SAMTOOLS_SORT=['-l','-m','-n','-t','-o','-T','-O','-@','--input-fmt-option','--output-fmt','--output-fmt-option','--reference','--threads']
_args_SAMTOOLS_VIEW=['-b','-C','-1','-u','-h','-H','-c','-o','-U','-t','-L','-r','-R','-q','-l','-m','-f','-F','-G','-s','-M','-x','-B','-?','-S','O','T','@',
'--input-fmt-option','--output-fmt','--output-fmt-option','--reference','--threads']
'--input-fmt-option','--output-fmt','--output-fmt-option','--reference','--threads','-@']
_args_SAMTOOLS_MERGE=['-n','-t','-r','-u','-f','-1','-l','-R','-h','-c','-p','-s','-b','-O','-@','--input-fmt-option',
'--output-fmt','--output-fmt-option','--reference','--threads']
_args_SAMTOOLS={}
Expand Down

0 comments on commit ba255f2

Please sign in to comment.