Skip to content

Conversation

@fellen31
Copy link

@fellen31 fellen31 commented May 16, 2024

Adds ID, motifs, and motif counts to the output VCF:

chr4 39348424 . AAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGA AAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAG,AAAAAGAAAAGAAAAGAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAGAAAAG . . REPID=RFC1;MOTIFS=AAAAG,AAAGG,AAGGG,AAGAG,AGAGG,AACGG,GGGAC,AAAGGG;END=39348479;STDEV=2,7 GT:RB:FRB:SUP:MC:SC 1|2:6,520:61,575:17,14:12_0_0_0_0_0_0_0,114_0_0_0_0_0_0_0:183,1725

@fellen31 fellen31 marked this pull request as ready for review May 16, 2024 11:28
Comment on lines +8 to +21
pub fn create_mc(motifs_string: &str, repeats: &str) -> String {
let motifs: Vec<String> = motifs_string.split(',').map(|s| s.to_string()).collect();

let mut motif_counts = vec![0; motifs.len()];
for motif in motifs.iter() {
let mut start = 0;
while let Some(index) = repeats[start..].find(motif) {
motif_counts[motifs.iter().position(|x| x == motif).unwrap()] += 1;
start += index + motif.len();
}
}
motif_counts.iter().map(|count| count.to_string()).collect::<Vec<String>>().join("_")
}

Copy link
Author

Choose a reason for hiding this comment

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

Will not work when the motif contains N though...

@fellen31 fellen31 marked this pull request as draft May 16, 2024 12:23
@wdecoster
Copy link
Owner

Hi @fellen31
It seems my account for the scilifelab slack was linked to my UU email account, to which it seems I don't have access anymore. For some reason I had to sign in again to all my slack workspaces, but that doesn't work for scilifelab now.
So you won't be able to reach me there, at least for now.

Wouter

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