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

find-motifs fails to load before_file #218

Closed
Ge0rges opened this issue Jun 24, 2024 · 2 comments
Closed

find-motifs fails to load before_file #218

Ge0rges opened this issue Jun 24, 2024 · 2 comments
Labels
question Looking for clarification on inputs and/or outputs

Comments

@Ge0rges
Copy link

Ge0rges commented Jun 24, 2024

Hi @ArtRand,

On the latest (0.3.1) and previous version of modkit, the attached bedfile produces a crash in find-motifs when I run this command:

modkit find-motifs -i barcode11.bed -r contigs.fna -o  dir

Out:

methylation_5/Cognaticolwellia_r-contigs/barcode11-motifs.tsv --threads 20
> loading references from "mags/Cognaticolwellia_r-contigs.fna"
> loaded 40 sequence(s)
> Error! failed to parse any bedmethyl records
@ArtRand
Copy link
Contributor

ArtRand commented Jun 24, 2024

Hello @Ge0rges,

It looks like all of the bedmethyl records are being filtered out due to low coverage. I'll make the logging more descriptive in the next release.

The default value to --min-coverage is 5, and the max valid coverage in this pileup is 4. When I look at

awk '($5>=4)' barcode11.bed | less -S

You can see that most of the records have very low methylation, which is confirmed by the log:

> loaded 221 low-frequency, 51 middle-frequency and 3 high-frequency contexts, 3 modification codes, discarded 0 contexts.

If I run the following command, you get 78 motifs, but most are very ambiguous.

modkit find-motifs \
  -i ./barcode11.bed \
  -r ./Cognaticolwellia_r-contigs.fna \
  -t 10 \
  --min-sites 2 \
  --min-frac-mod 0.5 \
  --log-filepath find_motifs.log \
  --min-coverage 4

Higher coverage will certainly help.

@ArtRand ArtRand added the question Looking for clarification on inputs and/or outputs label Jun 24, 2024
@Ge0rges
Copy link
Author

Ge0rges commented Jun 24, 2024

Got it that makes sense. So there isn't an actual error here, I'll add an exception in my script which will ignore the return value. Thanks!

@Ge0rges Ge0rges closed this as completed Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Looking for clarification on inputs and/or outputs
Projects
None yet
Development

No branches or pull requests

2 participants