I would like to execute this shell command through python, I tried to use
shell="ls *R1.fastq.gz|while read a; do b=${a%R1.fastq.gz}R2.fastq.gz; c=${a%R1.fastq.gz}R1.out.fq; d=${a%R1.fastq.gz}R2.out.fq; e=${a%R1.fastq.gz}.s.fq; echo "sickle pe -t sanger -f $a -r $b -o $c -p $d -s $e"; done >SICKLE.sh"
system.os(shell)
But a get a SythaxError: InvalidSyntax
I make some research, maybe I should use subprocces
? but I'am pretty new with this, could we help me ?