Hi, I am interested in using PSMC to run a historic population size analysis and I ran into a problem. I assembled the genome of my species using a reference, and got the consensus for PSMC, but I forgot to separate autosomes from X and Y chromosomes. Including those in PSMC biased the results.
I have 92 scaffolds in my assembly, and I have merged the X and Y mouse chromosomes to then get only the autosomes. I used minimap2 to map my scaffolds to the merged file, but I do not know what else to do. I posted a question in the minimap2 github forum for help to split those, and got the useless/stupid response: "You can write a python/perl script to do that.". Well, I do not know perl nor python for doing that.
How can I get the unmapped scaffolds from the sam file output from minimap2?
Thanks;
Your post is unclear since you are referring to getting
unmapped sequences
in title but then are referring to getting onlyscaffolds
mapped to autosomes in body of the question.For the latter you can take a look at @Pierre's answer here: A: Extract ONLY chromosomes 1-22 from bam file - removing extraneous chr annotation