Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filter-bam into filter-file #138

Merged
merged 6 commits into from
Jan 3, 2025
Merged

filter-bam into filter-file #138

merged 6 commits into from
Jan 3, 2025

Conversation

Kudostoy0u
Copy link
Member

No description provided.

@Kudostoy0u Kudostoy0u marked this pull request as draft January 2, 2025 17:11
@Kudostoy0u Kudostoy0u marked this pull request as ready for review January 2, 2025 17:22
Copy link
Collaborator

@jamesli124 jamesli124 left a comment

Choose a reason for hiding this comment

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

The code in _filter_file.py doesn't seem to assign a value to suffix if output _file is specified. Is this expected behavior?

input_file: BH01.hg19.mdups.chr22.bam
        whitelist_file: None
        blacklist_file: None
        output_file: BH01.hg19.mdups.chr22.filtered.bam
        min_length: 50
        max_length: 350
        quality_threshold: 30
        workers: 1
        verbose: 1     
        
Traceback (most recent call last):
  File "/Users/jamesli/Repos/FinaleToolkit/src/finaletoolkit/utils/_filter_file.py", line 111, in filter_file
    flag_filtered_bam = f'{temp_dir}/flag_filtered.{suffix}'
UnboundLocalError: local variable 'suffix' referenced before assignment

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/jamesli/anaconda3/envs/finaletoolkit/bin/finaletoolkit", line 8, in <module>
    sys.exit(main_cli())
  File "/Users/jamesli/Repos/FinaleToolkit/src/finaletoolkit/cli/main_cli.py", line 1005, in main_cli
    function(**funcargs)
  File "/Users/jamesli/Repos/FinaleToolkit/src/finaletoolkit/utils/_filter_file.py", line 145, in filter_file
    pysam.set_verbosity(save)
UnboundLocalError: local variable 'save' referenced before assignment

@Kudostoy0u
Copy link
Member Author

My bad, that wasn't intended - the commit I just made should fix this.

jamesli124
jamesli124 previously approved these changes Jan 3, 2025
Copy link
Collaborator

@jamesli124 jamesli124 left a comment

Choose a reason for hiding this comment

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

Just approving some of my own changes, nothing to see here
image

@jamesli124 jamesli124 merged commit 698452f into main Jan 3, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants