We input R2 fastq.gz into bowtie2, to extracte the reads which can not been mapped to human genome. However, those reads were not extracted ( ${base}_host_removed is zero).
#merge lanes
for i in $(find ./ -type f -name "*.fastq.gz" | while read F; do basename $F | rev | cut -c 22- | rev; done | sort | uniq)
do echo "Merging R1"
cat "$i"_L0*_R1_001.fastq.gz > "$i"_ME_L001_R1_001.fastq.gz
echo "Merging R2"
cat "$i"_L0*_R2_001.fastq.gz > "$i"_ME_L001_R2_001.fastq.gz
#bowtie2
bowtie2 -p 10 -x /home/wanglu/CRC/GRCh38_noalt_as/GRCh38_noalt_as -U scrEXT031_hg19_S12_ME_L001_R2_001.fastq.gz --un-conc-gz SAMPLE_host_removed > SAMPLE_mapped_and_unmapped.sam
This generated empty SAMPLE_host_removed files
Data Source:
scrEXT003_hg19_S15_L001 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L001_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L001_R2_001.fastq.gz scrEXT003_hg19_S15_L002 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L002_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L002_R2_001.fastq.gz scrEXT003_hg19_S15_L003 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L003_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L003_R2_001.fastq.gz scrEXT003_hg19_S15_L004 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L004_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L004_R2_001.fastq.gz scrEXT003_hg19_S15_L005 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L005_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L005_R2_001.fastq.gz scrEXT003_hg19_S15_L006 ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L006_R1_001.fastq.gz ftp://ftp.ebi.ac.uk/pub/databases/microarray/data/experiment/MTAB/E-MTAB-8410/scrEXT003_hg19_S15_L006_R2_001.fastq.gz
Some context would help.
I have added data source. Please tell me if more details were needed.
Yes, what are you doing, what kind of data is this and what is the problem?
What does that mean? Remember that we have no clue what you are working on so try to explain context and problem.
You seem to try to clean reads from something, from what?
To extracte the reads which can not been mapped to human genome.