Weeks-UNC / shapemapper2

Public repository for ShapeMapper 2 releases
Other
29 stars 16 forks source link

How to extract reads with specific base mutations? #53

Closed GDemon486 closed 3 months ago

GDemon486 commented 3 months ago

Hello,

Do you have intermediate files in your script that store reads with mutations at different sites (in fastq or sam format, with the mutation positions noted)? Or is there any file that records similar information?

Thank you very much for your help, and I look forward to your reply.

Best Regards, Zhanyu Gao

Psirving commented 3 months ago

Hi,

Depending on what you are trying to do, you are either looking for --output-aligned-reads (outputs SAM files) or --output-parsed-mutations (outputs ShapeMapper2 specific file format).

See this page for more information on these:

https://github.com/Weeks-UNC/shapemapper2/blob/master/docs/file_formats.md#optional-intermediate-output-files

Patrick

GDemon486 commented 3 months ago

Thank you very much for your advice. After running the command --output-parsed-mutations, I generated the following .mut file.

PAIRED_R1 A01415:855:H7JL7DRX5:2:2101:31313:5087 231 331 INCLUDED -999 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11000011110000111000010001111100000001000111100011111000000001110111111111100001000111111000000000010 00000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000 294 297 "" "" "multinuc_deletion_ambig" PAIRED_R1 A01415:855:H7JL7DRX5:2:2101:6777:5462 87 331 INCLUDED -999 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11000011111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111000111111111111111111111111110001111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111100010 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000 287 289 "G" "F" "CG" PAIRED A01415:855:H7JL7DRX5:2:2101:6696:4789 0 331 INCLUDED -999 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 00111000000111111111100011111110001111111100011111111111100010001110000001100011111111111111111111111111111111111111111111111111111111111111111111111111111111111000111111111111111111111100011111111111111111111111111111111111100000000001111111111111111111000001100011110000000000111111111000111111000100011111110001111111111111111110 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 227 236 "" "" "multinuc_deletion_ambig"

According to the documentation you provided, does the first line of results with '294 297' indicate that a mutation occurred at positions 295 and 296? Does the second line of results with '287 289' indicate that a mutation occurred at position 288? Does the third line of results with '227 236' indicate that a mutation occurred at position 228 to 235? Thank you very much for your help, and I look forward to your reply.

---- Replied Message ---- | From | Patrick @.> | | Date | 6/14/2024 03:39 | | To | @.> | | Cc | Gaozhan @.> , @.> | | Subject | Re: [Weeks-UNC/shapemapper2] How to extract reads with specific base mutations? (Issue #53) |

Hi,

Depending on what you are trying to do, you are either looking for --output-aligned-reads (outputs SAM files) or --output-parsed-mutations(outputs ShapeMapper2 specific file format).

See this page for more information on these:

https://github.com/Weeks-UNC/shapemapper2/blob/master/docs/file_formats.md#optional-intermediate-output-files

Patrick

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Psirving commented 3 months ago

294 297 "" "" "multinuc_deletion_ambig"

This means that nts 294 and 297 (0-indexed) are unchanged from the target sequence, between these positions (295-296) is a deletion.

287 289 "G" "F" "CG"

Again, 287 and 289 (0-indexed) are unchanged, so 288 is the mutated (C to G) position.

GDemon486 commented 3 months ago

Thank you very much for your answers, they have been very helpful to me! ---- Replied Message ---- | From | Patrick @.> | | Date | 6/14/2024 22:15 | | To | @.> | | Cc | Gaozhan @.> , @.> | | Subject | Re: [Weeks-UNC/shapemapper2] How to extract reads with specific base mutations? (Issue #53) |

294 297 "" "" "multinuc_deletion_ambig"

This means that nts 294 and 297 (0-indexed) are unchanged from the target sequence, between these positions (295-296) is a deletion.

287 289 "G" "F" "CG"

Again, 287 and 289 (0-indexed) are unchanged, so 288 is the mutated (C to G) position.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

Psirving commented 3 months ago

Glad I could help!