This is a test version of Biostars. For the public version, visit https://www.biostars.org.
calculating mean fragment length from CollectInsertSizeMetrics(Picard) output

Can I use MEAN_INSERT_SIZE from picard as the meanFragmentLength directly ? Should I add the length of the adapter sequence that I used for trimming to the MEAN_INSERT_SIZE ? Please clarify on this. Alternatively can I use R2 end positions - R1 start , where R1 and R2 are pair of reads and then calculate the mean ?

count2fpkm

Can you give some context what you want to do? Don't reinvent the wheel.

Thank you for your response.

I want to use count2fpkm for normalizing my counts matrix, for which I need mean Fragment length, as suggested for getting mean Fragment length I ran CollectInsertSizeMetrics(Picard). Output of CollectInsertSizeMetrics(Picard) contains mean insert size but not mean fragment length. I repeated this question because I did not get an answer whether I should use mean insert size as it is or do any manipulation before using it in count2fpkm. Additionally, I am asking if I simply skip running CollectInsertSizeMetrics(Picard) and get mean fragment length [ which I am assuming is (R2 end positions - R1 start position) from SAM file, will it be correct to do so?

1 answer

Insert size is just the length of a fragment, but transcripts are chopped into pieces during library prep. What you need is the average transcript length. Tools like salmon can give you this, and then you use tximport to summarize the transcript information to gene level.

Log in to answer this question.