+ date=2019-10-01 + data_source=data_sources + organism='Homo sapiens' ++ dirname ../prep/study_metadata_layout.sh + sdir=../prep + study=ERP107244 + org=human + dsource=sra + preds_file=../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv + perl -e '$study="ERP107244"; $study=~/(..)$/; $lo=$1; `mkdir -p $lo/$study`; print "$lo/$study\n";' ++ cat ERP107244.dir cat: ER+ cat ../pr: No such file or directory + dir= + cat ../prep/samples.tsv.header /dev/fd/63 ++ fgrep + cut_cols=1-3 + [[ human == \m\o\u\s\e ]] + [[ human == \h\u\m\a\n ]] + gzip + cut -f 1-41 44/ERP107244/samples.tsv.ERP107244 cut: 44/ERP107244/samples.tsv.ERP107244: No such file or directory + gzip + cut -f 1-3,42-150 44/ERP107244/samples.tsv.ERP107244 cut: 44/ERP107244/samples.tsv.ERP107244: No such file or directory + [[ human == \g\t\e\x ]] + [[ human == \t\c\g\a ]] + proj_header='rail_id external_id study project organism file_source metadata_source date_processed' + dsource_path=data_sources/sra + extra_proj_cols='Homo sapiens data_sources/sra data_sources/sra 2019-10-01' + gzip ++ echo 'rail_id external_id study project organism file_source metadata_source date_processed' + cat /dev/fd/63 /dev/fd/62 ++ tail -n+2 44/ERP107244/samples.tsv.ERP107244 ++ cut -f 1-3 ++ perl -ne 'chomp; $f=$_; ($rid,$run,$study)=split(/\t/,$f); print "$f\t$study\tHomo sapiens data_sources/sra data_sources/sra 2019-10-01\n";' tail: cannot open ‘44/ERP107244/samples.tsv.ERP107244’ for reading: No such file or directory + [[ -n ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ]] + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ++ fgrep ' ERP107244 ' ../prep/Human.SRA_curated_predict.meta.w_rids.rtypes.tsv ++ perl -e '$s="ERP107244"; $s=~/(..)$/; $lo=$1; print "$lo\n";' + lo=44 + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/seqtk.w_study.tsv.cut ++ fgrep ' ERP107244 ' ../prep/seqtk.w_study.tsv.cut + rm 44/ERP107244/samples.tsv.ERP107244 rm: cannot remove ‘44/ERP107244/samples.tsv.ERP107244’: No such file or directory + rm ERP107244.dir rm: cannot remove ‘ERP107244.dir’: No such file or directory .)$/; $lo=$++ perl -e '$s="ERP107244";+ gzip + cat /dev/fd/63 /dev/fd/62 ++ + lo=44 + gzip + cat /dev/fd/63 /dev/fd/62 ++ head -1 ../prep/seqtk.w_study.tsv.cut ++ fgre+ rm /samples.tsv.ERP107244 rm: cannot remove + rm /samples.tsv.ERP107244 rm: cannot remove ‘/samples.tsv.ERP107244’: No such file or directory + rm ERP107244.dir rm: cannot remove ‘ERP107244.dir’: No such file or directory