I have a sam/bam file that contains the mapping of long reads with assembled contigs from short reads. Because of low coverage of long reads, I have 80% of the contigs that are not mapped to s single read. I would like to extract the contigs (with nucleotide sequence) that have at least one mapped reads. How could I do it quickly using my SAM/BAM files? Also, I would like to extract the sequences of a particular contiguous and its mapped long read sequences. Any help would be appreciated.