Hi,
I have a bam file generated from analysis of nanopore data. I also have another file which includes the read IDs and the position of cytosine bases that predicted to be methylated. Now, I want to find the position of that methylated cytosines in the reference genome.
Let say I have a read name @adads-asdasd-asdasd, and I have the position based methylated index bases file like this:
@adads-asdasd-asdasd 2345
@adads-asdasd-asdasd 5676
@adads-asdasd-asdasd 8978
@adads-asdasd-asdasd 9878
The numbers represent the position of predicted methylated cytosines in the read. Now I want to find the position of these bases in the reference genome.
I now that I can get the start and end position of a read in the genome from a bam file using bamtobed and generating a bed file. But this utility accounts for CIGAR string and the start and end is not equal to the length of the read. Therefore I cannot just sum the index number of the base with the start position.
Any help would be much appreciated. Thanks, Vahid.
Thank you, @Pierre Lindenbaum. It seems this tool can satisfy my need. Many Thanks, Vahid.
If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted. (green mark on the left)
Hi @Pierre Lindenbaum,
I had a question regarding this software. Does it consider the + or - strand? and if I want to combine the extracted results of this software with a bed file which has positions based on + and - strand, how can I do that?
I would be grateful if you could instruct me with this matter.
Thanks,
Vahid.
filter the sam input using 'samtools view -f/-F' or use the sam flag in the sam2tsv output.