My goal is to use STAR to create a new genome with the spike-ins listed below by combining both hg38.fa and spike-in. Once I have the genomes created, I'll align FASTQs to this newly created genome and use samtools (or another tool) to count the number of reads mapped to each spike-in for each sample. Would anyone know how to use samtools in this case?
Spike-in 150bp:
AGGCTTTGTTATTGGTATTGACTTACAAACAGTTAAGCCATTTGAATATGATAATGTAGTTGCAATAAAAGGAGATTTCACCTTAGAAGAAAATTTGAACAAAATTAGAGAGCTAATTCCAAATGATGAAAAAAAGGTGGATGTGGTTAT
Spike-in 250 bp:
ACGATAAAATTGGTTTTGCCTTTCAGCAATTCAACTTAATTCCTTTATTAACTGCCTTAGAAAATGTTGAACTTCCACTGATTTTTAAATATAGGGGAGCAATGAGCGGAGAAGAGAGGAGGAAGAGAGCTTTAGAATGCTTAAAGATGGCAGAGTTGGAGGAGAGATTTGCCAATCACAAACCAAATCAGTTGAGTGGAGGGCAACAACAGAGAGTTGCTATAGCGAGGGCTTTGGCAAACAACCCACC
Spike-in 350 bp:
CACCTGTCACATTTCCAATCGGCTCCAGGAAGAGAGAAGTGACGGCTTGATCCTGTAGTAATCCGGGATCGACTTAAGGGGTGCAGCGACCACGGCGGATCGGGCGTCGCAATAGTCCTCCTGTTAGGAGGGTCCTTCTAATGTTAACGCCCGAATATTAGTCATATTTTGCTAGCGCCTATCAGCGTAAGATATGATTTAAGTTACACCAGGAGAGTAGCGAGATAGAACCACTCGTTGGATCGGTCTTTCTTAATTGACTACTATCAGATCCGGCGCATGGCGCTGAGGTCAAACTACATTACAGGCCCTGGTTTCCATGGGTCAGCGCAAGTACAGGCGAGCAGATA
Spike-in 450 bp:
CACAAGAATCCCTGCTAGCTGAAGGAGGGTCAAACTATAACACCTTTAGCATTCGTACAGGCAGGCTAAGTGAATACTAACCCACCGGCAGCCCGTTGTAGTAACGTTGACCCCTGGCTCGGAGACATTTGGTGTTGCCTAGTACTAGGTGACTGGTACCGATTCATAGGTTCGCCATTCTCTTATCGAGAGCCCGAGGTAGACTATCTTCCAGATGATGCCATACGTTCACTCAATCGCGCGGCATGCACGGTGGGGCTACGAACTTGCTATCCATAGGCTCTAGATGTGGTAGAAATATGCTGCAGGGGTTCTGTCGAATTTGCTCGGCAACCGTGGCCGTGTATGCTTTCATATCCCGGCGGTGTGATCTAGCCTTCTCGCCATATGAGGGCGCTGAGCATAGACCCAAACCCGACTAGTCGAATCTTAGGGTTGTATGCTAGAACG
Add the spike-in's as individual references in your genome file. After alignments, use
samtools idxstats
to get reads aligned to each of the spike-ins from BAM.