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

bedtools maskfasta with incomplete chromosomes #1118

Open
r-poloni opened this issue Feb 18, 2025 · 0 comments
Open

bedtools maskfasta with incomplete chromosomes #1118

r-poloni opened this issue Feb 18, 2025 · 0 comments

Comments

@r-poloni
Copy link

r-poloni commented Feb 18, 2025

Hi! I was trying to mask a multi-fasta file with a bed file, and discovered that bedtools provides a program that does exactly this, but at the same time not exactly. The program masks a fasta file with complete chromosomes. So if I have

test.fa

chr1
AAATGTTTAT
chr2
ATTTTGG

and test.bed
chr1 0 1
chr2 2 3

The result of
bedtools maskfasta -fi test.fa -fo test_masked.fa -bed test.bed

Would be a file test_masked.fa

chr1
NAATGTTTAT
chr2
ATNTTGG

However, if I have a file like this
test.fa

chr1:1-5
AAATG
chr1:6-10
TTTAT
chr2:1-7
ATTTTGG

And I run the same line of code, I will obtain a file where the sequences are not changed, but at the same time no error is printed on the screen, saying that the program could not find a match between the fasta file and the bed file.

chr1:1-5
AAATG
chr1:6-10
TTTAT
chr2:1-7
ATTTTGG

I feel it would be very useful if bedtools would implement a masking also for non complete sequences, or at least print an error when no match is found

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

1 participant