How to obtain InsertSize from a BioMap object?
Ältere Kommentare anzeigen
Is there a way of obtaining the InsertSize field (available using bamread) when opening a bam file as a BioMap object? Opening the bam files using a BioMap object is much faster compared to the bamread function, but I can't find any way of obtaining the InsertSize (TLEN from the corresponding sam file)...
Antworten (2)
Luuk van Oosten
am 26 Jan. 2015
If you use something like:
BAMStruct = bamread(File,RefSeq,Range)
You get a struct. from this you can obtain the InsertSize by using something like:
x = BAMStruct.InsertSize
In the examples of the help doc (which are here) you will find something similar; they show an example how they extract instead of the 'InsertSize' the 'Position' by using the following:
data_one = bamread('ex1.bam','seq1', [100 300]);
data_one(27).Position
Good luck!
3 Kommentare
Razvan
am 26 Jan. 2015
Luuk van Oosten
am 28 Jan. 2015
Can you provide a .bam file for me and you code? I'll give it a try!
Razvan
am 5 Feb. 2015
0 Stimmen
Kategorien
Mehr zu Alignment finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!