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

Is it required to filter the bam files? #14

Open
ChaoLab opened this issue May 27, 2022 · 4 comments
Open

Is it required to filter the bam files? #14

ChaoLab opened this issue May 27, 2022 · 4 comments

Comments

@ChaoLab
Copy link

ChaoLab commented May 27, 2022

I want to ask whether variant callers within MetaPpo can only use reads of a certain regions or chromosomes, so there is no need to filter the BAM file. I ask this because I have used extra references when I was doing the mapping.

@metaGmetapop
Copy link
Owner

The references in the bam files need to match the input references genomes. The bam files do need to be filtered for read depth so there is enough coverage to explore microdiversity, but you can choose to prevent the filtering of contigs that don't have enough horizontal coverage (coverage across the span of the genome) using --min_len and --min_cov

@ChaoLab
Copy link
Author

ChaoLab commented May 31, 2022

What if the input reference genomes are only a subset of the references in the bam files? Will this be acceptable for MetaPop?

@metaGmetapop
Copy link
Owner

You can alter the header of the bam files to match to match the input reference genomes or just filter the reference genomes for just those in the bam files.

@ChaoLab
Copy link
Author

ChaoLab commented Jun 6, 2022

Many thanks! I update with a report here: using pysam to remove both the unwanted headers and reads mapped to unwanted assemblies can solve this issue. The 'unwanted assemblies' here represent the ones that I included previously for competitive mapping using Bowtie 2.

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

No branches or pull requests

2 participants