As a start I must confess that I am not really trained in bioinformatics. I managed to use bowtie2 and some samtools embedded in RStudio to align Illumina reads to a reference genome. I wish now to write into 2 separate files (to be converted in fastq) the mapped and unmapped reads. I need to perform a de novo assembly with the unmapped reads. Can anyone suggest a script that I can copy and adapt to my needs ?