For the demo, we are using a subset of our mapped small RNAs from Drosophila ovaries (SRR7346241)[https://www.ncbi.nlm.nih.gov/sra/?term=SRR7346241]. In short, we trimmed the 3’ adaptor and filtered for reads ≥24 nucleotides. Next, we removed abundant cellular RNAs (rRNAs, tRNAs, snRNAs, snoRNAs) by annotation. Finally, we mapped the processed reads to the Dm6 genome using STAR (PMID: 23104886) allowing up to one mismatch and 100 alignments per read. Using samtools (PMID: 19505943), we extracted alignments from chr2L:20000000-21000000 (samtools view -b original.bam chr2L:20000000-21000000 > Fly_Ov1_chr2L_20To21mb.bam). 
To further reduce the file size, we retained only the essential tags for PICB (NH, NM) in the BAM file (samtools view -h --keep-tag NM,NH -b -o Fly_Ov1_chr2L_20To21mb_TAGfilter.bam Fly_Ov1_chr2L_20To21mb.bam) and replaced the sequence quality field (QUAL) with a placeholder * (samtools view -h Fly_Ov1_chr2L_20To21mb_TAGfilter.bam | awk 'BEGIN{OFS="\t"} {if($0 ~ /^@/) {print $0} else {$11="*"; print}}' | samtools view -b -o Fly_Ov1_chr2L_20To21mb_TAGfilter_Qremoved.bam). 
We then downsampled the file to retain 22% of the reads (samtools view -s 0.22 -b Fly_Ov1_chr2L_20To21mb_TAGfilter_Qremoved.bam  > Fly_Ov1_chr2L_20To21mb_TAGfilter_Qremoved_downsampledP22.bam) and applied a high level of compression to further reduce its size (samtools sort -@ 4 -l 9 -o Fly_Ov1_chr2L_20To21mb_TAGfilter_Qremoved_downsampledP22_compr.bam Fly_Ov1_chr2L_20To21mb_TAGfilter_Qremoved_downsampledP22.bam). 
Lastly, we renamed the file to Fly_Ov1_chr2L_20To21mb_filtered.bam and indexed the compressed and sorted BAM file (samtools index Fly_Ov1_chr2L_20To21mb_filtered.bam).

The purpose of this entire reduction process was to significantly minimize the file size, making it manageable for storage. It is important to note that this downsampling, combined with the prior restriction to a smaller genomic region (chr2L:20000000-21000000), has drastically reduced the coverage and scope of the data, rendering it no longer representative of a biologically relevant sample.
