Hi everybody.
I am trying to get part of a sequence from a .bam file, considering the reference genome position. Like, which sequence from the .bam file returns at position 50,000 to 50,400 nucleotides... Can someone help me? I need all in details, since I never work with this.
I am not sure exactly what you are trying to do but maybe this would help
http://www.htslib.org/doc/samtools.html
Thank you very much. Can I make you more questions? So the ony thing that I need to change in this command is "ref.fasta" for my genome.fata and "in1.bam" for my.bam? And of course the coordinates...
I did like this and I got this message
[bam_parse_region] fail to determine the sequence name. [mpileup] malformatted region or wrong seqname for US-18.bam
You will have to run following command to create the indexes first.